Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
PHP Basics
1. 3. PHP Basics
● Introduction to Variables
● Code commenting
● Understanding and working with Data Types
● Categorization of Data Types
● Introduction to Operators
● Types Of Operators with suitable examples
● Types of Errors
2. 3.1 Introduction to Variables
Variables are "containers" for storing information.
- A variable starts with the $ sign, followed by the name of the variable
- A variable name must start with a letter or the underscore character
- A variable name cannot start with a number
- A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )
- Variable names are case-sensitive ($age and $AGE are two different variables)
4. 3.3 Data Types
- String
A string is a sequence of characters.
- Integer
An integer data type is a non-decimal number between -2,147,483,648 and 2,147,483,647.
- Float (floating point numbers - also called double)
A float (floating point number) is a number with a decimal point.
- Boolean
A Boolean represents two possible states: TRUE or FALSE.
- Array
An array stores multiple values in one single variable.
- Object
An object is a data type which stores data and information on how to process that data.
- NULL
Null is a special data type which can have only one value: NULL.
6. ASIGNMENT
3.4 Operators
Operators are used to perform operations on variables and values.
- Arithmetic operators
- Assignment operators
- Comparison operators
- Increment/Decrement operators
- Logical operators
- String operators
- Array operators
7. 3.5 Errors
There are three types of error: syntax errors, logical errors and run-time errors.
Basically there are 13 types of errors in PHP, which are as follows:
E_ERROR: A fatal error that causes script termination
E_WARNING: Run-time warning that does not cause script termination
E_PARSE: Compile time parse error.
E_NOTICE: Run time notice caused due to error in code
E_CORE_ERROR: Fatal errors that occur during PHP's initial startup (installation)
E_CORE_WARNING: Warnings that occur during PHP's initial startup
E_COMPILE_ERROR: Fatal compile-time errors indication problem with script.
E_USER_ERROR: User-generated error message.
E_USER_WARNING: User-generated warning message.