3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $fecha_ingreso = strtotime($reserva->fecha_ingreso); $fecha_egreso = strtotime($reserva->fecha_egreso); $noches = floor(($fecha_egreso - $fecha_ingeso) / 3600 / 24); echo $noche;
Output for 7.2.0
Notice: Undefined variable: reserva in /in/vrpE2 on line 3 Notice: Trying to get property 'fecha_ingreso' of non-object in /in/vrpE2 on line 3 Notice: Undefined variable: reserva in /in/vrpE2 on line 4 Notice: Trying to get property 'fecha_egreso' of non-object in /in/vrpE2 on line 4 Notice: Undefined variable: fecha_ingeso in /in/vrpE2 on line 5 Notice: Undefined variable: noche in /in/vrpE2 on line 7
Output for 5.1.0 - 7.1.10
Notice: Undefined variable: reserva in /in/vrpE2 on line 3 Notice: Trying to get property of non-object in /in/vrpE2 on line 3 Notice: Undefined variable: reserva in /in/vrpE2 on line 4 Notice: Trying to get property of non-object in /in/vrpE2 on line 4 Notice: Undefined variable: fecha_ingeso in /in/vrpE2 on line 5 Notice: Undefined variable: noche in /in/vrpE2 on line 7
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: reserva in /in/vrpE2 on line 3 Notice: Trying to get property of non-object in /in/vrpE2 on line 3 Warning: strtotime(): Called with an empty time parameter. in /in/vrpE2 on line 3 Notice: Undefined variable: reserva in /in/vrpE2 on line 4 Notice: Trying to get property of non-object in /in/vrpE2 on line 4 Warning: strtotime(): Called with an empty time parameter. in /in/vrpE2 on line 4 Notice: Undefined variable: fecha_ingeso in /in/vrpE2 on line 5 Notice: Undefined variable: noche in /in/vrpE2 on line 7
Output for 5.0.1 - 5.0.3
Notice: Undefined variable: reserva in /in/vrpE2 on line 3 Notice: Trying to get property of non-object in /in/vrpE2 on line 3 Warning: strtotime(): Called with an empty time parameter. in /in/vrpE2 on line 3 Notice: Undefined variable: reserva in /in/vrpE2 on line 4 Notice: Trying to get property of non-object in /in/vrpE2 on line 4 Warning: strtotime(): Called with an empty time parameter. in /in/vrpE2 on line 4 Notice: Undefined variable: fecha_ingeso in /in/vrpE2 on line 5 Notice: Undefined variable: noche in /in/vrpE2 on line 7
Output for 5.0.0
Notice: Undefined variable: reserva in /in/vrpE2 on line 3 Notice: Trying to get property of non-object in /in/vrpE2 on line 3 Notice: strtotime(): Called with empty time parameter in /in/vrpE2 on line 3 Notice: Undefined variable: reserva in /in/vrpE2 on line 4 Notice: Trying to get property of non-object in /in/vrpE2 on line 4 Notice: strtotime(): Called with empty time parameter in /in/vrpE2 on line 4 Notice: Undefined variable: fecha_ingeso in /in/vrpE2 on line 5 Notice: Undefined variable: noche in /in/vrpE2 on line 7
Output for 4.3.2 - 4.4.9
Notice: Undefined variable: reserva in /in/vrpE2 on line 3 Notice: strtotime(): Called with empty time parameter in /in/vrpE2 on line 3 Notice: Undefined variable: reserva in /in/vrpE2 on line 4 Notice: strtotime(): Called with empty time parameter in /in/vrpE2 on line 4 Notice: Undefined variable: fecha_ingeso in /in/vrpE2 on line 5 Notice: Undefined variable: noche in /in/vrpE2 on line 7
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: reserva in /in/vrpE2 on line 3 Notice: strtotime() [http://www.php.net/function.strtotime]: Called with empty time parameter in /in/vrpE2 on line 3 Notice: Undefined variable: reserva in /in/vrpE2 on line 4 Notice: strtotime() [http://www.php.net/function.strtotime]: Called with empty time parameter in /in/vrpE2 on line 4 Notice: Undefined variable: fecha_ingeso in /in/vrpE2 on line 5 Notice: Undefined variable: noche in /in/vrpE2 on line 7