3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php print_r(DateTime::getLastErrors()); $a = array('a', 'b '); var_dump(is_callable($a)); $a();
Output for 7.0.0 - 7.1.0
bool(false) Fatal error: Uncaught Error: Class 'a' not found in /in/1iL7d:5 Stack trace: #0 {main} thrown in /in/1iL7d on line 5
Process exited with code 255.
Output for hhvm-3.12.0
Array ( [warning_count] => 0 [warnings] => Array ( ) [error_count] => 0 [errors] => Array ( ) ) bool(false) Fatal error: Uncaught Error: Invalid callable (array) in /in/1iL7d:5 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.0
Array ( [warning_count] => 0 [warnings] => Array ( ) [error_count] => 0 [errors] => Array ( ) ) bool(false) Fatal error: Invalid callable (array) in /in/1iL7d on line 5
Process exited with code 255.
Output for 5.4.0 - 5.6.28
bool(false) Fatal error: Class 'a' not found in /in/1iL7d on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.29
bool(false) Fatal error: Function name must be a string in /in/1iL7d on line 5
Process exited with code 255.
Output for 5.2.10 - 5.2.17
Fatal error: Call to undefined method DateTime::getLastErrors() in /in/1iL7d on line 2
Process exited with code 255.
Output for 5.2.0 - 5.2.9
Fatal error: Call to undefined method DateTime::getlasterrors() in /in/1iL7d on line 2
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/1iL7d on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Undefined class name 'datetime' in /in/1iL7d on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Undefined class name 'datetime' in /in/1iL7d on line 2