3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if (PHP_VERSION_ID < 70000) { class_alias('StringDeprecated', 'String'); } class StringDeprecated { public function __construct() { echo "hello"; } } $str = new String();
based on PODXv
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Class 'String' not found in /in/pLPl9:13 Stack trace: #0 {main} thrown in /in/pLPl9 on line 13
Process exited with code 255.
Output for 5.3.20 - 5.6.28
hello