3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace Commands; use DrummondCentral\Bender\Command\Command; class HometimeCommand extends Command { public static function getCommand() { return 'hometime'; } public static function getDescription() { return 'Displays the number of hours and minutes until home time.'; } public function handle($message) { date_default_timezone_set('Europe/London'); $workend = strtotime('17:30'); $diff = $workend - time(); $hometime = gmdate("H:i:s", $diff); if (time() === $workend) { return 'It\'s home time! Rejoice!'; } return "Home time is in " . $hometime . "."; } } $command = new HometimeCommand(); var_dump($command->handle());
Output for 7.0.0 - 7.2.0
Fatal error: Class 'DrummondCentral\Bender\Command\Command' not found in /in/XhFAQ on line 7
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Fatal error: Class 'DrummondCentral\Bender\Command\Command' not found in /in/XhFAQ on line 8
Process exited with code 255.