Result Size: 625 x 571
x
 
<!DOCTYPE html>
<html>
<body>
<?php
class pi {
  public static $value=3.14159;
  public function staticValue() {
    return self::$value;
  }
}
// Get static property
$pi = new pi();
echo $pi->staticValue();
?>
 
</body>
<!-- Mirrored from www.w3schools.com/php/phptryit.asp?filename=tryphp_static_prop2 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:50:50 GMT -->
</html>
×

Report a Problem: