3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dt = new DateTime('now'); var_dump($dt->format('0000-00-00 00:00:00', '+00:00'));
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
Fatal error: Uncaught ArgumentCountError: DateTime::format() expects exactly 1 argument, 2 given in /in/3HGeS:5 Stack trace: #0 /in/3HGeS(5): DateTime->format('0000-00-00 00:0...', '+00:00') #1 {main} thrown in /in/3HGeS on line 5
Process exited with code 255.
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.38, 7.0.0 - 7.0.31, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Warning: DateTime::format() expects exactly 1 parameter, 2 given in /in/3HGeS on line 5 bool(false)

preferences:
213.94 ms | 403 KiB | 324 Q