3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fecha_ingreso = strtotime('2014-05-20'); $fecha_egreso = strtotime('2014-05-22'); $noches = floor(($fecha_egreso - $fecha_ingeso) / 3600 / 24); echo $noches;

preferences:
34.12 ms | 402 KiB | 5 Q