Malhar Lathkar has Published 189 Answers

PHP String Data Type

Malhar Lathkar
Published on 19-Sep-2020 14:55:53
Definition and UsageIn PHP, a string data type is a non-numeric sequence of charaters.Any character in the ASCII set can be a part of a string. PHP doesn't support UNICODE.In PHP, literal representation of string can be done with single quotes, double quotes, with heredoc syntax and nowdoc syntax.Syntax//Literal assignment ... Read More

PHP Resources

Malhar Lathkar
Published on 19-Sep-2020 14:51:58
Definition and UsageIn PHP, Resource  is a special data type that refers to any external resource. A resource variable acts as a reference to external source of data such as stream, file, database etc. PHP uses relevent functions to create these resources. For example, fopen() function opens a disk file ... Read More

PHP Objects.

Malhar Lathkar
Published on 19-Sep-2020 14:50:08
Definition and UsageIn PHP, Object is a compound data type (along with arrays). Values of more than one types can be stored together in a single variable. Object is an instance of either a built-in or user defined class. In addition to properties, class defines functionality associated with data.Primary (scalar) ... Read More


Malhar Lathkar
Published on 19-Sep-2020 14:47:15
Definition and UsageIn PHP, a variable with no value is said to be of null data type. Such a variable has a value defined as NULL. A variable can be explicitly assigned NULL or its value been set to null by using unset() function.Syntax$var=NULL;It is possible to cast variable of ... Read More

PHP Multidimensional Array.

Malhar Lathkar
Published on 19-Sep-2020 14:45:16
Definition and UsageA multidimensional array in PHP an be treated as an array of arrays so that each element within the array is an array itself. Inner elements of a multi dimensional array may be associative or indexed.Although arrays can be nested upto any levels, two dimensional array with more ... Read More

PHP Type Juggling

Malhar Lathkar
Published on 19-Sep-2020 14:42:30
Definition and UsagePHP is known as a dynamically typed language. Explicit type declaration of a variable is neither needed nor supported in PHP. Contrary to C, C++ and Java, type of PHP variable is decided by the value assigned to it, and not other way around. Further, a variable when ... Read More

PHP Iterables

Malhar Lathkar
Published on 19-Sep-2020 14:40:13
Definition and UsageFrom version 7.1 onwards, PHP provides a new pseudo-type called iterable. Any object (such as array) that implements Traversable interface is acceepted by it. This type uses foreach construct or a generator function that yields one value at a a time.SyntaxA function can have iterable as type of ... Read More

PHP Integer Data Type

Malhar Lathkar
Published on 19-Sep-2020 14:37:54
Definition and UsageIn PHP, Integer is a scalar data type that represents a numeric constant represents a whole number wihout any fractional part. PHP allows an integer to be expressed in decimal, hexadecimal, octal or binary number system by prefixing appropriate symbol.By default Integer is assumed in decimal notation. For ... Read More

PHP Indexed Array

Malhar Lathkar
Published on 19-Sep-2020 14:32:48
Definition and UsageA comma separated sequence of values only instead of key=>value pairs. Each element in such collection has a unique positional index starting from 0. Hence, it is called Indexed array.Indexed Array object can be initialized by array() function as well as assignment by putting elements inside square brackets [].Syntax//Indexed ... Read More

PHP Floating Point Data Type

Malhar Lathkar
Published on 19-Sep-2020 14:26:42
Definition and UsageIn PHP, float data type represents any number with a provision to contain a fractional part. The fractional part may contain digits after decimal point, or may be represented in scientific notation using either e or E. For example 100 in scientific notation is 10e2.Size of a float ... Read More
Previous 1 ... 3 4 5 6 7 8 9 ... 19 Next