3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static $x; public static function SetValue() { Foo::$x = 10; } public static function ShowValue() { echo Foo::$x."\n"; } } Foo::SetValue(); Foo::ShowValue(); // O mejor aun class Bar { public static $x; public static function SetValue() { self::$x = 10; } public static function ShowValue() { echo self::$x."\n"; } } Bar::SetValue(); Bar::ShowValue();

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
216.8 ms | 2425 KiB | 8 Q