3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('America/Montevideo'); $hoy = date('d-m-Y H:i:s'); $hoystr = strtotime($hoy); $mañana = date('d-m-Y H:i:s',strtotime('+1 day', $hoystr)); /*echo $hoy; echo "\n"; echo $mañana; echo "\n";*/ $time = strtotime(date('H:i',$hoystr)); $inicio = strtotime(date('H:i','09:00:00')); $fin = strtotime(date('H:i','17:00:00')); echo "hora de ingreso: ".date('H:i',$hoystr); echo "\n"; echo "hora comienzo atencion: 09:00"; echo "\n"; $res = 'no'; $res2 = 'no'; if($time>$inicio){ $res = 'si'; } if($time<$fin){ $res = 'si'; } echo "es mayor la hora de ingreso que la de inicio atencion :".$res; echo "\n"; echo "es menor la hora de ingreso que la de fin atencion :".$res2;
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: date(): Argument #2 ($timestamp) must be of type ?int, string given in /in/rc0U9:12 Stack trace: #0 /in/rc0U9(12): date('H:i', '09:00:00') #1 {main} thrown in /in/rc0U9 on line 12
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
49.58 ms | 401 KiB | 8 Q