3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ErrorLog { /*static*/ var $errorArr = array(); /*public static*/ function throwError ($err, $level = E_USER_WARNING, $suppress = false, $shiftBack = 1) { // Shiftback means: look back into the backtrace calls, shifting that amount of calls, and then report the error. // There is no checking whether this many levels actually exist in the call stack, make sure yourself // Error log doesn't show newlines. str_replace( array( "\n" ), array( " " ), $err ); $trace = ErrorLog::getBacktrace(); $info = ""; if (!empty($trace)) { while ($shiftBack > 0) { array_shift($trace); --$shiftBack; } // Error file/line information: $info .= "in " . $trace[0]["file"] . ":" . $trace[0]["line"] . "."; // Caller information: if (count($trace) > 1) { array_shift($trace); $caller = $trace[0]; $info .= " Thrown by "; if (isset($caller["function"])) { if (isset($caller["class"])) { $info .= $caller["class"] . "::"; } $info .= $caller["function"] . "() "; } else { $info .= "global scope "; } $info .= "which was called in " . $caller["file"] . ":" . $caller["line"] . "."; } } $queryStr = $_SERVER["QUERY_STRING"]; $info .= " (Called URL: " . $_SERVER["HOST_NAME"] . $_SERVER["PHP_SELF"] . (!empty($queryStr) ? ("?" . $queryStr) : "") . ")"; $out = "\"" . $err . "\" " . $info; ErrorLog::$errorArr[] = $err; if (!$suppress) { trigger_error($out, $level); } } /*public static*/ function throwDeprecated ($suppress = false) { // Call this method from INSIDE a deprecated function, ErrorLog::throwError("Deprecated!", E_USER_NOTICE, $suppress, 2); } /*public static*/ function hasErrors () { return (!empty(ErrorLog::$errorArr)); } /*private static*/ function getBacktrace () { if (version_compare(PHP_VERSION, "5.2.5", "<")) { return debug_backtrace(); } else { return debug_backtrace(false); // A bit more efficient } } } function a () { ErrorLog::throwDeprecated(); } a();

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.0180.00018.30
8.3.50.0080.01221.07
8.3.40.0100.00718.62
8.3.30.0060.00919.22
8.3.20.0040.00420.29
8.3.10.0080.00021.96
8.3.00.0000.00822.39
8.2.180.0070.00718.17
8.2.170.0100.01022.96
8.2.160.0070.00719.11
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0100.00726.16
8.2.120.0050.00319.54
8.2.110.0050.00522.14
8.2.100.0110.00019.14
8.2.90.0030.00619.22
8.2.80.0100.00017.97
8.2.70.0060.00317.38
8.2.60.0030.00617.80
8.2.50.0080.00018.07
8.2.40.0060.00318.16
8.2.30.0030.00517.99
8.2.20.0040.00417.79
8.2.10.0050.00317.72
8.2.00.0000.00917.58
8.1.280.0170.00325.92
8.1.270.0000.00818.50
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0040.00423.79
8.1.230.0030.00919.16
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0060.00617.00
8.1.190.0080.00017.39
8.1.180.0000.00820.43
8.1.170.0070.00218.39
8.1.160.0040.00422.21
8.1.150.0000.00818.54
8.1.140.0040.00417.34
8.1.130.0040.00417.77
8.1.120.0080.00017.34
8.1.110.0030.00617.36
8.1.100.0000.00717.42
8.1.90.0000.00717.27
8.1.80.0000.00817.35
8.1.70.0000.00717.35
8.1.60.0030.00617.56
8.1.50.0000.00817.37
8.1.40.0040.00417.50
8.1.30.0030.00517.59
8.1.20.0030.00517.52
8.1.10.0030.00617.44
8.1.00.0030.00917.43
8.0.300.0050.00218.77
8.0.290.0050.00317.04
8.0.280.0000.00718.42
8.0.270.0000.00717.10
8.0.260.0050.00516.79
8.0.250.0000.00616.86
8.0.240.0030.00516.88
8.0.230.0040.00416.97
8.0.220.0000.00716.86
8.0.210.0070.00016.83
8.0.200.0000.00716.91
8.0.190.0040.00417.02
8.0.180.0080.00016.82
8.0.170.0060.00316.92
8.0.160.0080.00016.96
8.0.150.0070.00016.87
8.0.140.0040.00416.89
8.0.130.0000.00513.39
8.0.120.0000.00816.90
8.0.110.0020.00516.84
8.0.100.0040.00416.86
8.0.90.0040.00416.79
8.0.80.0150.00016.88
8.0.70.0050.00316.95
8.0.60.0040.00416.82
8.0.50.0030.00516.87
8.0.30.0080.01017.14
8.0.20.0120.00717.40
8.0.10.0040.00416.98
8.0.00.0070.01016.73
7.4.330.0000.00515.00
7.4.320.0030.00316.59
7.4.300.0030.00316.54
7.4.290.0060.00316.64
7.4.280.0000.00916.64
7.4.270.0040.00416.55
7.4.260.0080.00016.45
7.4.250.0030.00516.55
7.4.240.0040.00416.58
7.4.230.0040.00416.48
7.4.220.0130.00316.72
7.4.210.0080.00616.61
7.4.200.0030.00316.43
7.4.190.0030.00316.79
7.4.160.0100.00516.46
7.4.150.0090.00917.40
7.4.140.0090.00917.86
7.4.130.0020.01716.63
7.4.120.0130.00416.72
7.4.110.0120.00316.52
7.4.100.0110.00716.71
7.4.90.0190.00016.42
7.4.80.0090.00919.39
7.4.70.0080.00816.57
7.4.60.0070.01416.55
7.4.50.0000.00416.37
7.4.40.0070.01022.77
7.4.30.0080.00816.38
7.4.00.0090.00815.10
7.3.330.0000.00513.53
7.3.320.0060.00013.43
7.3.310.0030.00316.42
7.3.300.0000.00716.32
7.3.290.0150.00616.46
7.3.280.0070.01016.42
7.3.270.0070.01717.40
7.3.260.0100.01416.51
7.3.250.0130.00916.43
7.3.240.0100.01416.47
7.3.230.0130.00616.71
7.3.210.0040.01316.45
7.3.200.0130.00319.39
7.3.190.0110.00616.64
7.3.180.0030.01616.57
7.3.170.0030.01316.46
7.3.160.0060.00916.52
7.3.120.0090.00814.93
7.3.110.0110.00814.82
7.3.100.0040.01215.01
7.3.90.0070.00514.87
7.3.80.0090.00715.00
7.3.70.0070.00414.84
7.3.60.0050.00914.81
7.3.50.0100.00314.78
7.3.40.0040.01314.73
7.3.30.0080.00514.82
7.3.20.0090.00516.84
7.3.10.0040.01016.65
7.3.00.0080.00916.58
7.2.330.0090.00916.59
7.2.320.0180.00416.84
7.2.310.0130.00316.63
7.2.300.0080.00816.83
7.2.290.0070.01116.61
7.2.250.0060.01315.24
7.2.240.0070.01014.99
7.2.230.0080.00815.04
7.2.220.0050.00815.12
7.2.210.0030.01215.07
7.2.200.0050.00915.00
7.2.190.0060.00615.02
7.2.180.0080.00515.08
7.2.170.0070.00715.01
7.2.130.0050.01216.70
7.2.120.0130.00216.86
7.2.110.0080.01216.95
7.2.100.0150.00316.78
7.2.90.0100.01216.77
7.2.80.0090.00716.74
7.2.70.0070.01116.64
7.2.60.0140.00416.85
7.2.50.0110.00716.94
7.2.40.0120.00916.89
7.2.30.0130.01216.93
7.2.20.0070.00816.79
7.2.10.0070.00916.79
7.2.00.0070.00917.88
7.1.330.0020.01215.83
7.1.320.0080.00515.79
7.1.310.0080.00615.74
7.1.300.0050.00715.67
7.1.290.0050.00915.76
7.1.280.0100.00415.70
7.1.270.0060.00515.79
7.1.260.0050.00915.85
7.1.250.0080.00815.79
7.1.200.0060.00915.95
7.1.70.0000.00816.93
7.1.60.0000.01017.02
7.1.50.0060.01917.05
7.1.00.0000.03722.57
7.0.200.0000.00716.88
7.0.140.0070.06722.08
7.0.100.0030.04320.13
7.0.90.0130.05020.01
7.0.80.0000.04319.95
7.0.70.0030.06019.92
7.0.60.0000.04719.93
7.0.50.0200.03320.41
7.0.40.0070.03720.00
7.0.30.0000.05020.08
7.0.20.0030.04320.04
7.0.10.0000.04720.12
7.0.00.0070.04320.17
5.6.280.0130.06320.84
5.6.250.0000.04020.62
5.6.240.0070.04320.65
5.6.230.0070.03720.77
5.6.220.0030.03720.61
5.6.210.0000.03720.62
5.6.200.0030.04720.98
5.6.190.0130.03321.05
5.6.180.0000.05020.97
5.6.170.0000.04720.98
5.6.160.0030.04021.09
5.6.150.0030.04721.02
5.6.140.0070.03721.13
5.6.130.0030.07321.04
5.6.120.0000.04321.16
5.6.110.0070.07721.10
5.6.100.0030.07321.14
5.6.90.0100.10021.14
5.6.80.0000.04020.52
5.6.70.0130.07020.43
5.6.60.0170.07020.57
5.6.50.0030.07020.35
5.6.40.0100.04320.44
5.6.30.0130.07020.32
5.6.20.0070.05320.45
5.6.10.0070.08320.39
5.6.00.0130.06720.44
5.5.380.0070.03720.43
5.5.370.0030.04020.52
5.5.360.0030.03720.41
5.5.350.0030.04320.45
5.5.340.0030.04020.93
5.5.330.0000.04020.79
5.5.320.0000.04320.88
5.5.310.0070.03320.88
5.5.300.0030.05720.90
5.5.290.0170.07020.91
5.5.280.0030.08720.93
5.5.270.0130.07720.84
5.5.260.0100.07720.79
5.5.250.0000.04020.66
5.5.240.0100.05720.05
5.5.230.0130.07320.30
5.5.220.0070.08020.13
5.5.210.0100.07020.21
5.5.200.0100.06720.02
5.5.190.0170.06320.23
5.5.180.0100.06720.16
5.5.160.0200.04720.10
5.5.150.0230.04320.11
5.5.140.0030.07720.23
5.5.130.0000.04720.26
5.5.120.0030.08320.01
5.5.110.0000.07720.27
5.5.100.0130.07020.18
5.5.90.0070.04020.12
5.5.80.0100.07720.12
5.5.70.0100.05020.05
5.5.60.0030.04719.98
5.5.50.0070.04320.14
5.5.40.0030.07320.07
5.5.30.0030.07720.10
5.5.20.0030.06020.07
5.5.10.0070.06720.11
5.5.00.0070.08020.09
5.4.450.0130.06719.56
5.4.440.0000.04319.45
5.4.430.0030.08019.25
5.4.420.0130.08019.27
5.4.410.0030.06319.05
5.4.400.0070.07019.13
5.4.390.0000.05318.86
5.4.380.0030.07719.18
5.4.370.0130.06318.91
5.4.360.0100.04019.16
5.4.350.0100.04719.09
5.4.340.0030.06718.88
5.4.320.0070.07719.04
5.4.310.0030.05719.09
5.4.300.0100.04018.86
5.4.290.0070.05019.02
5.4.280.0070.06719.04
5.4.270.0000.07719.04
5.4.260.0070.06319.23
5.4.250.0100.06718.89
5.4.240.0070.06319.04
5.4.230.0100.07019.14
5.4.220.0070.05719.17
5.4.210.0070.06719.09
5.4.200.0030.07719.13
5.4.190.0100.03719.04
5.4.180.0030.07319.06
5.4.170.0030.06719.22
5.4.160.0030.04719.12
5.4.150.0100.08319.12
5.4.140.0130.07016.48
5.4.130.0100.05716.50
5.4.120.0070.07016.20
5.4.110.0070.07716.56
5.4.100.0070.07716.54
5.4.90.0030.05716.48
5.4.80.0000.06316.54
5.4.70.0130.06316.46
5.4.60.0100.06316.49
5.4.50.0070.06716.43
5.4.40.0070.06316.51
5.4.30.0100.05316.42
5.4.20.0100.07316.41
5.4.10.0000.07016.47
5.4.00.0100.05715.86
5.3.290.0100.07714.64
5.3.280.0100.03714.72
5.3.270.0070.04314.65
5.3.260.0100.07014.77
5.3.250.0070.07014.68
5.3.240.0030.08314.75
5.3.230.0000.07714.56
5.3.220.0130.05714.63
5.3.210.0000.05314.60
5.3.200.0030.04314.69
5.3.190.0030.07314.56
5.3.180.0030.05014.64
5.3.170.0070.05714.59
5.3.160.0100.06714.73
5.3.150.0070.04014.57
5.3.140.0070.05714.72
5.3.130.0070.07714.64
5.3.120.0000.07314.57
5.3.110.0030.08314.67
5.3.100.0130.07314.18
5.3.90.0030.06714.00
5.3.80.0170.05013.95
5.3.70.0070.04714.18
5.3.60.0070.06713.96
5.3.50.0170.03314.01
5.3.40.0030.08013.91
5.3.30.0070.06714.04
5.3.20.0100.07013.78
5.3.10.0070.07013.59
5.3.00.0030.07313.57
5.2.170.0030.04012.68
5.2.160.0070.02712.68
5.2.150.0030.06012.68
5.2.140.0070.05012.68
5.2.130.0000.05312.68
5.2.120.0070.07012.68
5.2.110.0030.04712.68
5.2.100.0100.05012.68
5.2.90.0100.05312.68
5.2.80.0030.04312.68
5.2.70.0070.05012.68
5.2.60.0000.07012.68
5.2.50.0070.04312.68
5.2.40.0070.05712.68
5.2.30.0070.06012.68
5.2.20.0070.04712.68
5.2.10.0030.03012.68
5.2.00.0130.05312.68
5.1.60.0070.03012.68
5.1.50.0000.03012.68
5.1.40.0000.04012.68
5.1.30.0100.04312.68
5.1.20.0030.05012.68
5.1.10.0100.05012.68
5.1.00.0000.03712.68
5.0.50.0030.02712.68
5.0.40.0070.04012.68
5.0.30.0100.03012.68
5.0.20.0030.03012.68
5.0.10.0100.04012.68
5.0.00.0030.06312.68
4.4.90.0000.04012.68
4.4.80.0000.04012.68
4.4.70.0030.03312.68
4.4.60.0000.02012.68
4.4.50.0070.03712.68
4.4.40.0070.04012.68
4.4.30.0030.01712.68
4.4.20.0030.03312.68
4.4.10.0030.02712.68
4.4.00.0070.05012.68
4.3.110.0000.03712.68
4.3.100.0000.03712.68
4.3.90.0030.01712.68
4.3.80.0030.04712.68
4.3.70.0000.03712.68
4.3.60.0000.02012.68
4.3.50.0030.03312.68
4.3.40.0030.05012.68
4.3.30.0070.02312.68
4.3.20.0030.02312.68
4.3.10.0000.02012.68
4.3.00.0000.03712.68

preferences:
46.84 ms | 401 KiB | 5 Q