3v4l.org

run code in 300+ PHP versions simultaneously
<?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 8.0.0 - 8.0.11
Fatal error: Uncaught Error: Class "DrummondCentral\Bender\Command\Command" not found in /in/XhFAQ:7 Stack trace: #0 {main} thrown in /in/XhFAQ on line 7
Process exited with code 255.
Output for 7.3.0 - 7.3.30, 7.4.0 - 7.4.24
Fatal error: Uncaught Error: Class 'DrummondCentral\Bender\Command\Command' not found in /in/XhFAQ:7 Stack trace: #0 {main} thrown in /in/XhFAQ on line 7
Process exited with code 255.
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33
Fatal error: Class 'DrummondCentral\Bender\Command\Command' not found in /in/XhFAQ on line 7
Process exited with code 255.
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
Fatal error: Class 'DrummondCentral\Bender\Command\Command' not found in /in/XhFAQ on line 8
Process exited with code 255.

preferences:
170.54 ms | 402 KiB | 245 Q