This site is mobile accessible. Press the "Tap Here" button to use a different font-size.


Smartphone icons created by Freepik - Flaticon

PHP Static Properties

3.14159

<?php
// define Static Property
class pi {
  public static $value = 3.14159;
}

// Get static property
echo pi::$value;
?>

Here, we declare a static property: $value. Then, we echo the value of the static property by using the class name, double colon (::), and the property name (without creating a class first).