3v4l.org

run code in 300+ PHP versions simultaneously
<?php // The original function function a($i){$e=microtime(1)+$i;while(microtime(1)<$e);} // Use 'for' instead of 'while' function b($i){for($e=microtime(1)+$i;microtime(1)<$e;);} // Extract 'microtime' into a variable; requires error_reporting(0) to suppress the notice function c($i){for($f=microtime,$e=$f(1)+$i;$f(1)<$e;);} // Cram the initialization of $f into its first use // PHP 7 only; it doesn't compile on older versions function d($i){for($e=($f=microtime)(1)+$i;$f(1)<$e;);}

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)
7.4.00.0040.01414.43
7.3.120.0100.00614.40
7.3.110.0070.00714.62
7.3.100.0060.00914.43
7.3.90.0000.01014.73
7.3.80.0030.01414.95
7.3.70.0000.01414.73
7.3.60.0000.01414.69
7.3.50.0000.01414.61
7.3.40.0100.00414.57
7.3.30.0040.01114.67
7.3.20.0100.00316.42
7.3.10.0060.00616.43
7.3.00.0120.00416.24
7.2.250.0060.01014.78
7.2.240.0070.01614.97
7.2.230.0070.00414.98
7.2.220.0030.01014.43
7.2.210.0030.01214.98
7.2.200.0070.01014.60
7.2.190.0090.00614.73
7.2.180.0070.00714.50
7.2.170.0040.00814.86
7.2.130.0180.00616.20
7.2.120.0250.00316.21
7.2.110.0230.00016.30
7.2.100.0180.00316.62
7.2.90.0050.01016.15
7.2.80.0250.00416.32
7.2.70.0200.01016.61
7.2.60.0090.00616.54
7.2.50.0160.00616.33
7.2.40.0120.01616.37
7.2.30.0180.00616.10
7.2.20.0190.00416.25
7.2.10.0080.01216.36
7.2.00.0100.00717.54
7.1.330.0000.01315.50
7.1.320.0060.00315.66
7.1.310.0040.01115.15
7.1.300.0000.01515.70
7.1.290.0030.01015.38
7.1.280.0070.00715.32
7.1.270.0030.00915.54
7.1.260.0030.00615.38
7.1.250.0120.00615.55
7.1.70.0000.01116.84
7.1.60.0030.01719.42
7.1.50.0060.01616.86
7.1.00.0070.07322.48
7.0.200.0670.00614.54
7.0.60.0070.06020.06
7.0.50.0030.04017.85
7.0.40.0170.08019.96
7.0.30.0170.04320.12
7.0.20.0230.08720.24
7.0.10.0030.09720.33
7.0.00.0070.04320.25
5.6.280.0000.07321.07
5.6.210.0070.03720.77
5.6.200.0000.04318.22
5.6.190.0100.07020.61
5.6.180.0230.04720.48
5.6.170.0370.04020.57
5.6.160.0100.08320.39
5.6.150.0070.08318.18
5.6.140.0070.03718.14
5.6.130.0070.07718.18
5.6.120.0000.05021.01
5.6.110.0070.08021.10
5.6.100.0130.08020.99
5.6.90.0100.06720.98
5.6.80.0030.08320.36
5.5.350.0000.05720.44
5.5.340.0000.08317.99
5.5.330.0000.04320.27
5.5.320.0300.04020.35
5.5.310.0130.04320.28
5.5.300.0230.03017.98
5.5.290.0030.04317.96
5.5.280.0100.08020.91
5.5.270.0130.05720.80
5.5.260.0000.05320.80
5.5.250.0030.08320.63
5.5.240.0270.07020.19
5.4.450.0300.02719.46
5.4.440.0270.06719.39
5.4.430.0200.05319.41
5.4.420.0330.06019.30
5.4.410.0430.05719.35
5.4.400.0270.07319.31
5.4.390.0230.05319.22
5.4.380.0230.04319.32
5.4.370.0330.05319.09
5.4.360.0230.05719.24
5.4.350.0200.04319.15
5.4.340.0270.06318.98
5.4.320.0200.03718.88
5.4.310.0200.03719.08
5.4.300.0300.03719.15
5.4.290.0270.07718.87
5.4.280.0300.06019.08
5.4.270.0270.06019.31
5.4.260.0330.04318.98
5.4.250.0370.06019.23
5.4.240.0300.04319.05
5.4.230.0300.06719.09
5.4.220.0330.05318.89
5.4.210.0230.03718.98
5.4.200.0270.06018.86
5.4.190.0230.03719.30
5.4.180.0270.03719.30
5.4.170.0270.04719.08
5.4.160.0230.07718.86
5.4.150.0300.07319.15
5.4.140.0270.07316.57
5.4.130.0370.06016.42
5.4.120.0230.05316.72
5.4.110.0330.06716.60
5.4.100.0400.05716.51
5.4.90.0330.06316.33
5.4.80.0430.02716.49
5.4.70.0300.06016.33
5.4.60.0270.07316.53
5.4.50.0400.04016.25
5.4.40.0300.06716.55
5.4.30.0370.05316.48
5.4.20.0300.04316.53
5.4.10.0300.06316.34
5.4.00.0300.06715.76
5.3.290.0170.04014.57
5.3.280.0330.07014.53
5.3.270.0200.05714.61
5.3.260.0270.07714.52
5.3.250.0330.04314.54
5.3.240.0230.07314.69
5.3.230.0270.06714.50
5.3.220.0400.06714.48
5.3.210.0330.06014.58
5.3.200.0300.05314.50
5.3.190.0330.06014.59
5.3.180.0270.05014.69
5.3.170.0400.06314.73
5.3.160.0400.06314.79
5.3.150.0300.07014.66
5.3.140.0300.04014.49
5.3.130.0400.06314.53
5.3.120.0300.04714.64
5.3.110.0200.05314.72
5.3.100.0300.06714.20
5.3.90.0300.03014.00
5.3.80.0330.05714.07
5.3.70.0300.05313.95
5.3.60.0300.05714.02
5.3.50.0330.06313.88
5.3.40.0230.05013.87
5.3.30.0270.06013.83
5.3.20.0270.07313.62
5.3.10.0270.07013.82
5.3.00.0300.07313.55
5.2.170.0370.04711.13
5.2.160.0300.03711.08
5.2.150.0170.06711.32
5.2.140.0230.06311.11
5.2.130.0270.05711.27
5.2.120.0270.05711.04
5.2.110.0230.05011.07
5.2.100.0270.04011.12
5.2.90.0270.05711.16
5.2.80.0230.06011.34
5.2.70.0270.05311.06
5.2.60.0170.04310.96
5.2.50.0230.02311.18
5.2.40.0130.03010.92
5.2.30.0130.03310.94
5.2.20.0130.02711.19
5.2.10.0130.03010.84
5.2.00.0130.02710.63
5.1.60.0100.02710.16
5.1.50.0200.02310.02
5.1.40.0170.0209.96
5.1.30.0130.03010.26
5.1.20.0170.02310.33
5.1.10.0170.02710.23
5.1.00.0100.03710.31
5.0.50.0070.0209.55
5.0.40.0100.0179.55
5.0.30.0130.0309.55
5.0.20.0070.0209.55
5.0.10.0070.0209.55
5.0.00.0070.0309.55
4.4.90.0100.0339.55
4.4.80.0070.0209.55
4.4.70.0030.0209.55
4.4.60.0070.0179.55
4.4.50.0100.0139.55
4.4.40.0070.0239.55
4.4.30.0070.0179.55
4.4.20.0030.0239.55
4.4.10.0030.0209.55
4.4.00.0030.0279.55
4.3.110.0030.0179.55
4.3.100.0030.0179.55
4.3.90.0030.0179.55
4.3.80.0070.0239.55
4.3.70.0070.0139.55
4.3.60.0070.0139.55
4.3.50.0070.0139.55
4.3.40.0070.0239.55
4.3.30.0030.0139.55
4.3.20.0000.0179.55
4.3.10.0030.0179.55
4.3.00.0030.0139.55

preferences:
46.61 ms | 400 KiB | 5 Q