3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace DrummondCentral\Bender\Command; class Command {} 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(''));

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.0.110.0070.00016.97
8.0.100.0000.00717.02
8.0.90.0040.00417.07
8.0.80.0120.00917.12
8.0.70.0070.00016.91
8.0.60.0100.00016.90
8.0.50.0040.00416.80
8.0.30.0060.01217.03
8.0.20.0110.00917.40
8.0.10.0070.00017.03
8.0.00.0100.00916.90
7.4.240.0030.00416.69
7.4.230.0030.00316.62
7.4.220.0110.00716.62
7.4.210.0090.01016.76
7.4.200.0050.00216.61
7.4.160.0090.00616.45
7.4.150.0090.00917.40
7.4.140.0140.00617.86
7.4.130.0110.01116.58
7.4.120.0120.00516.60
7.4.110.0100.00916.82
7.4.100.0030.01416.74
7.4.90.0100.00716.57
7.4.80.0090.01219.39
7.4.70.0080.01216.66
7.4.60.0090.00616.47
7.4.50.0030.01316.72
7.4.40.0100.00716.60
7.4.30.0140.00716.49
7.4.00.0070.01014.92
7.3.300.0030.00316.34
7.3.290.0000.00716.54
7.3.280.0090.00716.50
7.3.270.0070.01017.40
7.3.260.0220.00016.50
7.3.250.0030.01316.57
7.3.240.0110.01116.60
7.3.230.0090.00916.39
7.3.210.0100.00716.66
7.3.200.0100.01016.66
7.3.190.0090.00916.56
7.3.180.0090.01216.41
7.3.170.0060.01016.46
7.3.160.0060.01016.53
7.3.120.0100.01314.93
7.3.110.0060.00914.88
7.3.100.0140.00414.98
7.3.90.0070.00714.86
7.3.80.0000.01314.84
7.3.70.0030.01015.16
7.3.60.0060.01015.06
7.3.50.0090.00614.96
7.3.40.0090.00915.10
7.3.30.0060.00915.06
7.3.20.0040.01416.98
7.3.10.0000.01316.83
7.3.00.0030.01516.78
7.2.330.0120.01217.01
7.2.320.0170.00716.91
7.2.310.0100.00616.68
7.2.300.0130.00316.70
7.2.290.0100.00716.94
7.2.250.0070.01115.34
7.2.240.0070.01015.21
7.2.230.0090.00615.18
7.2.220.0090.00315.09
7.2.210.0000.01815.45
7.2.200.0090.00615.31
7.2.190.0100.00715.33
7.2.180.0040.01115.15
7.2.170.0060.00915.07
7.2.60.0060.00916.96
7.2.00.0030.01219.39
7.1.330.0100.00715.93
7.1.320.0080.00815.87
7.1.310.0040.01215.52
7.1.300.0100.00315.74
7.1.290.0040.01215.93
7.1.280.0000.01115.73
7.1.270.0070.00715.98
7.1.260.0000.01715.73
7.1.200.0040.00715.69
7.1.100.0050.00518.36
7.1.70.0090.00017.43
7.1.60.0090.01519.36
7.1.50.0040.01617.11
7.1.00.0070.07022.36
7.0.200.0030.00516.72
7.0.60.0000.06719.97
7.0.50.0070.05317.99
7.0.40.0030.08020.21
7.0.30.0330.04320.26
7.0.20.0400.04720.15
7.0.10.0070.08720.30
7.0.00.0070.08020.33
5.6.210.0100.05720.63
5.6.200.0070.03718.18
5.6.190.0070.09020.47
5.6.180.0430.05320.52
5.6.170.0370.07720.71
5.6.160.0130.07720.57
5.6.150.0070.07018.18
5.6.140.0070.06018.25
5.6.130.0030.04718.18
5.6.120.0100.08021.14
5.6.110.0100.08021.10
5.6.100.0070.08320.98
5.6.90.0070.08321.09
5.6.80.0270.06720.36
5.5.350.4300.03720.39
5.5.340.0000.04317.94
5.5.330.0130.07720.41
5.5.320.0030.08720.31
5.5.310.0370.07320.30
5.5.300.0100.03317.98
5.5.290.0030.05718.04
5.5.280.0130.08020.78
5.5.270.0130.04720.96
5.5.260.0070.07720.84
5.5.250.0000.05020.50
5.5.240.0200.07020.36

preferences:
31.91 ms | 401 KiB | 5 Q