3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(date_format(strtotime("10.12.2015"), "YYYY-mm-dd")); var_dump(strtotime("2015-12-10"));
Output for 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught TypeError: date_format(): Argument #1 ($object) must be of type DateTimeInterface, int given in /in/8feRY:3 Stack trace: #0 /in/8feRY(3): date_format(1449702000, 'YYYY-mm-dd') #1 {main} thrown in /in/8feRY on line 3
Process exited with code 255.
Output for 8.0.13
Fatal error: Uncaught TypeError: date_format(): Argument #1 ($object) must be of type DateTimeInterface, int given in /in/8feRY:3 Stack trace: #0 /in/8feRY(3): date_format(1449705600, 'YYYY-mm-dd') #1 {main} thrown in /in/8feRY on line 3
Process exited with code 255.
Output for 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
Warning: date_format() expects parameter 1 to be DateTimeInterface, int given in /in/8feRY on line 3 bool(false) int(1449702000)
Output for 7.3.32 - 7.3.33
Warning: date_format() expects parameter 1 to be DateTimeInterface, int given in /in/8feRY on line 3 bool(false) int(1449705600)
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33
Warning: date_format() expects parameter 1 to be DateTimeInterface, integer given in /in/8feRY on line 3 bool(false) int(1449702000)

preferences:
232.73 ms | 402 KiB | 330 Q