3v4l.org

run code in 500+ PHP versions simultaneously
<?php echo "PHP Version: " . PHP_VERSION . "\n"; try { $v = new DateTime(); $v = (string) $v; } catch (Error $e) { echo "Caught 'Catchable fatal error' with message: " . $e->getMessage(); die(); } echo "Did not catch 'Catchable fatal error'";
Output for 5.6.0 - 5.6.40
PHP Version: 5.6.0 Catchable fatal error: Object of class DateTime could not be converted to string in /in/GeNpF on line 8
Process exited with code 255.
Output for 7.0.0 - 7.0.33
PHP Version: 7.0.0 Catchable fatal error: Object of class DateTime could not be converted to string in /in/GeNpF on line 8
Process exited with code 255.
Output for 7.1.0 - 7.1.33
PHP Version: 7.1.0 Recoverable fatal error: Object of class DateTime could not be converted to string in /in/GeNpF on line 8
Process exited with code 255.
Output for 7.2.0 - 7.2.34
PHP Version: 7.2.0 Recoverable fatal error: Object of class DateTime could not be converted to string in /in/GeNpF on line 8
Process exited with code 255.
Output for 7.3.0 - 7.3.33
PHP Version: 7.3.0 Recoverable fatal error: Object of class DateTime could not be converted to string in /in/GeNpF on line 8
Process exited with code 255.
Output for 7.4.0 - 7.4.33
PHP Version: 7.4.0 Caught 'Catchable fatal error' with message: Object of class DateTime could not be converted to string
Output for 8.0.0 - 8.0.30
PHP Version: 8.0.0 Caught 'Catchable fatal error' with message: Object of class DateTime could not be converted to string
Output for 8.1.0 - 8.1.34
PHP Version: 8.1.0 Caught 'Catchable fatal error' with message: Object of class DateTime could not be converted to string
Output for 8.2.0 - 8.2.34
PHP Version: 8.2.0 Caught 'Catchable fatal error' with message: Object of class DateTime could not be converted to string
Output for 8.3.0 - 8.3.35
PHP Version: 8.3.0 Caught 'Catchable fatal error' with message: Object of class DateTime could not be converted to string
Output for 8.4.1 - 8.4.26
PHP Version: 8.4.1 Caught 'Catchable fatal error' with message: Object of class DateTime could not be converted to string
Output for 8.5.0 - 8.5.11
PHP Version: 8.5.0 Caught 'Catchable fatal error' with message: Object of class DateTime could not be converted to string

preferences:
31.22 ms | 1143 KiB | 11 Q