Top Ad unit 728 × 90

ticker

Variable Scope and Variable Naming In PHP

Variable Scope

Scope can be defined as the range of availability a variable has to the program in which it is declared. PHP variables can be one of four scope types:

  • Local variables
  • Function parameters
  • Global variables
  • Static variables

Variable Naming:

Rules for naming a variable is:

  • Variable names must begin with a letter or underscore character.
  • A variable name can consist of numbers, letters, underscores but you cannot use characters like + , - , % , ( , ) . & , etc
    There is no size limit for variables.
Variable Scope and Variable Naming In PHP Reviewed by Rajat Jha on 09:57:00 Rating: 5

No comments:

All Rights Reserved by INFO PHP 99 © 2014 - 2015
Powered by Blogger, Designed by Sweetheme

Contact Form

Name

Email *

Message *

Powered by Blogger.