PHP String Summary: in this tutorial, you will learn about PHP strings and how to manipulate strings effectively. Introduction to PHP strings In PHP, a string is a sequence of characters. PHP provides you with four ways to define a literal string, including single-quoted, double-quoted, heredoc syntax, and nowdoc syntax. This tutorial focuses on the…
Read more
PHP float Summary: in this tutorial, you’ll learn about floating-point numbers or floats in PHP. Introduction to the PHP float Floating-point numbers represent numeric values with decimal digits. Floating-point numbers are often referred to as floats, doubles, or real numbers. Like integers, the range of the floats depends on the platform where PHP runs. PHP…
Read more
PHP int Summary: in this tutorial, you’ll learn about the PHP int type that represents integers in PHP. Introduction to the PHP int type Integers are whole numbers such as -3, -2, -1, 0, 1, 2, 3… PHP uses the int type to represent the integers. The range of integers depends on the platform where…
Read more
PHP Boolean Summary: in this tutorial, you’ll learn about the PHP Boolean data type and the boolean values Introduction to PHP Boolean A boolean value represents a truth value. In other words, a boolean value can be either true or false. PHP uses the bool type to represent boolean values. To represent boolean literals, you…
Read more
PHP Data Types Summary: in this tutorial, you will learn about PHP data types including scalar types, compound types, and special types. Introduction to PHP data types A type specifies the amount of memory that allocates to a value associated with it. A type also determines the operations that you can perform on it. PHP…
Read more
PHP var_dump Summary: in this tutorial, you will learn how to use the PHP var_dump() function to dump the information about a variable. Introduction to the PHP var_dump function The var_dump() is a built-in function that allows you to dump the information about a variable. The var_dump() function accepts a variable and displays its type…
Read more
PHP Comments Summary: in this tutorial, you’ll learn how to use PHP comments to document your code. Comments are important parts of the code. Comments provide useful information that will help you and other developers understand the meaning of the code more quickly later. PHP supports two types of comments: One-line comments Multi-line comments One-line comments…
Read more
PHP Constants Summary: in this tutorial, you learn about PHP constants and how to use the define() function and const keyword to define constants. Introduction to PHP constants A constant is simply a name that holds a single value. As its name implies, the value of a constant cannot be changed during the execution of…
Read more
PHP Variables Summary: in this tutorial, you will learn how to use PHP variables to store data in programs. Define a variable A variable stores a value of any type, e.g., a string, a number, an array, or an object. A variable has a name and is associated with a value. To define a variable, you use the…
Read more