Course Content

  • 1. magic_constants

Course Content

FAQs

In PHP, magic constants are preset constants that alter depending on their use. They begin with a double underscore ( ) and end with another double underscore ( ). They're identical to other specified constants, but they're termed magic constants since their values alter depending on the circumstances.

The magic constant of an nth-order magic square is calculated by dividing the total of 1 to n2 by n, i.e. the magic constant = n (n2+1)/2.

The __FILE__ constant returns the entire path and name of the currently running PHP file. The name of the included file is returned if used inside an include.

  • name: It specifies the constant name.
  • point value: It indicates the value of a constant.
  • case-insensitive: Indicates whether or not a variable is case-insensitive. False is the default setting. It signifies that by default, it is case sensitive.

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