3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @link http://stackoverflow.com/a/24059368/367456 */ class c1 { public static function f1() { return "hello"; } public static $a = 10; public function f2() { echo $this->f1(); // prints "hello" echo $this->a; // Strict Standards: Accessing static property c1::$a as non static echo $this::$a; // prints "10" (PHP <= 5.2.17: Parse error) } } $obj1 = new c1; $obj1->f2();

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
168.42 ms | 3350 KiB | 8 Q