3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { const OMG = 10; public function get($what) { return self::$what; } } $test = new Test(); var_dump($test->get("OMG")); var_dump($test::OMG);

preferences:
40.4 ms | 402 KiB | 5 Q