filmov
tv
PHP variable Web Development Class -3 (Naming Conventions, $$ Reference, & Pass by Reference, Scope)

Показать описание
Variables are also used in computer programming to store specific values within a program. They are assigned both a data type as well as a value. For example, a variable of the string data type may contain a value of "sample text" while a variable of the integer data type may contain a value of "11". Some programming languages require variables to be declared before they can be used, while PHP allow variables to be created on the fly. The data type, if not defined explicitly, is determined based on the initial value given to the variable.
PHP Variable is nothing it is just name of the memory location. A Variable is simply a container i.e used to store both numeric and non-numeric information.
In PHP, a variable does not need to be declared before adding a value to it. PHP automatically converts the variable to the correct data type, depending on its value.
After declaring a variable it can be reused throughout the code.
The assignment operator (=) used to assign value to a variable.
This assign value on the right side of the equation to the variable on the left.
Naming Conventions for PHP Variables
OR
Rules for PHP variables declaration
Variables in PHP starts with a dollar($) 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 alphanumeric characters and underscores (A-z, 0-9, and _ ).
A variable name should not contain space.
Reference Variable
OR
$ vs $$
The $ operator in PHP is used to declare a variable. In PHP, a variable starts with the $ sign followed by the name of the variable.The $var_name is a normal variable used to store a value. It can store any value like integer, float, char, string etc. For example:
& – Pass by Reference
References allow two variables to refer to the same content.
In other words, a variable points to its content (rather than becoming that content). Passing by reference allows two variables to point to the same content under different names. The ampersand ( & ) is placed before the variable to be referenced.
PHP Variables Scope
In PHP, variables can be declared anywhere in the script.
The scope of a variable is the part of the script where the variable can be referenced/used.
PHP has three different variable scopes:
Local
Global
Static
Download link:
............................................
The people of bikaner is also know about quality of Axixa technologies and Rajesh sir. Axixa is old and popular place for programming languages since 10 years.. we'll try to cover all basic and advanced topic of php in our php tutorials.
learn php with AXIXA technologies and have a nice day
If you want me to cover any topic related it sector you can comment down the topic we will try to cover that.
Rajesh purohit (+919251435299)
#NamingConventions #$$Reference #&Pass by Reference #Scope #syntax #php #web_development #free_classes #covid_19_special #stay_tuned #keep_watching #keep_supporting #subscribe_now #press_bell_icon #like #share #web_design #website_design
PHP Variable is nothing it is just name of the memory location. A Variable is simply a container i.e used to store both numeric and non-numeric information.
In PHP, a variable does not need to be declared before adding a value to it. PHP automatically converts the variable to the correct data type, depending on its value.
After declaring a variable it can be reused throughout the code.
The assignment operator (=) used to assign value to a variable.
This assign value on the right side of the equation to the variable on the left.
Naming Conventions for PHP Variables
OR
Rules for PHP variables declaration
Variables in PHP starts with a dollar($) 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 alphanumeric characters and underscores (A-z, 0-9, and _ ).
A variable name should not contain space.
Reference Variable
OR
$ vs $$
The $ operator in PHP is used to declare a variable. In PHP, a variable starts with the $ sign followed by the name of the variable.The $var_name is a normal variable used to store a value. It can store any value like integer, float, char, string etc. For example:
& – Pass by Reference
References allow two variables to refer to the same content.
In other words, a variable points to its content (rather than becoming that content). Passing by reference allows two variables to point to the same content under different names. The ampersand ( & ) is placed before the variable to be referenced.
PHP Variables Scope
In PHP, variables can be declared anywhere in the script.
The scope of a variable is the part of the script where the variable can be referenced/used.
PHP has three different variable scopes:
Local
Global
Static
Download link:
............................................
The people of bikaner is also know about quality of Axixa technologies and Rajesh sir. Axixa is old and popular place for programming languages since 10 years.. we'll try to cover all basic and advanced topic of php in our php tutorials.
learn php with AXIXA technologies and have a nice day
If you want me to cover any topic related it sector you can comment down the topic we will try to cover that.
Rajesh purohit (+919251435299)
#NamingConventions #$$Reference #&Pass by Reference #Scope #syntax #php #web_development #free_classes #covid_19_special #stay_tuned #keep_watching #keep_supporting #subscribe_now #press_bell_icon #like #share #web_design #website_design