3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = '2014-01-15'; $daysbefor1979 = '25568'; $start = strtotime("1900-01-01"); $diff = ($date - $start); $days = ($diff / 86400); echo date('Y-m-d', jdtounix(gregoriantojd(12, 31, 1899) + 42088)).PHP_EOL; echo round(($daysbefor1979+$days), 0);
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Warning: A non-numeric value encountered in /in/19srQ on line 6 Fatal error: Uncaught Error: Call to undefined function jdtounix() in /in/19srQ:9 Stack trace: #0 {main} thrown in /in/19srQ on line 9
Process exited with code 255.
Output for 7.1.20, 7.2.6 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.33
Notice: A non well formed numeric value encountered in /in/19srQ on line 6 Fatal error: Uncaught Error: Call to undefined function jdtounix() in /in/19srQ:9 Stack trace: #0 {main} thrown in /in/19srQ on line 9
Process exited with code 255.
Output for 7.3.32 - 7.3.33
Fatal error: Uncaught Error: Call to undefined function jdtounix() in /in/19srQ:9 Stack trace: #0 {main} thrown in /in/19srQ on line 9
Process exited with code 255.
Output for 7.1.0 - 7.1.7, 7.2.0
Notice: A non well formed numeric value encountered in /in/19srQ on line 6 2015-03-26 51135
Output for 5.5.0 - 5.5.37, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20
2015-03-26 51135

preferences:
149.37 ms | 402 KiB | 218 Q