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());

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.0040.00416.86
8.0.100.0040.00416.97
8.0.90.0040.00416.85
8.0.80.0070.01016.96
8.0.70.0040.00417.02
8.0.60.0000.00716.81
8.0.50.0040.00416.95
8.0.30.0120.00617.12
8.0.20.0100.01117.40
8.0.10.0030.00516.86
8.0.00.0150.00616.77
7.4.240.0030.00316.50
7.4.230.0000.00716.44
7.4.220.0100.01016.56
7.4.210.0100.00616.53
7.4.200.0000.00716.36
7.4.160.0130.00316.55
7.4.150.0130.01017.40
7.4.140.0140.00817.86
7.4.130.0140.00816.56
7.4.120.0090.01116.47
7.4.110.0070.01116.76
7.4.100.0170.00716.38
7.4.90.0120.00616.48
7.4.80.0100.01019.39
7.4.70.0070.01716.77
7.4.60.0090.00616.42
7.4.50.0110.00416.35
7.4.40.0080.00816.44
7.4.30.0110.00816.57
7.4.10.0060.01315.07
7.4.00.0080.01014.88
7.3.300.0000.00616.17
7.3.290.0070.00816.31
7.3.280.0130.00416.28
7.3.270.0070.01017.40
7.3.260.0140.01016.34
7.3.250.0100.00716.46
7.3.240.0080.01016.50
7.3.230.0120.00616.54
7.3.210.0120.00416.37
7.3.200.0060.01016.39
7.3.190.0120.00616.61
7.3.180.0030.01316.35
7.3.170.0090.01216.51
7.3.160.0030.01316.52
7.3.130.0070.00714.56
7.3.120.0070.01014.95
7.3.110.0050.00814.77
7.3.100.0080.00614.72
7.3.90.0070.00414.84
7.3.80.0070.00814.85
7.3.70.0050.01014.82
7.3.60.0060.00614.89
7.3.50.0070.00614.83
7.3.40.0040.00614.66
7.3.30.0050.01114.60
7.3.20.0030.01016.68
7.3.10.0050.00616.70
7.3.00.0010.01316.63
7.2.330.0060.01316.45
7.2.320.0130.00616.70
7.2.310.0160.00016.57
7.2.300.0060.01116.50
7.2.290.0060.01216.62
7.2.260.0060.01314.80
7.2.250.0050.01314.98
7.2.240.0080.00814.89
7.2.230.0030.01214.68
7.2.220.0050.00814.84
7.2.210.0060.00814.96
7.2.200.0060.00814.88
7.2.190.0050.00714.92
7.2.180.0030.01414.79
7.2.170.0110.00214.73
7.2.160.0050.00915.02
7.2.150.0030.00716.80
7.2.140.0040.00916.70
7.2.130.0050.01016.79
7.2.120.0080.00816.75
7.2.110.0050.01016.77
7.2.100.0070.00716.84
7.2.90.0110.00316.81
7.2.80.0060.00816.40
7.2.70.0070.00616.86
7.2.60.0060.00616.85
7.2.50.0070.00316.81
7.2.40.0060.00516.70
7.2.30.0050.00816.84
7.2.20.0080.00816.82
7.2.10.0020.01416.68
7.2.00.0050.00917.57
7.1.330.0070.00915.54
7.1.320.0080.00515.72
7.1.310.0100.00415.63
7.1.300.0060.00615.62
7.1.290.0040.00715.43
7.1.280.0030.00915.50
7.1.270.0040.00815.48
7.1.260.0050.00915.74
7.1.250.0070.00515.50
7.1.240.0070.00715.70
7.1.230.0090.00015.43
7.1.220.0080.00615.57
7.1.210.0060.01015.63
7.1.200.0030.00915.59
7.1.190.0000.01315.83
7.1.180.0060.00915.52
7.1.170.0060.00615.66
7.1.160.0080.00615.69
7.1.150.0100.00315.75
7.1.140.0110.00015.75
7.1.130.0070.00715.30
7.1.120.0030.01015.66
7.1.110.0100.00715.77
7.1.100.0030.00916.71
7.1.90.0000.01215.58
7.1.80.0060.01015.65
7.1.70.0050.00916.17
7.1.60.0100.01217.53
7.1.50.0050.01216.22
7.1.40.0040.00415.83
7.1.30.0060.01215.51
7.1.20.0070.01415.79
7.1.10.0120.00615.43
7.1.00.0060.04118.92
7.0.330.0000.01215.27
7.0.320.0070.00715.24
7.0.310.0040.00715.44
7.0.300.0030.00615.02
7.0.290.0040.00715.21
7.0.280.0030.00915.18
7.0.270.0030.00615.18
7.0.260.0100.00715.50
7.0.250.0070.00715.54
7.0.240.0000.01415.33
7.0.230.0060.00615.27
7.0.220.0060.00615.41
7.0.210.0070.01015.30
7.0.200.0100.00316.02
7.0.190.0020.01415.36
7.0.180.0060.00915.27
7.0.170.0070.00715.13
7.0.160.0140.00715.25
7.0.150.0080.01115.48
7.0.140.0100.00315.41
7.0.130.0070.00715.43
7.0.120.0090.00615.44
7.0.110.0060.00615.16
7.0.100.0120.00015.29
7.0.90.0030.01015.02
7.0.80.0070.00715.27
7.0.70.0080.00415.24
7.0.60.0060.04117.52
7.0.50.0020.03016.59
7.0.40.0090.03016.80
7.0.30.0280.02016.66
7.0.20.0130.04316.81
7.0.10.0080.04316.79
7.0.00.0130.03816.57
5.6.400.0030.00914.16
5.6.390.0040.01114.13
5.6.380.0040.01114.33
5.6.370.0060.00314.23
5.6.360.0030.00714.23
5.6.350.0040.00714.41
5.6.340.0040.00714.02
5.6.330.0060.00614.31
5.6.320.0040.01513.99
5.6.310.0060.01014.39
5.6.300.0070.00714.24
5.6.290.0130.00014.07
5.6.280.0020.02617.69
5.6.270.0030.01514.23
5.6.260.0030.00914.14
5.6.250.0040.01114.34
5.6.240.0080.00614.14
5.6.230.0030.01314.45
5.6.220.0060.00614.17
5.6.210.0110.04017.42
5.6.200.0120.02016.16
5.6.190.0130.04117.40
5.6.180.0230.04117.40
5.6.170.0230.03817.50
5.6.160.0110.04317.19
5.6.150.0080.04516.22
5.6.140.0060.02916.16
5.6.130.0120.04016.20
5.6.120.0030.04917.56
5.6.110.0120.03717.60
5.6.100.0080.04117.56
5.6.90.0070.04517.71
5.6.80.0060.04317.26
5.6.70.0070.00714.26
5.6.60.0030.01014.17
5.6.50.0080.00014.09
5.6.40.0100.00714.03
5.6.30.0030.01214.19
5.6.20.0070.01014.09
5.6.10.0000.01114.27
5.6.00.0090.00614.18
5.5.380.0040.01414.18
5.5.370.0070.00714.19
5.5.360.0090.00314.04
5.5.350.2100.03017.31
5.5.340.0080.04116.05
5.5.330.0070.04517.32
5.5.320.0040.03017.33
5.5.310.0280.03317.13
5.5.300.0000.02815.89
5.5.290.0050.03215.99
5.5.280.0080.04517.31
5.5.270.0120.04017.44
5.5.260.0050.04717.24
5.5.250.0040.02417.40
5.5.240.0160.03817.18
5.5.230.0070.01013.77
5.5.220.0030.00714.00
5.5.210.0040.01214.07
5.5.200.0060.00913.82
5.5.190.0030.01313.80
5.5.180.0040.01513.90
5.5.170.0000.01314.20
5.5.160.0000.01213.82
5.5.150.0040.01113.81
5.5.140.0100.00313.98
5.5.130.0040.00414.15
5.5.120.0100.00314.13
5.5.110.0000.01713.89
5.5.100.0030.00614.12
5.5.90.0030.01213.93
5.5.80.0030.00614.08
5.5.70.0100.00613.56
5.5.60.0150.00014.02
5.5.50.0100.00314.11
5.5.40.0060.00914.27
5.5.30.0060.00913.83
5.5.20.0000.01014.16
5.5.10.0060.00613.82
5.5.00.0120.00313.84

preferences:
32.6 ms | 401 KiB | 5 Q