In this blog I am going to to how to declare PHP variable output, PHP Variables Scope, PHP Global and Local Scope, PHP Global Keyword variable quotes and more.
Creating (Declaring) PHP Variables-
In PHP, a variable starts $ sign, this is mandatory for output or result
Variable always start with $ sign,
A variable name cannot start with a number.
A variable must start with a letter or underscore.
ex-
PHP local scope:
Any variable declared inside a function is considered as in local scopte of function scope. It can be accessible only inside that function where it is declared.
PHP global Scope
Any variable declared outside a function is considered as in the global scope. It can be accessed anywhere in the script.
- What is DevContainer? - December 20, 2024
- Top 10 Website Development Companies in Vadodara - December 20, 2024
- Compare SAST, DAST and RASP & its Tools for DevSecOps - December 19, 2024