3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace Test; abstract class BaseTest { public function toFloat() { return 0.0; } public function equals($value) { return $value instanceof static; } } class Test extends BaseTest { } class Test2 extends BaseTest { public function toFloat($useOne = false) { return $useOne ? 1.0 : 0.0; } } $a = new Test(); $b = new Test(); $c = new Test2(); var_dump(Test::class); var_dump(class_basename(Test::class));
based on jrD1n
Output for 7.3.0alpha1 - 7.3.0beta1
string(9) "Test\Test" Fatal error: Uncaught Error: Call to undefined function class_basename() in /in/5HXDm:29 Stack trace: #0 {main} thrown in /in/5HXDm on line 29
Process exited with code 255.
Output for 7.0.0 - 7.2.6
string(9) "Test\Test" Fatal error: Uncaught Error: Call to undefined function Test\class_basename() in /in/5HXDm:29 Stack trace: #0 {main} thrown in /in/5HXDm on line 29
Process exited with code 255.
Output for hhvm-3.22.0
string(9) "Test\Test" Fatal error: Uncaught Error: Call to undefined function Test\class_basename() in /in/5HXDm:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
string(9) "Test\Test" Fatal error: Uncaught Error: Call to undefined function Test\class_basename() in /in/5HXDm:29 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
string(9) "Test\Test" Fatal error: Call to undefined function Test\class_basename() in /in/5HXDm on line 29
Process exited with code 255.