3v4l.org

run code in 300+ PHP versions simultaneously
<?php $output = array(); function saveRawValue($name, $value) { $GLOBALS['output'][$name] = $value; } function parse_phpinfo() { ob_start(); phpinfo(); $s = ob_get_contents(); ob_end_clean(); $s = strip_tags($s, '<h2><th><td>'); $s = preg_replace('/<th[^>]*>([^<]+)<\/th>/', '<info>\1</info>', $s); $s = preg_replace('/<td[^>]*>([^<]+)<\/td>/', '<info>\1</info>', $s); $t = preg_split('/(<h2[^>]*>[^<]+<\/h2>)/', $s, -1, PREG_SPLIT_DELIM_CAPTURE); $r = array(); $count = count($t); $p1 = '<info>([^<]+)<\/info>'; $p2 = '/'.$p1.'\s*'.$p1.'\s*'.$p1.'/'; $p3 = '/'.$p1.'\s*'.$p1.'/'; for ($i = 1; $i < $count; $i++) { if (preg_match('/<h2[^>]*>([^<]+)<\/h2>/', $t[$i], $matchs)) { $name = trim($matchs[1]); $vals = explode("\n", $t[$i + 1]); foreach ($vals AS $val) { if (preg_match($p2, $val, $matchs)) { // 3cols $r[$name][trim($matchs[1])] = array(trim($matchs[2]), trim($matchs[3])); } elseif (preg_match($p3, $val, $matchs)) { // 2cols $r[$name][trim($matchs[1])] = trim($matchs[2]); } } } } return $r; } saveRawValue('phpinfo', parse_phpinfo()); saveRawValue('ii.runtime_user', posix_getuid(), SEPARATION); saveRawValue('ii.runtime_group', posix_getgid(), SEPARATION); echo "<pre>" . json_encode($output) . "</pre>";

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.60.0070.00718.56
8.3.50.0150.00321.98
8.3.40.0090.00618.83
8.3.30.0070.00719.07
8.3.20.0040.00420.34
8.3.10.0050.00323.66
8.3.00.0050.00319.38
8.2.180.0140.00716.63
8.2.170.0070.00722.96
8.2.160.0100.00720.38
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0040.00420.20
8.2.110.0070.01422.19
8.2.100.0110.00017.66
8.2.90.0000.00817.78
8.2.80.0060.00617.97
8.2.70.0080.00017.63
8.2.60.0050.00317.63
8.2.50.0040.00417.63
8.2.40.0030.00617.97
8.2.30.0040.00417.98
8.2.20.0040.00417.58
8.2.10.0030.00518.00
8.2.00.0040.00417.76
8.1.280.0070.01425.92
8.1.270.0040.00422.20
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0100.00022.05
8.1.230.0140.00321.03
8.1.220.0080.00017.75
8.1.210.0000.00818.96
8.1.200.0030.00617.35
8.1.190.0030.00618.90
8.1.180.0050.00318.10
8.1.170.0000.00818.50
8.1.160.0000.00721.97
8.1.150.0000.00718.74
8.1.140.0000.00817.33
8.1.130.0000.00717.86
8.1.120.0050.00317.49
8.1.110.0050.00317.32
8.1.100.0040.00417.36
8.1.90.0040.00417.45
8.1.80.0000.00717.39
8.1.70.0050.00217.35
8.1.60.0060.00617.55
8.1.50.0040.00417.59
8.1.40.0030.00617.57
8.1.30.0060.00317.68
8.1.20.0080.00017.59
8.1.10.0040.00417.63
8.1.00.0040.00417.63
8.0.300.0050.00319.89
8.0.290.0030.00616.63
8.0.280.0070.00018.42
8.0.270.0070.00017.29
8.0.260.0030.00317.27
8.0.250.0030.00416.96
8.0.240.0000.00817.00
8.0.230.0030.00317.04
8.0.220.0000.00716.94
8.0.210.0000.00816.97
8.0.200.0030.00317.03
8.0.190.0080.00016.98
8.0.180.0030.00516.94
8.0.170.0080.00016.96
8.0.160.0000.00716.89
8.0.150.0040.00416.80
8.0.140.0040.00416.84
8.0.130.0030.00313.64
8.0.120.0000.00716.92
8.0.110.0050.00216.81
8.0.100.0040.00416.94
8.0.90.0000.00716.73
8.0.80.0090.01216.96
8.0.70.0040.00416.80
8.0.60.0000.00716.89
8.0.50.0040.00417.04
8.0.30.0100.01317.30
8.0.20.0080.01117.40
8.0.10.0030.00617.04
8.0.00.0060.01416.97
7.4.330.0000.00515.00
7.4.320.0030.00316.77
7.4.300.0030.00316.85
7.4.290.0000.00716.76
7.4.280.0030.00716.88
7.4.270.0000.00816.77
7.4.260.0030.00316.81
7.4.250.0030.00516.79
7.4.240.0020.00516.90
7.4.230.0040.00416.57
7.4.220.0090.01616.88
7.4.210.0030.01316.79
7.4.200.0060.00316.71
7.4.160.0170.00016.86
7.4.150.0200.00017.40
7.4.140.0140.00717.86
7.4.130.0070.01116.63
7.4.120.0080.00916.88
7.4.110.0090.01616.70
7.4.100.0130.01016.65
7.4.90.0070.01016.78
7.4.80.0140.00719.39
7.4.70.0040.01216.80
7.4.60.0060.00916.90
7.4.50.0050.00316.57
7.4.40.0100.01316.84
7.4.30.0130.00316.87
7.4.00.0060.00915.09
7.3.330.0000.00613.70
7.3.320.0000.00613.52
7.3.310.0030.00316.66
7.3.300.0040.00416.64
7.3.290.0090.00616.54
7.3.280.0100.00916.63
7.3.270.0180.01017.40
7.3.260.0150.00616.63
7.3.250.0090.00816.76
7.3.240.0090.01116.82
7.3.230.0030.01516.59
7.3.210.0130.01016.57
7.3.200.0070.01019.39
7.3.190.0060.01216.79
7.3.180.0060.00916.55
7.3.170.0120.00416.64
7.3.160.0170.00016.50
7.2.330.0130.00916.81
7.2.320.0030.01416.69
7.2.310.0060.01116.90
7.2.300.0120.00816.75
7.2.290.0100.01417.01
7.2.60.0030.01316.91
7.1.200.0000.01016.01
7.1.70.0050.00317.28
7.1.60.0100.01419.11
7.1.50.0040.02117.28
7.1.00.0070.07322.47
7.0.200.0070.00017.04
7.0.140.0000.07721.93
7.0.90.0130.07719.97
7.0.80.0030.09319.95
7.0.70.0130.07719.88
7.0.60.0070.08319.98
7.0.50.0070.09020.42
7.0.40.0100.07720.14
7.0.30.0070.08720.08
7.0.20.0070.08720.10
7.0.10.0070.07720.03
7.0.00.0030.09020.11
5.6.280.0000.07321.12
5.6.240.0100.07320.70
5.6.230.0000.08320.70
5.6.220.0030.06020.57
5.6.210.0000.07320.66
5.6.200.0100.08720.97
5.6.190.0130.04720.95
5.6.180.0030.05321.05
5.6.170.0100.07721.03
5.6.160.0030.07720.95
5.6.150.0130.08021.12
5.6.140.0070.08721.06
5.6.130.0100.04320.96
5.6.120.0070.08321.18
5.6.110.0030.05321.05
5.6.100.0130.07020.93
5.6.90.0000.08720.91
5.6.80.0070.08020.42
5.6.70.0030.06320.35
5.6.60.0130.05020.50
5.6.50.0100.08020.43
5.6.40.0030.04720.42
5.6.30.0070.04020.48
5.6.20.0030.04020.29
5.6.10.0070.03720.45
5.6.00.0030.04020.49
5.5.380.0130.08020.56
5.5.370.0070.06320.40
5.5.360.0070.08020.33
5.5.350.0030.08720.49
5.5.340.0070.04020.76
5.5.330.0030.07720.94
5.5.320.0100.08020.89
5.5.310.0130.07720.93
5.5.300.0030.08020.77
5.5.290.0070.07720.93
5.5.280.0030.04320.91
5.5.270.0200.07020.77
5.5.260.0030.05020.64
5.5.250.0070.08720.61
5.5.240.0100.06020.13
5.5.230.0070.08020.29
5.5.220.0230.06320.12
5.5.210.0070.05720.21
5.5.200.0100.04320.28
5.5.190.0000.05020.16
5.5.180.0030.04720.10
5.5.160.0070.03720.19
5.5.150.0100.03320.00
5.5.140.0000.04320.12
5.5.130.0070.04320.23
5.5.120.0030.04020.16
5.5.110.0030.04020.23
5.5.100.0000.04320.09
5.5.90.0130.03020.05
5.5.80.0070.03719.94
5.5.70.0130.02720.11
5.5.60.0000.04720.02
5.5.50.0030.03320.07
5.5.40.0100.07320.01
5.5.30.0070.05720.16
5.5.20.0030.03720.04
5.5.10.0100.04320.04
5.5.00.0000.04020.01
5.4.450.0130.05719.38
5.4.440.0030.06019.51
5.4.430.0130.03719.20
5.4.420.0070.08019.45
5.4.410.0130.05319.07
5.4.400.0070.07719.04
5.4.390.0170.06719.05
5.4.380.0000.05019.03
5.4.370.0100.07019.07
5.4.360.0000.06719.23
5.4.350.0000.04319.13
5.4.340.0030.04019.12
5.4.320.0000.05719.16
5.4.310.0070.04019.05
5.4.300.0070.03319.17
5.4.290.0000.04018.90
5.4.280.0100.03019.18
5.4.270.0030.04319.13
5.4.260.0070.04718.95
5.4.250.0000.04319.12
5.4.240.0070.06018.89
5.4.230.0000.04019.06
5.4.220.0000.04018.84
5.4.210.0030.04719.12
5.4.200.0070.04018.86
5.4.190.0000.04019.15
5.4.180.0000.04019.02
5.4.170.0030.03719.02
5.4.160.0130.03719.02
5.4.150.0100.03318.86
5.4.140.0100.03016.47
5.4.130.0030.03716.34
5.4.120.0000.04016.20
5.4.110.0070.03716.49
5.4.100.0070.05316.56
5.4.90.0000.04316.32
5.4.80.0030.03016.30
5.4.70.0000.04016.50
5.4.60.0030.03316.25
5.4.50.0030.03716.36
5.4.40.0000.04016.35
5.4.30.0030.05316.36
5.4.20.0030.06016.46
5.4.10.0000.04016.30
5.4.00.0000.04015.81
5.3.290.0030.04014.64
5.3.280.0030.03714.62
5.3.270.0000.04014.73
5.3.260.0000.04014.77
5.3.250.0000.04014.55
5.3.240.0030.03714.62
5.3.230.0070.03714.74
5.3.220.0070.03314.51
5.3.210.0030.03714.55
5.3.200.0030.03314.65
5.3.190.0100.03314.61
5.3.180.0030.06014.64
5.3.170.0030.04314.55
5.3.160.0030.03714.60
5.3.150.0030.03314.57
5.3.140.0030.03714.50
5.3.130.0030.04014.53
5.3.120.0070.03314.65
5.3.110.0070.03714.48
5.3.100.0070.03313.98
5.3.90.0030.03714.03
5.3.80.0000.04014.14
5.3.70.0030.05014.16
5.3.60.0070.07714.05
5.3.50.0130.07013.96
5.3.40.0070.07314.03
5.3.30.0030.04714.04
5.3.20.0070.06013.81
5.3.10.0170.06013.68
5.3.00.0070.07013.72
5.2.170.0030.06311.11
5.2.160.0070.05011.22
5.2.150.0100.04011.07
5.2.140.0130.05311.16
5.2.130.0100.05311.18
5.2.120.0000.06311.05
5.2.110.0070.06311.13
5.2.100.0000.03711.18
5.2.90.0070.06011.06
5.2.80.0070.06311.21
5.2.70.0030.06311.03
5.2.60.0030.05011.07
5.2.50.0070.04311.06
5.2.40.0070.05710.93
5.2.30.0000.03311.07
5.2.20.0100.06011.04
5.2.10.0070.04710.91
5.2.00.0100.05310.67
5.1.60.0030.04010.09
5.1.50.0070.04310.13
5.1.40.0070.04010.09
5.1.30.0070.02710.38
5.1.20.0030.05710.23
5.1.10.0030.03010.20
5.1.00.0070.04710.00
5.0.50.0130.0408.57
5.0.40.0000.0508.57
5.0.30.0030.0678.14
5.0.20.0030.0278.22
5.0.10.0030.0478.05
5.0.00.0070.0578.22
4.4.90.0000.0377.21
4.4.80.0030.0177.21
4.4.70.0070.0337.21
4.4.60.0030.0337.21
4.4.50.0100.0277.21
4.4.40.0030.0307.21
4.4.30.0000.0337.21
4.4.20.0030.0337.21
4.4.10.0000.0407.21
4.4.00.0030.0507.21
4.3.110.0030.0307.21
4.3.100.0030.0377.21
4.3.90.0070.0307.21
4.3.80.0070.0477.21
4.3.70.0030.0307.21
4.3.60.0000.0307.21
4.3.50.0000.0337.21
4.3.40.0000.0377.21
4.3.30.0000.0307.21
4.3.20.0000.0377.21
4.3.10.0030.0337.21
4.3.00.0000.0307.21

preferences:
42.36 ms | 401 KiB | 5 Q