3v4l.org

run code in 150+ 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 5.1.0 - 5.6.25, 7.0.0 - 7.1.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: 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 hhvm-3.12.0
Notice: Undefined variable: reserva in /in/vrpE2 on line 3 Notice: Cannot access property on non-object in /in/vrpE2 on line 3 Warning: strtotime() expects parameter 1 to be string, null given in /in/vrpE2 on line 3 Notice: Undefined variable: reserva in /in/vrpE2 on line 4 Notice: Cannot access property on non-object in /in/vrpE2 on line 4 Warning: strtotime() expects parameter 1 to be string, null given 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 hhvm-3.10.0
Notice: Undefined variable: reserva in /in/vrpE2 on line -1 Notice: Cannot access property on non-object in /in/vrpE2 on line -1 Notice: Undefined variable: reserva in /in/vrpE2 on line -1 Notice: Cannot access property on non-object in /in/vrpE2 on line -1 Notice: Undefined variable: fecha_ingeso in /in/vrpE2 on line -1 Notice: Undefined variable: noche in /in/vrpE2 on line -1
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