3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test1() { $s = microtime(true); for ($i = 0; $i < 1000000; $i++) { } return microtime(true) - $s; } function test2() { $s = microtime(true); $i = 0; while ($i < 1000000) { $i++; } return microtime(true) - $s; } echo test1() . "\n\n"; echo test2() . "\n\n";

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.3.120.0070.02414.68
7.3.110.0040.02814.93
7.3.100.0000.03014.97
7.3.90.0120.01514.46
7.3.80.0130.01915.00
7.3.70.0000.02814.87
7.3.60.0030.03314.94
7.3.50.0100.02314.82
7.3.40.0060.02514.57
7.3.30.0030.03014.90
7.3.20.0100.02316.75
7.3.10.0030.02716.57
7.3.00.0020.02816.63
7.2.240.0030.02615.17
7.2.230.0100.01914.99
7.2.220.0000.02915.18
7.2.210.0030.02715.32
7.2.200.0000.02715.07
7.2.190.0000.03215.23
7.2.180.0030.02614.82
7.2.170.0000.02715.18
7.2.160.0060.02515.02
7.2.150.0070.02017.05
7.2.140.0040.02917.02
7.2.130.0070.02216.95
7.2.120.0090.02216.84
7.2.110.0070.02216.84
7.2.100.0020.02916.97
7.2.90.0050.02616.78
7.2.80.0060.02117.03
7.2.70.0070.02316.76
7.2.60.0020.02717.06
7.2.50.0100.02216.80
7.2.40.0030.02717.06
7.2.30.0020.02516.87
7.2.20.0030.02416.92
7.2.10.0020.03016.86
7.2.00.0050.02816.81
7.1.330.0000.06215.95
7.1.320.0060.05515.80
7.1.310.0100.05215.96
7.1.300.0000.06415.69
7.1.290.0070.05615.79
7.1.280.0130.05515.80
7.1.270.0030.06115.95
7.1.260.0100.05315.92
7.1.250.0050.06215.80
7.1.70.0030.02317.32
7.1.60.0130.04519.39
7.1.50.0100.03716.48
7.1.00.0000.10322.31
7.0.200.0040.02216.79
7.0.140.0030.10021.95
7.0.60.0200.06319.88
7.0.50.0100.11317.85
7.0.40.0100.10320.40
7.0.30.0470.07720.15
7.0.20.0330.05320.06
7.0.10.0030.07020.26
7.0.00.0130.10020.09
5.6.280.0070.15020.90
5.6.210.0070.13320.72
5.6.200.0030.08718.14
5.6.190.0030.08720.54
5.6.180.0230.16320.57
5.6.170.0400.12020.47
5.6.160.0070.13020.50
5.6.150.0100.13018.18
5.6.140.0130.09018.24
5.6.130.0030.07718.15
5.6.120.0030.08021.13
5.6.110.0170.12720.97
5.6.100.0130.12320.89
5.6.90.0000.12020.95
5.6.80.0170.13020.52
5.5.350.0030.08320.41
5.5.340.0070.11017.93
5.5.330.0000.11020.57
5.5.320.0330.12020.34
5.5.310.0500.11320.30
5.5.300.0000.08317.92
5.5.290.0000.09717.98
5.5.280.0130.12720.76
5.5.270.0030.11320.88
5.5.260.0030.12020.65
5.5.250.0070.13720.59
5.5.240.4300.07320.04
5.4.450.0500.11319.64
5.4.440.0730.10719.34
5.4.430.0130.11719.54
5.4.420.0130.11019.21
5.4.410.0000.12019.39
5.4.400.0200.10019.17
5.4.390.0030.13719.03
5.4.380.0300.10018.75
5.4.370.0200.11018.55
5.4.360.0300.14718.53
5.4.350.0270.11018.69
5.4.340.0300.12018.78
5.4.320.0090.07512.50
5.4.310.0110.08012.50
5.4.300.0090.08112.50
5.4.290.0090.07612.50
5.4.280.0090.07712.37
5.4.270.0060.08112.37
5.4.260.0080.10112.37
5.4.250.0050.10512.37
5.4.240.0070.09612.38
5.4.230.0070.08412.37
5.4.220.0130.12412.37
5.4.210.0080.13512.37
5.4.200.0060.12312.37
5.4.190.0140.11712.36
5.4.180.0140.11112.36
5.4.170.0150.11312.37
5.4.160.0120.11912.37
5.4.150.0110.12512.37
5.4.140.0200.17712.05
5.4.130.0050.12012.04
5.4.120.0100.11711.99
5.4.110.0190.11511.99
5.4.100.0190.11411.99
5.4.90.0070.14111.98
5.4.80.0110.12711.99
5.4.70.0110.10111.98
5.4.60.0090.09911.99
5.4.50.0110.09011.98
5.4.40.0070.08011.97
5.4.30.0100.10511.97
5.4.20.0070.09211.97
5.4.10.0050.08811.97
5.4.00.0060.10511.46
5.3.290.0060.10612.80
5.3.280.0100.13012.71
5.3.270.0090.12412.72
5.3.260.0130.13012.72
5.3.250.0080.10912.72
5.3.240.0100.10312.72
5.3.230.0050.11212.71
5.3.220.0080.12212.68
5.3.210.0120.16312.68
5.3.200.0100.13712.68
5.3.190.0120.12612.68
5.3.180.0130.13112.67
5.3.170.0070.09812.67
5.3.160.0090.12312.67
5.3.150.0090.12012.67
5.3.140.0160.15812.66
5.3.130.0100.13012.66
5.3.120.0090.14712.65
5.3.110.0130.14012.66
5.3.100.0120.13512.12
5.3.90.0130.13912.09
5.3.80.0070.14112.08
5.3.70.0110.14212.08
5.3.60.0070.13312.06
5.3.50.0090.12612.01
5.3.40.0110.09712.00
5.3.30.0050.10011.96
5.3.20.0070.11111.75
5.3.10.0040.10011.71
5.3.00.0060.10011.71
5.2.170.0060.1549.20
5.2.160.0090.1579.20
5.2.150.0130.1549.20
5.2.140.0100.1669.20
5.2.130.0150.1459.16
5.2.120.0080.1509.15
5.2.110.0110.1659.16
5.2.100.0080.1579.16
5.2.90.0110.1649.15
5.2.80.0070.1689.16
5.2.70.0120.1609.15
5.2.60.0090.1639.11
5.2.50.0070.1569.08
5.2.40.0110.1649.05
5.2.30.0110.1599.03
5.2.20.0150.1569.02
5.2.10.0090.1508.95
5.2.00.0070.1648.81
5.1.60.0080.1888.10
5.1.50.0080.1868.10
5.1.40.0050.1528.08
5.1.30.0070.1598.42
5.1.20.0080.1788.45
5.1.10.0110.1748.18
5.1.00.0090.1628.18
5.0.50.0120.3606.64
5.0.40.0060.2836.51
5.0.30.0050.2786.32
5.0.20.0060.2266.29
5.0.10.0070.2736.27
5.0.00.0110.3926.26
4.4.90.0080.2894.78
4.4.80.0050.2714.75
4.4.70.0060.2234.75
4.4.60.0060.2754.76
4.4.50.0110.3534.77
4.4.40.0090.2604.71
4.4.30.0050.2204.76
4.4.20.0060.2134.84
4.4.10.0060.2224.85
4.4.00.0050.2344.76
4.3.110.0070.2544.67
4.3.100.0060.3834.67
4.3.90.0070.3614.63
4.3.80.0070.3524.58
4.3.70.0110.3034.63
4.3.60.0060.3244.62
4.3.50.0050.2124.63
4.3.40.0040.2124.54
4.3.30.0040.1973.33
4.3.20.0020.2153.31
4.3.10.0050.2113.27
4.3.00.0100.2938.56

preferences:
38.79 ms | 400 KiB | 5 Q