3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function __autoload($class) { switch ($class) { case 'A': case 'B': class B extends C {}; break; case 'C': class C {}; class A extends B {}; break; } } echo (int) class_exists('A');
Output for 7.2.0
Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in /in/IXANd on line 3 Fatal error: Cannot declare class B, because the name is already in use in /in/IXANd on line 9
Process exited with code 255.
Output for 7.0.0 - 7.1.12
Fatal error: Cannot declare class B, because the name is already in use in /in/IXANd on line 9
Process exited with code 255.
Output for hhvm-3.10.1 - 3.22.0
1
Output for 5.5.0 - 5.6.30
Fatal error: Cannot redeclare class B in /in/IXANd on line 9
Process exited with code 255.