3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* for ($i = 0; $i < 366; ++$i) { echo $i, "\t", (DateTime::createFromFormat('z', $i))->format('Y-m-d'), "\n"; } */ for ($i = 365; $i < 730; ++$i) { $dt = DateTime::createFromFormat('z', $i); echo $dt->format('Y-m-d'), "\n"; }
Output for 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Call to a member function format() on false in /in/h3viG:9 Stack trace: #0 {main} thrown in /in/h3viG on line 9
Process exited with code 255.
Output for 8.0.10 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
Fatal error: Uncaught Error: Call to a member function format() on bool in /in/h3viG:9 Stack trace: #0 {main} thrown in /in/h3viG on line 9
Process exited with code 255.
Output for 5.4.2 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.9
-99998-01-01 -99998-01-02 -99998-01-03 -99998-01-04 -99998-01-05 -99998-01-06 -99998-01-07 -99998-01-08 -99998-01-09 -99998-01-10 -99998-01-11 -99998-01-12 -99998-01-13 -99998-01-14 -99998-01-15 -99998-01-16 -99998-01-17 -99998-01-18 -99998-01-19 -99998-01-20 -99998-01-21 -99998-01-22 -99998-01-23 -99998-01-24 -99998-01-25 -99998-01-26 -99998-01-27 -99998-01-28 -99998-01-29 -99998-01-30 -99998-01-31 -99998-02-01 -99998-02-02 -99998-02-03 -99998-02-04 -99998-02-05 -99998-02-06 -99998-02-07 -99998-02-08 -99998-02-09 -99998-02-10 -99998-02-11 -99998-02-12 -99998-02-13 -99998-02-14 -99998-02-15 -99998-02-16 -99998-02-17 -99998-02-18 -99998-02-19 -99998-02-20 -99998-02-21 -99998-02-22 -99998-02-23 -99998-02-24 -99998-02-25 -99998-02-26 -99998-02-27 -99998-02-28 -99998-03-01 -99998-03-02 -99998-03-03 -99998-03-04 -99998-03-05 -99998-03-06 -99998-03-07 -99998-03-08 -99998-03-09 -99998-03-10 -99998-03-11 -99998-03-12 -99998-03-13 -99998-03-14 -99998-03-15 -99998-03-16 -99998-03-17 -99998-03-18 -99998-03-19 -99998-03-20 -99998-03-21 -99998-03-22 -99998-03-23 -99998-03-24 -99998-03-25 -99998-03-26 -99998-03-27 -99998-03-28 -99998-03-29 -99998-03-30 -99998-03-31 -99998-04-01 -99998-04-02 -99998-04-03 -99998-04-04 -99998-04-05 -99998-04-06 -99998-04-07 -99998-04-08 -99998-04-09 -99998-04-10 -99998-04-11 -99998-04-12 -99998-04-13 -99998-04-14 -99998-04-15 -99998-04-16 -99998-04-17 -99998-04-18 -99998-04-19 -99998-04-20 -99998-04-21 -99998-04-22 -99998-04-23 -99998-04-24 -99998-04-25 -99998-04-26 -99998-04-27 -99998-04-28 -99998-04-29 -99998-04-30 -99998-05-01 -99998-05-02 -99998-05-03 -99998-05-04 -99998-05-05 -99998-05-06 -99998-05-07 -99998-05-08 -99998-05-09 -99998-05-10 -99998-05-11 -99998-05-12 -99998-05-13 -99998-05-14 -99998-05-15 -99998-05-16 -99998-05-17 -99998-05-18 -99998-05-19 -99998-05-20 -99998-05-21 -99998-05-22 -99998-05-23 -99998-05-24 -99998-05-25 -99998-05-26 -99998-05-27 -99998-05-28 -99998-05-29 -99998-05-30 -99998-05-31 -99998-06-01 -99998-06-02 -99998-06-03 -99998-06-04 -99998-06-05 -99998-06-06 -99998-06-07 -99998-06-08 -99998-06-09 -99998-06-10 -99998-06-11 -99998-06-12 -99998-06-13 -99998-06-14 -99998-06-15 -99998-06-16 -99998-06-17 -99998-06-18 -99998-06-19 -99998-06-20 -99998-06-21 -99998-06-22 -99998-06-23 -99998-06-24 -99998-06-25 -99998-06-26 -99998-06-27 -99998-06-28 -99998-06-29 -99998-06-30 -99998-07-01 -99998-07-02 -99998-07-03 -99998-07-04 -99998-07-05 -99998-07-06 -99998-07-07 -99998-07-08 -99998-07-09 -99998-07-10 -99998-07-11 -99998-07-12 -99998-07-13 -99998-07-14 -99998-07-15 -99998-07-16 -99998-07-17 -99998-07-18 -99998-07-19 -99998-07-20 -99998-07-21 -99998-07-22 -99998-07-23 -99998-07-24 -99998-07-25 -99998-07-26 -99998-07-27 -99998-07-28 -99998-07-29 -99998-07-30 -99998-07-31 -99998-08-01 -99998-08-02 -99998-08-03 -99998-08-04 -99998-08-05 -99998-08-06 -99998-08-07 -99998-08-08 -99998-08-09 -99998-08-10 -99998-08-11 -99998-08-12 -99998-08-13 -99998-08-14 -99998-08-15 -99998-08-16 -99998-08-17 -99998-08-18 -99998-08-19 -99998-08-20 -99998-08-21 -99998-08-22 -99998-08-23 -99998-08-24 -99998-08-25 -99998-08-26 -99998-08-27 -99998-08-28 -99998-08-29 -99998-08-30 -99998-08-31 -99998-09-01 -99998-09-02 -99998-09-03 -99998-09-04 -99998-09-05 -99998-09-06 -99998-09-07 -99998-09-08 -99998-09-09 -99998-09-10 -99998-09-11 -99998-09-12 -99998-09-13 -99998-09-14 -99998-09-15 -99998-09-16 -99998-09-17 -99998-09-18 -99998-09-19 -99998-09-20 -99998-09-21 -99998-09-22 -99998-09-23 -99998-09-24 -99998-09-25 -99998-09-26 -99998-09-27 -99998-09-28 -99998-09-29 -99998-09-30 -99998-10-01 -99998-10-02 -99998-10-03 -99998-10-04 -99998-10-05 -99998-10-06 -99998-10-07 -99998-10-08 -99998-10-09 -99998-10-10 -99998-10-11 -99998-10-12 -99998-10-13 -99998-10-14 -99998-10-15 -99998-10-16 -99998-10-17 -99998-10-18 -99998-10-19 -99998-10-20 -99998-10-21 -99998-10-22 -99998-10-23 -99998-10-24 -99998-10-25 -99998-10-26 -99998-10-27 -99998-10-28 -99998-10-29 -99998-10-30 -99998-10-31 -99998-11-01 -99998-11-02 -99998-11-03 -99998-11-04 -99998-11-05 -99998-11-06 -99998-11-07 -99998-11-08 -99998-11-09 -99998-11-10 -99998-11-11 -99998-11-12 -99998-11-13 -99998-11-14 -99998-11-15 -99998-11-16 -99998-11-17 -99998-11-18 -99998-11-19 -99998-11-20 -99998-11-21 -99998-11-22 -99998-11-23 -99998-11-24 -99998-11-25 -99998-11-26 -99998-11-27 -99998-11-28 -99998-11-29 -99998-11-30 -99998-12-01 -99998-12-02 -99998-12-03 -99998-12-04 -99998-12-05 -99998-12-06 -99998-12-07 -99998-12-08 -99998-12-09 -99998-12-10 -99998-12-11 -99998-12-12 -99998-12-13 -99998-12-14 -99998-12-15 -99998-12-16 -99998-12-17 -99998-12-18 -99998-12-19 -99998-12-20 -99998-12-21 -99998-12-22 -99998-12-23 -99998-12-24 -99998-12-25 -99998-12-26 -99998-12-27 -99998-12-28 -99998-12-29 -99998-12-30 -99998-12-31

preferences:
252.15 ms | 415 KiB | 271 Q