3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 34324; //echo date('d.m.Y', ''); echo $date = strtotime('2013-07-31 12:34:59'); //$date = date_create('2000-01-01'); echo date_format($date, 'Y-m-d H:i:s');
Output for 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
343241375266899 Fatal error: Uncaught TypeError: date_format(): Argument #1 ($object) must be of type DateTimeInterface, int given in /in/cG6XK:9 Stack trace: #0 /in/cG6XK(9): date_format(1375266899, 'Y-m-d H:i:s') #1 {main} thrown in /in/cG6XK on line 9
Process exited with code 255.
Output for 8.0.13
343241375274099 Fatal error: Uncaught TypeError: date_format(): Argument #1 ($object) must be of type DateTimeInterface, int given in /in/cG6XK:9 Stack trace: #0 /in/cG6XK(9): date_format(1375274099, 'Y-m-d H:i:s') #1 {main} thrown in /in/cG6XK on line 9
Process exited with code 255.
Output for 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
343241375266899 Warning: date_format() expects parameter 1 to be DateTimeInterface, int given in /in/cG6XK on line 9
Output for 7.3.32 - 7.3.33
343241375274099 Warning: date_format() expects parameter 1 to be DateTimeInterface, int given in /in/cG6XK on line 9
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33
343241375266899 Warning: date_format() expects parameter 1 to be DateTimeInterface, integer given in /in/cG6XK on line 9
Output for 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45
343241375266899 Warning: date_format() expects parameter 1 to be DateTime, integer given in /in/cG6XK on line 9
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
343241375266899 Fatal error: Call to undefined function date_format() in /in/cG6XK on line 9
Process exited with code 255.
Output for 4.4.5 - 4.4.9
343241375266899 Fatal error: Call to undefined function: date_format() in /in/cG6XK on line 9
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
343241375266899 Fatal error: Call to undefined function: date_format() in /in/cG6XK on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1
343241375266899 Fatal error: Call to undefined function: date_format() in /in/cG6XK on line 9

preferences:
288.27 ms | 401 KiB | 367 Q