3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_time_limit(0); error_reporting(E_ALL); ini_set('display_errors', 1); ob_implicit_flush(true); ob_end_flush(); /** CONFIG -------------------------------------------------------------------- */ $run = 1000; // Kolikrát se má provést hlasování? $idStart = 190200; // Id od kterého se začne $idEnd = 192000; // Id u kterého se skončí /** --------------------------------------------------------------------------- */ function dlog($msg, $color = 'black') { print('<span style="color: ' . $color . '">[' . date('H:i:s') . '] - ' . $msg . '</span><br />'); } function goVote($idStart, $idEnd, $r) { $GLOBALS['firstRun'] = false; for ($i = $idStart; $i <= $idEnd; $i++) { $opts = array( 'http' => array( 'method' => 'GET', 'user_agent' => md5(time()) . rand(6713678, 8746316834) . rand(6713678, 8746316834) ) ); $context = stream_context_create($opts); $result = file_get_contents('http://agata.suz.cvut.cz/jidelnicky/rating_process.php?id=' . $i . '&rating=5', 0, $context); if ($result == 'already_voted') { $color = "red"; } elseif (is_numeric($result)) { $color = "green"; } else { $color = "orange"; } dlog('[ID:' . $i . '][RUN: ' . $r . '] - result: ' . $result, $color); } return true; } /** --------------------------------------------------------------------------- */ for ($r = 1; $r <= $run; $r++) { goVote($idStart, $idEnd, $r); }

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)
7.2.00.0130.01020.10
7.1.70.0000.00817.62
7.1.60.0220.01016.18
7.1.50.0040.01517.60
7.1.00.0170.07722.62
7.0.200.0060.00917.16
7.0.140.0170.07322.49
7.0.100.0200.07720.46
7.0.90.0470.09720.41
7.0.80.0130.07720.15
7.0.70.0330.07020.21
7.0.60.0470.05020.45
7.0.50.0630.05020.50
7.0.40.0170.04020.44
7.0.30.0130.04720.59
7.0.20.0200.07720.30
7.0.10.0170.04020.43
7.0.00.0200.09020.52
5.6.280.0130.07721.29
5.6.250.0130.04320.93
5.6.240.0130.06321.18
5.6.230.0230.07021.02
5.6.220.0330.03720.90
5.6.210.0170.08020.88
5.6.200.0170.08321.60
5.6.190.0070.04021.52
5.6.180.0070.04721.25
5.6.170.0200.09021.39
5.6.160.0130.05021.24
5.6.150.0270.03321.34
5.6.140.0200.06021.31
5.6.130.0170.03721.34
5.6.120.0170.05321.50
5.6.110.0100.09721.25
5.6.100.0200.04721.30
5.6.90.0270.06721.32
5.6.80.0130.06020.77
5.6.70.0200.04020.76
5.6.60.0230.04320.68
5.6.50.0170.06320.82
5.6.40.0230.08320.67
5.6.30.0200.07720.75
5.6.20.0170.03720.94
5.6.10.0130.04320.79
5.6.00.0130.04320.80
5.5.380.0100.04020.75
5.5.370.0170.07020.71
5.5.360.0130.06320.62
5.5.350.0130.07720.84
5.5.340.0070.05021.19
5.5.330.0200.07321.09
5.5.320.0200.04021.19
5.5.310.0130.03721.04
5.5.300.0170.07721.34
5.5.290.0230.03721.05
5.5.280.0200.08021.26
5.5.270.0230.06021.00
5.5.260.0200.08321.28
5.5.250.0130.05021.10
5.5.240.0270.04720.60
5.5.230.0270.08020.40
5.5.220.0130.03720.71
5.5.210.0170.07320.41
5.5.200.0170.07720.39
5.5.190.0230.07720.39
5.5.180.0170.03720.36
5.5.160.0130.04320.68
5.5.150.0130.04020.53
5.5.140.0100.04320.68
5.5.130.0130.04720.51
5.5.120.0130.04320.38
5.5.110.0100.04020.37
5.5.100.0100.05020.28
5.5.90.0070.04320.31
5.5.80.0130.04020.49
5.5.70.0100.04020.36
5.5.60.0170.03720.45
5.5.50.0100.03320.56
5.5.40.0100.03320.26
5.5.30.0100.04320.51
5.5.20.0170.04020.29
5.5.10.0130.04020.50
5.5.00.0130.03320.33
5.4.450.0200.05019.72
5.4.440.0130.07719.58
5.4.430.0270.10319.70
5.4.420.0070.04319.56
5.4.410.0200.07019.77
5.4.400.0200.06019.30
5.4.390.0270.08019.40
5.4.380.0270.07719.27
5.4.370.0170.06319.23
5.4.360.0170.06719.13
5.4.350.0300.03019.54
5.4.340.0100.05019.13
5.4.320.0130.03719.38
5.4.310.0170.03319.39
5.4.300.0070.04319.38
5.4.290.0100.04019.34
5.4.280.0100.04019.43
5.4.270.0100.04019.31
5.4.260.0130.03719.22
5.4.250.0170.03319.54
5.4.240.0130.04319.32
5.4.230.0170.03719.23
5.4.220.0000.04019.12
5.4.210.0100.03719.29
5.4.200.0130.03719.40
5.4.190.0130.03319.31
5.4.180.0230.03019.33
5.4.170.0070.03719.56
5.4.160.0130.04019.29
5.4.150.0200.04019.10
5.4.140.0130.04316.69
5.4.130.0170.03316.71
5.4.120.0200.03016.71
5.4.110.0130.02716.57
5.4.100.0200.03316.59
5.4.90.0100.03716.75
5.4.80.0070.03316.64
5.4.70.0070.03316.76
5.4.60.0130.02716.76
5.4.50.0070.04016.73
5.4.40.0100.03716.59
5.4.30.0130.03316.62
5.4.20.0130.03016.62
5.4.10.0170.02716.73
5.4.00.0100.03016.26

preferences:
35.99 ms | 401 KiB | 5 Q