Top Ad unit 728 × 90

ticker

What is Differences between constants and variables in PHP

Differences between constants and variables are:

  • There is no need to write a dollar sign ($) before a constant, where as in Variable one has to write a dollar sign.
  • Constants cannot be defined by simple assignment, they may only be defined using the define() function.
  • Constants may be defined and accessed anywhere without regard to variable scoping rules.
  • Once the Constants have been set, may not be redefined or undefined.
What is Differences between constants and variables in PHP Reviewed by Rajat Jha on 20:15: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.