3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class foo {} $bar = function () { return static::class; }; var_dump($bar->call(new foo));
based on 8vZhA
Output for 7.0.1 - 7.2.0
string(3) "foo"
Output for 7.0.0

Process exited with code 139.
Output for 5.5.0 - 5.6.28
Fatal error: Cannot access static::class when no class scope is active in /in/APFC9 on line 5
Process exited with code 255.