Course Content

  • PHP Variables

Course Content


  • Variables in PHP
  • A variable is identified by the $ sign, which is followed by the variable's name.
  • The name of a variable must begin with a letter or an underscore.
  • A number cannot be the first character in a variable name.
  • Only alpha-numeric characters and underscores (A-z, 0-9, and _) are allowed in variable names.

PHP has three different variable scopes, depending on the scopes: local, global, and static variable scope.

A variable's value is the result of its most recent assignment. Variables in PHP don't have inherent types, which means they don't know if they'll be used to store a number or a string of characters before they're used. Variables with default values are those that are utilised before they are assigned.

Variables are used to store values or data in a programme so that they can be utilised later. Character values, numeric values, memory addresses, and strings are all stored in variables, which are similar to containers.

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere