3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('America/Montevideo'); $hoy = date("d/m/Y H:i:s"); $mañana = date("d/m/Y H:i:s",strtotime("+1 day", $hoy)); echo $hoy; echo "\n"; echo $mañana; /*if(isWeekend($hoy)){ echo "es finde"; }else{ echo "no es finde"; }*/ //$weekDay = date('w', strtotime($hoy)); function isWeekend($date) { $weekDay = date('w', strtotime($date)); return ($weekDay == 0 || $weekDay == 6); }
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
Fatal error: Uncaught TypeError: strtotime(): Argument #2 ($baseTimestamp) must be of type ?int, string given in /in/tjc1D:4 Stack trace: #0 /in/tjc1D(4): strtotime('+1 day', '07/10/2015 15:5...') #1 {main} thrown in /in/tjc1D on line 4
Process exited with code 255.
Output for 5.6.13 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.5 - 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/tjc1D on line 4 07/10/2015 15:59:12 01/01/1970 21:00:07
Output for 7.3.32 - 7.3.33
07/10/2015 15:59:12 01/01/1970 21:00:07
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.12
Notice: A non well formed numeric value encountered in /in/tjc1D on line 4 07/10/2015 16:59:12 01/01/1970 21:00:07

preferences:
267.63 ms | 402 KiB | 270 Q