3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '<?php function MyFunction1() { // Some code goes here. } function MyFunction2() { // Some code goes here. } class MyClass { function MyFunction3() { // Some code goes here. } function MyFunction4() { // Some code goes here. } public function register(); } public function register(); function foo() { } function foo() {} function foo() { } function foo() { for ($i = 0; $i < $bar; $i++) { }//end for } '; $tokens = token_get_all($string); foreach ($tokens as $i => $token) { echo "$i : "; if (is_array($token) === false) { echo $token; } else { echo token_name($token[0]).' => '.str_replace(PHP_EOL, '\n', $token[1]); } echo PHP_EOL; }

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.3.70.0130.00718.55
8.3.60.0070.01116.75
8.3.50.0140.00822.00
8.3.40.0080.00818.64
8.3.30.0060.00919.09
8.3.20.0050.00320.34
8.3.10.0050.00321.78
8.3.00.0060.00319.38
8.2.180.0150.00616.63
8.2.170.0060.00922.96
8.2.160.0120.00320.33
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0050.00319.35
8.2.110.0070.00421.00
8.2.100.0080.00417.97
8.2.90.0060.00319.64
8.2.80.0080.00017.97
8.2.70.0060.00317.75
8.2.60.0000.00818.05
8.2.50.0080.00018.07
8.2.40.0030.00618.16
8.2.30.0000.00818.01
8.2.20.0000.00917.77
8.2.10.0000.00818.04
8.2.00.0040.00417.88
8.1.280.0130.00625.92
8.1.270.0060.00320.65
8.1.260.0050.00226.35
8.1.250.0060.00328.09
8.1.240.0050.00524.02
8.1.230.0000.01220.97
8.1.220.0030.00517.74
8.1.210.0000.00918.94
8.1.200.0030.00617.35
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0060.00318.59
8.1.160.0050.00218.92
8.1.150.0000.00818.91
8.1.140.0000.00917.34
8.1.130.0050.00217.55
8.1.120.0040.00417.45
8.1.110.0040.00417.45
8.1.100.0000.00717.48
8.1.90.0030.00517.39
8.1.80.0070.00017.47
8.1.70.0000.00817.41
8.1.60.0030.00617.59
8.1.50.0030.00617.45
8.1.40.0030.00617.54
8.1.30.0030.00617.66
8.1.20.0030.00517.63
8.1.10.0040.00417.50
8.1.00.0060.00317.52
8.0.300.0000.00720.03
8.0.290.0040.00816.62
8.0.280.0070.00018.40
8.0.270.0040.00416.76
8.0.260.0030.00316.79
8.0.250.0040.00416.90
8.0.240.0070.00016.97
8.0.230.0000.00816.98
8.0.220.0070.00016.98
8.0.210.0040.00416.82
8.0.200.0000.00716.91
8.0.190.0040.00416.93
8.0.180.0060.00316.93
8.0.170.0050.00316.94
8.0.160.0000.00816.86
8.0.150.0030.00416.86
8.0.140.0000.01016.88
8.0.130.0030.00313.31
8.0.120.0080.00016.93
8.0.110.0040.00416.96
8.0.100.0030.00516.91
8.0.90.0050.00316.87
8.0.80.0070.01116.87
8.0.70.0000.00816.73
8.0.60.0000.00816.81
8.0.50.0030.00616.93
8.0.30.0160.01417.05
8.0.20.0240.00317.40
8.0.10.0000.00817.11
8.0.00.0120.01016.69
7.4.330.0030.00315.08
7.4.320.0060.00016.52
7.4.300.0090.00016.56
7.4.290.0000.00716.52
7.4.280.0090.00016.66
7.4.270.0030.00316.68
7.4.260.0060.00316.57
7.4.250.0000.00816.62
7.4.240.0020.00516.46
7.4.230.0030.00516.53
7.4.220.0120.00616.48
7.4.210.0060.00916.43
7.4.200.0050.00316.61
7.4.160.0060.01116.69
7.4.150.0120.00817.40
7.4.140.0170.00817.86
7.4.130.0100.01116.46
7.4.120.0130.00716.66
7.4.110.0100.01016.59
7.4.100.0090.00916.54
7.4.90.0100.01016.48
7.4.80.0070.01019.39
7.4.70.0120.00616.68
7.4.60.0140.01116.61
7.4.50.0030.00616.45
7.4.40.0120.00916.46
7.4.30.0080.01516.54
7.4.00.0070.01014.89
7.3.330.0000.00713.28
7.3.320.0090.00913.23
7.3.310.0040.00416.22
7.3.300.0000.00716.34
7.3.290.0070.00916.29
7.3.280.0100.01016.30
7.3.270.0060.01217.40
7.3.260.0100.01016.23
7.3.250.0120.00916.57
7.3.240.0090.00916.36
7.3.230.0130.00616.39
7.3.210.0060.01216.66
7.3.200.0030.01519.39
7.3.190.0090.00916.59
7.3.180.0060.01216.36
7.3.170.0140.01016.56
7.3.160.0070.01116.25
7.3.10.0110.00416.48
7.3.00.0080.00616.62
7.2.330.0040.01416.79
7.2.320.0100.00816.73
7.2.310.0060.01816.73
7.2.300.0130.00716.79
7.2.290.0130.01216.48
7.2.130.0070.00917.06
7.2.120.0050.00816.85
7.2.110.0090.00516.95
7.2.100.0090.00516.90
7.2.90.0080.00817.01
7.2.80.0070.00416.86
7.2.70.0070.00116.92
7.2.60.0050.00716.92
7.2.50.0060.00716.96
7.2.40.0070.00616.72
7.2.30.0060.00716.85
7.2.20.0050.00717.12
7.2.10.0060.00616.97
7.2.00.0070.00717.74
7.1.250.0050.00715.93
7.1.240.0090.00315.52
7.1.230.0100.00615.91
7.1.220.0120.00315.83
7.1.210.0060.00815.67
7.1.200.0050.00515.82
7.1.190.0100.00315.97
7.1.180.0000.01415.75
7.1.170.0030.01015.82
7.1.160.0070.00715.68
7.1.150.0070.00715.96
7.1.140.0100.00315.80
7.1.130.0030.00515.95
7.1.120.0030.00715.67
7.1.110.0040.00715.96
7.1.100.0050.00616.95
7.1.90.0110.00415.88
7.1.80.0060.00615.73
7.1.70.0040.00416.55
7.1.60.0100.00717.57
7.1.50.0060.00716.36
7.1.40.0060.00915.83
7.1.30.0080.00815.68
7.1.20.0000.01315.80
7.1.10.0030.00915.91
7.1.00.0050.03919.13
7.0.330.0090.00015.35
7.0.320.0060.00615.43
7.0.310.0070.00715.48
7.0.300.0070.00715.63
7.0.290.0060.00315.14
7.0.280.0120.00315.48
7.0.270.0070.00715.48
7.0.260.0070.00315.47
7.0.250.0040.00815.51
7.0.240.0060.00315.34
7.0.230.0060.00315.53
7.0.220.0030.00715.43
7.0.210.0100.00715.47
7.0.200.0130.00216.11
7.0.190.0060.00315.55
7.0.180.0070.00015.58
7.0.170.0000.00815.45
7.0.160.0030.01015.41
7.0.150.0030.01015.20
7.0.140.0020.02818.73
7.0.130.0100.00015.34
7.0.120.0000.01215.51
7.0.110.0050.00515.55
7.0.100.0250.03817.65
7.0.90.0270.04217.75
7.0.80.0170.04617.57
7.0.70.0300.04217.77
7.0.60.0310.04017.67
7.0.50.0300.03317.88
7.0.40.0070.04216.78
7.0.30.0100.04216.76
7.0.20.0050.03716.81
7.0.10.0050.03216.82
7.0.00.0050.04216.87
5.6.380.0150.00014.56
5.6.370.0030.00814.49
5.6.360.0040.00414.43
5.6.350.0110.00014.58
5.6.340.0030.00914.63
5.6.330.0000.01314.27
5.6.320.0100.00714.21
5.6.310.0030.00914.39
5.6.300.0030.01014.74
5.6.290.0030.01014.36
5.6.280.0100.03517.74
5.6.270.0060.00614.49
5.6.260.0090.00314.68
5.6.250.0090.03617.62
5.6.240.0190.03417.67
5.6.230.0090.04017.62
5.6.220.0110.03317.54
5.6.210.0060.04317.47
5.6.200.0070.04017.71
5.6.190.0030.04517.87
5.6.180.0070.04317.85
5.6.170.0070.04717.98
5.6.160.0050.04317.75
5.6.150.0090.03917.75
5.6.140.0080.04217.74
5.6.130.0080.04017.82
5.6.120.0050.03617.63
5.6.110.0070.02717.76
5.6.100.0070.04617.66
5.6.90.0050.05017.83
5.6.80.0090.04317.52
5.6.70.0030.04817.38
5.6.60.0050.04117.38
5.6.50.0070.04017.47
5.6.40.0030.04817.42
5.6.30.0070.04217.40
5.6.20.0040.04417.46
5.6.10.0100.02317.52
5.6.00.0060.04217.27
5.5.380.0050.02915.84
5.5.370.0060.03915.96
5.5.360.0090.04015.86
5.5.350.0030.04315.77
5.5.340.0070.04216.01
5.5.330.0080.02416.07
5.5.320.0090.04015.94
5.5.310.0020.04215.87
5.5.300.0020.04916.09
5.5.290.0070.04216.00
5.5.280.0020.04615.96
5.5.270.0080.03315.91
5.5.260.0080.04315.98
5.5.250.0080.03715.88
5.5.240.0100.04015.76
5.5.230.0100.02415.79
5.5.220.0050.04315.62
5.5.210.0110.02315.68
5.5.200.0030.02915.66
5.5.190.0100.04015.73
5.5.180.0070.04115.63
5.5.170.0000.01111.25
5.5.160.0090.03815.66
5.5.150.0080.03915.71
5.5.140.0050.04215.61
5.5.130.0110.03515.69
5.5.120.0060.02315.65
5.5.110.0030.04315.60
5.5.100.0030.04315.64
5.5.90.0090.03815.57
5.5.80.0050.04015.58
5.5.70.0050.04215.72
5.5.60.0090.03315.63
5.5.50.0100.03615.59
5.5.40.0070.03715.60
5.5.30.0090.03915.66
5.5.20.0130.03815.72
5.5.10.0050.03715.67
5.5.00.0080.03815.53
5.4.450.0030.04215.22
5.4.440.0030.04515.15
5.4.430.0110.03715.26
5.4.420.0070.04015.21
5.4.410.0090.02515.03
5.4.400.0070.03115.08
5.4.390.0060.03014.95
5.4.380.0020.03215.02
5.4.370.0060.04215.05
5.4.360.0040.03515.11
5.4.350.0100.03915.17
5.4.340.0080.03915.02
5.4.330.0060.00311.06
5.4.320.0050.04515.10
5.4.310.0030.03815.07
5.4.300.0070.04115.10
5.4.290.0050.04015.09
5.4.280.0130.03515.08
5.4.270.0050.03715.04
5.4.260.0070.04014.98
5.4.250.0070.03715.06
5.4.240.0040.03415.16
5.4.230.0050.04214.92
5.4.220.0070.04215.05
5.4.210.0030.04115.04
5.4.200.0100.03115.09
5.4.190.0090.03715.14
5.4.180.0020.04515.07
5.4.170.0110.03815.00
5.4.160.0020.04115.05
5.4.150.0080.03814.94
5.4.140.0050.03813.70
5.4.130.0070.03013.72
5.4.120.0050.03713.72
5.4.110.0120.03713.68
5.4.100.0090.02613.67
5.4.90.0110.03213.68
5.4.80.0080.03513.76
5.4.70.0050.03213.72
5.4.60.0090.01813.77
5.4.50.0130.03613.76
5.4.40.0080.03513.76
5.4.30.0040.03613.76
5.4.20.0050.03913.66
5.4.10.0120.03713.74
5.4.00.0050.03813.48
5.3.290.0020.04612.83
5.3.280.0040.02712.79
5.3.270.0030.04112.86
5.3.260.0150.03312.79
5.3.250.0080.03812.83
5.3.240.0120.03212.85
5.3.230.0030.04212.86
5.3.220.0050.02712.78
5.3.210.0050.03612.82
5.3.200.0000.04512.82
5.3.190.0070.04012.83
5.3.180.0070.04212.77
5.3.170.0030.04512.78
5.3.160.0090.03712.82
5.3.150.0060.03812.78
5.3.140.0060.04012.84
5.3.130.0030.03012.77
5.3.120.0070.04012.84
5.3.110.0070.03712.77
5.3.100.0040.04112.59
5.3.90.0110.03112.55
5.3.80.0080.03712.57
5.3.70.0050.02112.47
5.3.60.0030.04112.45
5.3.50.0030.03812.42
5.3.40.0140.03212.52
5.3.30.0070.03712.41
5.3.20.0080.03312.41
5.3.10.0030.03912.35
5.3.00.0080.03312.38
5.2.170.0010.02111.10
5.2.160.0060.03011.16
5.2.150.0030.03111.04
5.2.140.0080.03011.17
5.2.130.0020.03911.04
5.2.120.0060.02311.09
5.2.110.0030.03211.08
5.2.100.0060.03311.08
5.2.90.0070.03211.05
5.2.80.0030.03611.01
5.2.70.0060.03411.12
5.2.60.0030.03511.02
5.2.50.0110.03411.10
5.2.40.0050.03610.99
5.2.30.0030.02811.07
5.2.20.0020.02111.04
5.2.10.0050.03310.98
5.2.00.0020.01810.97
5.1.60.0030.02710.61
5.1.50.0030.01510.48
5.1.40.0020.01610.61
5.1.30.0020.01710.75
5.1.20.0030.01710.80
5.1.10.0030.01510.65
5.1.00.0020.02010.60
5.0.50.0020.0149.89
5.0.40.0050.0139.77
5.0.30.0000.0229.73
5.0.20.0070.0179.73
5.0.10.0040.0129.73
5.0.00.0040.0209.73
4.4.90.0010.0149.73
4.4.80.0000.0219.73
4.4.70.0020.0169.73
4.4.60.0020.0139.73
4.4.50.0040.0169.73
4.4.40.0030.0179.73
4.4.30.0030.0089.73
4.4.20.0030.0089.73
4.4.10.0050.0079.73
4.4.00.0030.0159.73
4.3.110.0020.0109.73
4.3.100.0000.0119.73
4.3.90.0050.0209.73
4.3.80.0030.0139.73
4.3.70.0040.0079.73
4.3.60.0000.0139.73
4.3.50.0030.0159.73
4.3.40.0020.0309.73
4.3.30.0000.0129.73
4.3.20.0030.0099.73
4.3.10.0020.0099.73
4.3.00.0020.0109.73

preferences:
49.58 ms | 401 KiB | 5 Q