3v4l.org

run code in 300+ PHP versions simultaneously
<?php // bench static method $starttime = microtime(true); for ($i = 0; $i< 10*1000*1000; $i++) SomeClass::doTest($i); echo "Static Time: " , (microtime(true)-$starttime) , " ms\n"; // bench object method $starttime = microtime(true); for ($i = 0; $i< 10*1000*1000; $i++) $someObj->doTest($i); echo "Object Time: " , (microtime(true)-$starttime) , " ms\n"; // bench function $starttime = microtime(true); for ($i = 0; $i< 10*1000*1000; $i++) something_doTest($i); echo "Function Time: " , (microtime(true)-$starttime) , " ms\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.4.00.0070.01014.95
7.3.120.0030.01614.86
7.3.110.0100.01014.95
7.3.100.0000.01814.73
7.3.90.0060.00914.90
7.3.80.0090.00914.98
7.3.70.0040.01114.50
7.3.60.0060.00914.86
7.3.50.0000.01114.88
7.3.40.0090.00314.95
7.3.30.0040.01114.89
7.3.20.0060.01016.64
7.3.10.0070.00716.58
7.3.00.0090.00616.61
7.2.250.0130.00615.00
7.2.240.0070.01415.11
7.2.230.0040.01114.82
7.2.220.0070.01114.99
7.2.210.0090.00915.26
7.2.200.0090.00315.00
7.2.190.0070.01115.03
7.2.180.0030.01015.21
7.2.170.0090.00614.87
7.2.160.0110.00315.10
7.2.150.0060.00816.71
7.2.140.0070.00716.83
7.2.130.0100.00617.04
7.2.120.0030.01016.66
7.2.110.0000.01116.70
7.2.100.0110.00316.95
7.2.90.0070.00716.97
7.2.80.0170.00016.98
7.2.70.0110.00317.02
7.2.60.0030.00716.79
7.2.50.0070.01016.72
7.2.40.0070.00716.98
7.2.30.0040.01116.81
7.2.20.0070.00717.03
7.2.10.0060.00616.93
7.2.00.0060.00817.92
7.1.330.0070.01015.66
7.1.320.0040.00815.84
7.1.310.0030.01415.71
7.1.300.0000.01415.54
7.1.290.0070.00715.72
7.1.280.0040.00715.68
7.1.270.0030.01015.79
7.1.260.0100.00715.63
7.1.250.0000.01315.73
7.1.240.0060.01015.69
7.1.230.0030.00915.86
7.1.220.0070.00715.80
7.1.210.0050.00515.59
7.1.200.0060.00915.74
7.1.190.0070.00415.84
7.1.180.0030.00615.73
7.1.170.0030.01015.59
7.1.160.0030.01015.83
7.1.150.0090.00415.75
7.1.140.0060.00315.60
7.1.130.0130.00315.75
7.1.120.0000.01415.89
7.1.110.0070.00715.80
7.1.100.0000.01515.71
7.1.90.0070.01015.70
7.1.80.0070.00715.71
7.1.70.0050.00916.31
7.1.60.0100.00817.88
7.1.50.0070.01016.20
7.1.40.0000.01315.66
7.1.30.0060.00915.85
7.1.20.0040.00715.84
7.1.10.0030.01015.78
7.1.00.0030.04319.14
7.0.330.0030.00715.39
7.0.320.0060.00615.41
7.0.310.0030.00715.42
7.0.300.0070.00315.08
7.0.290.0130.00015.32
7.0.280.0030.00715.21
7.0.270.0080.00815.29
7.0.260.0000.01315.34
7.0.250.0030.00615.28
7.0.240.0040.01115.36
7.0.230.0060.00615.23
7.0.220.0030.00915.49
7.0.210.0070.00715.07
7.0.200.0020.00716.04
7.0.190.0090.00615.05
7.0.180.0100.00615.30
7.0.170.0110.00415.44
7.0.160.0070.00615.44
7.0.150.0000.00815.43
7.0.140.0070.03818.79
7.0.130.0060.00615.55
7.0.120.0030.01015.43
7.0.110.0220.02417.60
7.0.100.0270.02217.65
7.0.90.0280.03517.69
7.0.80.0230.02217.67
7.0.70.0230.02817.60
7.0.60.0220.02517.60
7.0.50.0220.02517.73
7.0.40.0070.04216.54
7.0.30.0110.01916.55
7.0.20.0050.02916.65
7.0.10.0110.02016.53
7.0.00.0050.02316.59
5.6.400.0030.00614.13
5.6.390.0030.01014.27
5.6.380.0030.00614.46
5.6.370.0090.00614.58
5.6.360.0070.00314.58
5.6.350.0030.01213.99
5.6.340.0070.00714.02
5.6.330.0100.00614.73
5.6.320.0050.00514.47
5.6.310.0060.00314.25
5.6.300.0000.01513.85
5.6.290.0070.00714.48
5.6.280.0080.03517.74
5.6.270.0140.00014.39
5.6.260.0100.02117.49
5.6.250.0030.02817.34
5.6.240.0060.02117.41
5.6.230.0070.03217.43
5.6.220.0080.02117.39
5.6.210.0060.03317.42
5.6.200.0030.03517.58
5.6.190.0090.01917.44
5.6.180.0050.03117.53
5.6.170.0070.04017.36
5.6.160.0090.04017.57
5.6.150.0030.02717.53
5.6.140.0040.02717.45
5.6.130.0070.04317.56
5.6.120.0030.02917.45
5.6.110.0100.01817.39
5.6.100.0110.02017.40
5.6.90.0030.02117.46
5.6.80.0050.02417.11
5.6.70.0030.02417.25
5.6.60.0070.02017.09
5.6.50.0070.03017.06
5.6.40.0070.02517.16
5.6.30.0020.03517.11
5.6.20.0060.03517.07
5.6.10.0110.03717.26
5.6.00.0050.01917.27
5.5.380.0080.02315.67
5.5.370.0030.02915.84
5.5.360.0050.04215.90
5.5.350.0110.02015.68
5.5.340.0080.02816.00
5.5.330.0030.02516.00
5.5.320.0020.02716.00
5.5.310.0070.02216.24
5.5.300.0070.02016.26
5.5.290.0020.02316.12
5.5.280.0040.03116.05
5.5.270.0020.02416.10
5.5.260.0050.03916.05
5.5.250.0000.05116.16
5.5.240.0020.02415.71
5.5.230.0040.02415.71
5.5.220.0050.03115.76
5.5.210.0060.02415.84
5.5.200.0050.03915.81
5.5.190.0030.02215.62
5.5.180.0030.02415.68
5.5.170.0030.01014.24
5.5.160.0060.02015.52
5.5.150.0050.04615.89
5.5.140.0030.04515.72
5.5.130.0080.01915.89
5.5.120.0040.03915.52
5.5.110.0030.02315.87
5.5.100.0030.04315.58
5.5.90.0030.02815.63
5.5.80.0060.02915.85
5.5.70.0080.01715.73
5.5.60.0060.01715.73
5.5.50.0050.04315.74
5.5.40.0070.01915.54
5.5.30.0030.02315.82
5.5.20.0060.03115.50
5.5.10.0040.02015.75
5.5.00.0020.02915.83
5.4.450.0080.03615.93
5.4.440.0060.01915.94
5.4.430.0050.03115.99
5.4.420.0020.02715.90
5.4.410.0050.04315.88
5.4.400.0070.01815.76
5.4.390.0030.02215.83
5.4.380.0020.02215.76
5.4.370.0060.04015.89
5.4.360.0070.03815.82
5.4.350.0070.03715.83
5.4.340.0100.02315.76
5.4.330.0030.01012.54
5.4.320.0100.02215.81
5.4.310.0050.02315.90
5.4.300.0040.03215.90
5.4.290.0050.02315.91
5.4.280.0050.02715.82
5.4.270.0020.03215.83
5.4.260.0070.02815.77
5.4.250.0030.02015.79
5.4.240.0050.03115.79
5.4.230.0080.01815.85
5.4.220.0010.02315.89
5.4.210.0100.04015.77
5.4.200.0030.02915.87
5.4.190.0070.01515.84
5.4.180.0030.02415.78
5.4.170.0050.02215.75
5.4.160.0050.04015.82
5.4.150.0050.02215.80
5.4.140.0060.02114.37
5.4.130.0020.04214.35
5.4.120.0060.03814.50
5.4.110.0120.03814.47
5.4.100.0070.03814.47
5.4.90.0030.04014.41
5.4.80.0070.01714.51
5.4.70.0060.03414.40
5.4.60.0020.04214.46
5.4.50.0050.01714.32
5.4.40.0030.02014.48
5.4.30.0050.03714.45
5.4.20.0050.03314.52
5.4.10.0060.03614.50
5.4.00.0060.01814.10
5.3.290.0080.02513.53
5.3.280.0030.02313.52
5.3.270.0030.02213.52
5.3.260.0030.02013.51
5.3.250.0030.02113.48
5.3.240.0050.02013.57
5.3.230.0050.01813.58
5.3.220.0030.02713.60
5.3.210.0040.03813.61
5.3.200.0070.03813.56
5.3.190.0010.02313.52
5.3.180.0080.03313.55
5.3.170.0070.03813.50
5.3.160.0050.03513.55
5.3.150.0080.03813.59
5.3.140.0060.01813.44
5.3.130.0020.02913.51
5.3.120.0070.03513.49
5.3.110.0030.02413.54
5.3.100.0100.03013.26
5.3.90.0040.02413.21
5.3.80.0070.03713.21
5.3.70.0020.02613.31
5.3.60.0050.02913.30
5.3.50.0030.03813.24
5.3.40.0080.01813.17
5.3.30.0080.03513.18
5.3.20.0050.02013.12
5.3.10.0030.02213.02
5.3.00.0080.01713.02
5.2.170.0030.03712.07
5.2.160.0030.03712.07
5.2.150.0000.03012.07
5.2.140.0030.06312.07
5.2.130.0030.03312.07
5.2.120.0000.03012.07
5.2.110.0000.02712.07
5.2.100.0070.05712.07
5.2.90.0000.06012.07
5.2.80.0030.03012.07
5.2.70.0000.06312.07
5.2.60.0030.03312.07
5.2.50.0070.03312.07
5.2.40.0000.04312.07
5.2.30.0030.05712.07
5.2.20.0000.03712.07
5.2.10.0000.03312.07
5.2.00.0000.03012.07
5.1.60.0070.03012.07
5.1.50.0130.02012.07
5.1.40.0100.02012.07
5.1.30.0100.05012.07
5.1.20.0070.02712.07
5.1.10.0030.03712.07
5.1.00.0000.03012.07
5.0.50.0030.04712.07
5.0.40.0000.03012.07
5.0.30.0000.03312.07
5.0.20.0000.02712.07
5.0.10.0000.02012.07
5.0.00.0000.03712.07
4.4.90.0000.03012.07
4.4.80.0030.01312.07
4.4.70.0000.01312.07
4.4.60.0000.01712.07
4.4.50.0000.02012.07
4.4.40.0000.02012.07
4.4.30.0030.02312.07
4.4.20.0000.01712.07
4.4.10.0000.03312.07
4.4.00.0000.04712.07
4.3.110.0000.01712.07
4.3.100.0030.02312.07
4.3.90.0030.01712.07
4.3.80.0000.02712.07
4.3.70.0000.01712.07
4.3.60.0000.02312.07
4.3.50.0000.02012.07
4.3.40.0030.04712.07
4.3.30.0000.02712.07
4.3.20.0000.03312.07
4.3.10.0000.04012.07
4.3.00.0030.03012.07

preferences:
41.36 ms | 400 KiB | 5 Q