3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace Commands; class HometimeCommand { 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());
based on XhFAQ
Output for 7.1.0 - 7.2.0
Fatal error: Uncaught ArgumentCountError: Too few arguments to function Commands\HometimeCommand::handle(), 0 passed in /in/8ianp on line 36 and exactly 1 expected in /in/8ianp:17 Stack trace: #0 /in/8ianp(36): Commands\HometimeCommand->handle() #1 {main} thrown in /in/8ianp on line 17
Process exited with code 255.
Output for 5.6.28, 7.0.20
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 21:12:14."
Output for 7.0.6
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 23:36:38."
Output for 7.0.5
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 11:12:23."
Output for 7.0.4
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 23:23:02."
Output for 7.0.3
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 22:10:44."
Output for 7.0.2
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 16:03:20."
Output for 7.0.1
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 12:29:22."
Output for 7.0.0
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 10:33:40."
Output for 5.6.21
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 04:27:42."
Output for 5.6.20
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 12:12:54."
Output for 5.6.19
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 15:12:03."
Output for 5.6.18
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 06:25:30."
Output for 5.6.17
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 18:49:03."
Output for 5.6.16
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 09:46:18."
Output for 5.6.15
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 08:55:45."
Output for 5.6.14
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 07:05:51."
Output for 5.6.13
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 02:37:51."
Output for 5.6.12
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 12:09:49."
Output for 5.6.11
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 05:46:30."
Output for 5.6.10
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 03:44:19."
Output for 5.6.9
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 22:34:25."
Output for 5.6.8
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 13:41:26."
Output for 5.5.35
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 20:27:33."
Output for 5.5.34
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 10:01:25."
Output for 5.5.33
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 12:25:32."
Output for 5.5.32
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 02:33:24."
Output for 5.5.31
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 15:45:45."
Output for 5.5.30
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 07:01:55."
Output for 5.5.29
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 12:16:29."
Output for 5.5.28
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 08:55:29."
Output for 5.5.27
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 07:10:00."
Output for 5.5.26
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 01:01:16."
Output for 5.5.25
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 18:04:55."
Output for 5.5.24
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 11:36:19."
Output for 5.4.45
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 21:12:10."
Output for 5.4.44
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 21:12:09."
Output for 5.4.43
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 21:12:08."
Output for 5.4.41 - 5.4.42
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 21:12:07."
Output for 5.4.40
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 21:12:06."
Output for 5.4.38 - 5.4.39
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 21:12:05."
Output for 5.4.36 - 5.4.37
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 21:12:04."
Output for 5.4.34 - 5.4.35
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 21:12:03."
Output for 5.3.29, 5.4.31 - 5.4.32
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 21:12:02."
Output for 5.4.28 - 5.4.30
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 21:12:01."
Output for 5.4.25 - 5.4.27
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 21:12:00."
Output for 5.3.28, 5.4.23 - 5.4.24
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 21:11:59."
Output for 5.4.20 - 5.4.22
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 21:11:58."
Output for 5.3.27, 5.4.17 - 5.4.19
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 21:11:57."
Output for 5.3.23 - 5.3.26, 5.4.13 - 5.4.16
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 21:11:56."
Output for 5.3.20 - 5.3.22, 5.4.9 - 5.4.12
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 21:11:55."
Output for 5.3.19
Warning: Missing argument 1 for Commands\HometimeCommand::handle(), called in /in/8ianp on line 36 and defined in /in/8ianp on line 17 string(25) "Home time is in 21:11:54."