3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = new \DateTime('2015-05-24 00:00:00'); $time = new \DateTime('0000-00-00 21:22:00'); $pickUpDateTime = new \DateTime(); $pickUpDateTime->setDate($date->format('Y'), $date->format('m'), $date->format('d')); $pickUpDateTime->setTime($time->format('H'), $time->format('i'), $time->format('s')); $now = new DateTime("now"); $interval = date_diff($now, $pickUpDateTime); if ( $v = $interval->d >= 1 ) echo pluralize( $interval->d, 'day' ) ;
based on UaE27
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function pluralize() in /in/eQ5vE:13 Stack trace: #0 {main} thrown in /in/eQ5vE on line 13
Process exited with code 255.
Output for 5.3.21 - 5.6.9, 5.6.11 - 5.6.28
Fatal error: Call to undefined function pluralize() in /in/eQ5vE on line 13
Process exited with code 255.
Output for 5.6.10