3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ErrorLog { static $errorArr = array(); public 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 = self::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; self::$errorArr[] = $err; if (!$suppress) { trigger_error($out, $level); } } public function throwDeprecated ($suppress = false) { // Call this method from INSIDE a deprecated function, self::throwError("Deprecated!", E_USER_NOTICE, $suppress, 2); } private 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.0100.00718.43
8.3.50.0090.00722.04
8.3.40.0120.00318.63
8.3.30.0110.00718.79
8.3.20.0000.00820.33
8.3.10.0000.00821.98
8.3.00.0080.00022.30
8.2.180.0120.00416.50
8.2.170.0120.00322.96
8.2.160.0070.00720.91
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0000.00726.16
8.2.120.0050.00319.36
8.2.110.0030.00621.00
8.2.100.0060.00617.72
8.2.90.0000.00719.09
8.2.80.0000.00817.97
8.2.70.0030.00717.63
8.2.60.0080.00017.80
8.2.50.0000.00818.07
8.2.40.0040.00418.09
8.2.30.0000.00818.05
8.2.20.0000.00817.67
8.2.10.0040.00417.61
8.2.00.0000.00717.78
8.1.280.0070.01125.92
8.1.270.0050.00324.01
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0060.00323.81
8.1.230.0040.00822.72
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0040.00817.35
8.1.190.0050.00317.53
8.1.180.0000.00818.10
8.1.170.0100.00018.52
8.1.160.0000.00821.91
8.1.150.0030.00618.61
8.1.140.0000.00717.36
8.1.130.0030.00317.88
8.1.120.0040.00417.37
8.1.110.0030.00517.37
8.1.100.0040.00417.44
8.1.90.0040.00417.43
8.1.80.0040.00417.43
8.1.70.0030.00317.23
8.1.60.0000.00817.53
8.1.50.0050.00317.55
8.1.40.0070.00017.53
8.1.30.0030.00517.63
8.1.20.0040.00417.59
8.1.10.0040.00417.55
8.1.00.0000.00817.49
8.0.300.0070.00018.77
8.0.290.0070.00017.28
8.0.280.0070.00018.43
8.0.270.0030.00317.36
8.0.260.0030.00316.98
8.0.250.0070.00016.93
8.0.240.0100.00017.00
8.0.230.0000.00716.97
8.0.220.0030.00316.86
8.0.210.0020.00516.90
8.0.200.0030.00316.89
8.0.190.0030.00716.94
8.0.180.0040.00416.87
8.0.170.0080.00017.01
8.0.160.0040.00417.00
8.0.150.0030.00316.93
8.0.140.0000.00716.88
8.0.130.0000.00713.38
8.0.120.0000.00816.86
8.0.110.0030.00616.92
8.0.100.0070.00016.85
8.0.90.0050.00216.99
8.0.80.0030.01316.99
8.0.70.0000.00717.06
8.0.60.0040.00416.82
8.0.50.0000.00816.91
8.0.30.0160.00616.96
8.0.20.0070.01317.40
8.0.10.0050.00317.04
8.0.00.0120.01016.69
7.4.330.0000.00515.09
7.4.320.0030.00316.66
7.4.300.0030.00316.50
7.4.290.0030.00316.54
7.4.280.0040.00416.54
7.4.270.0000.00716.55
7.4.260.0030.00616.44
7.4.250.0000.00716.62
7.4.240.0020.00616.61
7.4.230.0070.00016.50
7.4.220.0090.00916.54
7.4.210.0110.00516.63
7.4.200.0030.00316.56
7.4.190.0030.00316.55
7.4.160.0000.01616.81
7.4.150.0110.00517.40
7.4.140.0110.00717.86
7.4.130.0120.00816.53
7.4.120.0130.00416.52
7.4.110.0120.00616.55
7.4.100.0100.00716.68
7.4.90.0180.00016.49
7.4.80.0080.01416.57
7.4.70.0200.00316.57
7.4.60.0060.01116.63
7.4.50.0000.00816.14
7.4.40.0070.00722.77
7.4.30.0060.01116.73
7.4.10.0030.01314.93
7.4.00.0110.00614.92
7.3.330.0060.00013.46
7.3.320.0000.00613.46
7.3.310.0030.00316.50
7.3.300.0030.00316.36
7.3.290.0040.01116.45
7.3.280.0080.00816.43
7.3.270.0080.00817.40
7.3.260.0070.01016.68
7.3.250.0080.00816.56
7.3.240.0070.01016.66
7.3.230.0060.01216.70
7.3.210.0110.00716.64
7.3.200.0130.00619.39
7.3.190.0100.00716.46
7.3.180.0030.01316.52
7.3.170.0050.01616.70
7.3.160.0060.01016.72
7.3.130.0040.01514.75
7.3.120.0020.01216.01
7.3.110.0020.01016.10
7.3.100.0060.00716.00
7.3.90.0080.00316.09
7.3.80.0070.00916.07
7.3.70.0070.00915.95
7.3.60.0050.00715.95
7.3.50.0050.00915.96
7.3.40.0100.00616.01
7.3.30.0090.00515.89
7.3.20.0050.00917.04
7.3.10.0050.00816.97
7.3.00.0070.01017.00
7.2.330.0100.00716.88
7.2.320.0030.02016.81
7.2.310.0110.01116.73
7.2.300.0080.00916.75
7.2.290.0100.00716.68
7.2.260.0090.00915.06
7.2.250.0040.01515.08
7.2.240.0090.00616.23
7.2.230.0110.00316.18
7.2.220.0010.01216.13
7.2.210.0070.00516.08
7.2.200.0060.00716.09
7.2.190.0050.01016.15
7.2.180.0040.01316.24
7.2.170.0060.00515.97
7.2.160.0050.01116.15
7.2.150.0050.01017.08
7.2.140.0100.00716.98
7.2.130.0050.00817.17
7.2.120.0060.00517.09
7.2.110.0050.01216.88
7.2.100.0040.01317.07
7.2.90.0030.01017.01
7.2.80.0050.01017.03
7.2.70.0050.01217.00
7.2.60.0060.00816.97
7.2.50.0050.01017.18
7.2.40.0070.00917.03
7.2.30.0090.00517.03
7.2.20.0060.01117.09
7.2.10.0050.00916.98
7.2.00.0060.00917.03
7.1.330.0050.00816.43
7.1.320.0050.00816.60
7.1.310.0070.00816.39
7.1.300.0050.00916.48
7.1.290.0100.00316.58
7.1.280.0080.00516.49
7.1.270.0060.00616.49
7.1.260.0040.01316.47
7.1.250.0070.00516.49
7.1.240.0060.00615.59
7.1.230.0040.00715.89
7.1.220.0030.01015.94
7.1.210.0070.00715.82
7.1.200.0060.00815.68
7.1.190.0070.00715.68
7.1.180.0040.01115.77
7.1.170.0000.01115.98
7.1.160.0030.00915.73
7.1.150.0030.01015.80
7.1.140.0080.00415.95
7.1.130.0040.00415.95
7.1.120.0000.01315.80
7.1.110.0030.01015.67
7.1.100.0060.00616.03
7.1.90.0030.00715.88
7.1.80.0080.00415.86
7.1.70.0000.00816.40
7.1.60.0020.01217.90
7.1.50.0060.00516.25
7.1.40.0040.00815.76
7.1.30.0000.01015.82
7.1.20.0040.01115.84
7.1.10.0070.00715.54
7.1.00.0110.03519.08
7.0.330.0040.01115.59
7.0.320.0070.01015.59
7.0.310.0080.00315.25
7.0.300.0000.01115.45
7.0.290.0040.00815.33
7.0.280.0030.01015.50
7.0.270.0030.01215.42
7.0.260.0030.01015.48
7.0.250.0000.01215.39
7.0.240.0040.00415.55
7.0.230.0040.00715.47
7.0.220.0060.00315.31
7.0.210.0060.00315.34
7.0.200.0060.00716.07
7.0.190.0070.00715.21
7.0.180.0030.01015.44
7.0.170.0070.00415.54
7.0.160.0100.00315.57
7.0.150.0090.00615.63
7.0.140.0090.03718.74
7.0.130.0030.00915.18
7.0.120.0070.00715.57
7.0.110.0060.00615.38
7.0.100.0090.00615.54
7.0.90.0030.01215.26
7.0.80.0030.02817.72
7.0.70.0080.04017.73
7.0.60.0070.03717.69
7.0.50.0310.04017.98
7.0.40.0120.04016.82
7.0.30.0070.03216.80
7.0.20.0080.02516.87
7.0.10.0100.03716.82
7.0.00.0070.04316.61
5.6.400.0110.00714.70
5.6.390.0030.01014.75
5.6.380.0000.01114.50
5.6.370.0030.01014.61
5.6.360.0030.01214.70
5.6.350.0030.01014.80
5.6.340.0040.01114.48
5.6.330.0090.00514.65
5.6.320.0080.00414.63
5.6.310.0030.00914.36
5.6.300.0060.00614.24
5.6.290.0000.00914.00
5.6.280.0060.04017.64
5.6.270.0000.01414.60
5.6.260.0060.00314.75
5.6.250.0040.00414.34
5.6.240.0100.00414.26
5.6.230.0040.03317.56
5.6.220.0110.02017.68
5.6.210.0090.04317.48
5.6.200.0080.04217.79
5.6.190.0100.03517.81
5.6.180.0120.03517.74
5.6.170.0070.03517.73
5.6.160.0080.02417.66
5.6.150.0030.04617.71
5.6.140.0080.03317.58
5.6.130.0020.02717.92
5.6.120.0070.02217.71
5.6.110.0040.03017.68
5.6.100.0080.03617.76
5.6.90.0110.04317.54
5.6.80.0110.04117.38
5.6.70.0050.03117.41
5.6.60.0050.02817.32
5.6.50.0070.03317.39
5.6.40.0030.04517.32
5.6.30.0070.02417.35
5.6.20.0040.02717.30
5.6.10.0160.02817.37
5.6.00.0080.04517.19
5.5.380.0110.00414.30
5.5.370.0020.04917.43
5.5.360.0070.02717.29
5.5.350.0060.03517.45
5.5.340.0020.04017.68
5.5.330.0060.02817.48
5.5.320.0050.02617.59
5.5.310.0050.02717.43
5.5.300.0050.03417.71
5.5.290.0080.02217.71
5.5.280.0050.02117.69
5.5.270.0060.03317.48
5.5.260.0080.03517.56
5.5.250.0050.03517.63
5.5.240.0050.04017.36
5.5.230.0050.04317.24
5.5.220.0040.02617.25
5.5.210.0120.03417.22
5.5.200.0060.03317.07
5.5.190.0070.04717.19
5.5.180.0050.02617.32
5.5.170.0000.01714.21
5.5.160.0030.04317.02
5.5.150.0050.02817.10
5.5.140.0030.03017.33
5.5.130.0100.03917.09
5.5.120.0030.03317.26
5.5.110.0070.02517.27
5.5.100.0100.03517.30
5.5.90.0070.03517.29
5.5.80.0190.02817.28
5.5.70.0030.02917.17
5.5.60.0020.04217.02
5.5.50.0070.03217.33
5.5.40.0120.03517.14
5.5.30.0050.02517.20
5.5.20.0030.02517.30
5.5.10.0050.02817.15
5.5.00.0080.04317.17
5.4.450.0030.02415.37
5.4.440.0030.04215.47
5.4.430.0030.04315.26
5.4.420.0020.04715.26
5.4.410.0090.03815.26
5.4.400.0100.03315.09
5.4.390.0090.03914.98
5.4.380.0070.04315.11
5.4.370.0040.03515.12
5.4.360.0050.03615.15
5.4.350.0030.03315.28
5.4.340.0000.03615.06
5.4.330.0030.01011.30
5.4.320.0110.03315.24
5.4.310.0060.02015.17
5.4.300.0070.02815.02
5.4.290.0020.04514.99
5.4.280.0030.04315.23
5.4.270.0090.03614.89
5.4.260.0030.03215.06
5.4.250.0030.04515.01
5.4.240.0070.03215.00
5.4.230.0070.02315.16
5.4.220.0070.04015.05
5.4.210.0050.04215.19
5.4.200.0100.03015.02
5.4.190.0040.03715.10
5.4.180.0030.04614.95
5.4.170.0030.03015.15
5.4.160.0080.04315.19
5.4.150.0080.03615.04
5.4.140.0070.02513.83
5.4.130.0080.03313.79
5.4.120.0070.03513.91
5.4.110.0050.04313.83
5.4.100.0070.03913.98
5.4.90.0050.03713.93
5.4.80.0130.03213.83
5.4.70.0060.02013.75
5.4.60.0070.03013.70
5.4.50.0050.02713.74
5.4.40.0100.02513.79
5.4.30.0050.02713.94
5.4.20.0020.03313.89
5.4.10.0070.02013.97
5.4.00.0070.04213.36
5.3.290.0070.01812.67
5.3.280.0030.03912.65
5.3.270.0050.03612.61
5.3.260.0070.02212.63
5.3.250.0050.04012.78
5.3.240.0080.03812.58
5.3.230.0010.02612.51
5.3.220.0020.03512.63
5.3.210.0080.02712.58
5.3.200.0020.03112.46
5.3.190.0050.02012.63
5.3.180.0100.02012.71
5.3.170.0070.02712.61
5.3.160.0020.02912.70
5.3.150.0080.03112.69
5.3.140.0080.02812.66
5.3.130.0080.03312.56
5.3.120.0050.04012.56
5.3.110.0100.03212.71
5.3.100.0080.03912.43
5.3.90.0080.02512.37
5.3.80.0070.04012.42
5.3.70.0080.03612.30
5.3.60.0050.03512.17
5.3.50.0040.03212.29
5.3.40.0070.04012.27
5.3.30.0030.04512.31
5.3.20.0050.02212.19
5.3.10.0000.04112.08
5.3.00.0080.02812.07
5.2.170.0030.06313.60
5.2.160.0130.05713.60
5.2.150.0030.06013.60
5.2.140.0030.04713.60
5.2.130.0070.03713.60
5.2.120.0000.03313.60
5.2.110.0030.06013.60
5.2.100.0100.05713.60
5.2.90.0070.06013.60
5.2.80.0030.04713.60
5.2.70.0100.03013.60
5.2.60.0100.04713.60
5.2.50.0100.05713.60
5.2.40.0100.05313.60
5.2.30.0070.04013.60
5.2.20.0070.03013.60
5.2.10.0130.05313.60
5.2.00.0070.06013.60
5.1.60.0000.05013.60
5.1.50.0030.05713.60
5.1.40.0030.04713.60
5.1.30.0030.04713.60
5.1.20.0000.03313.60
5.1.10.0000.02713.60
5.1.00.0100.04313.60
5.0.50.0030.04313.60
5.0.40.0000.04013.60
5.0.30.0000.06713.60
5.0.20.0030.03013.60
5.0.10.0070.03713.60
5.0.00.0030.06713.60
4.4.90.0000.01713.60
4.4.80.0100.01313.60
4.4.70.0000.03713.60
4.4.60.0030.03313.60
4.4.50.0100.02713.60
4.4.40.0000.04013.60
4.4.30.0030.03713.60
4.4.20.0000.02013.60
4.4.10.0030.03713.60
4.4.00.0100.04313.60
4.3.110.0000.03013.60
4.3.100.0070.02713.60
4.3.90.0000.03713.60
4.3.80.0030.05713.60
4.3.70.0000.03713.60
4.3.60.0070.03013.60
4.3.50.0030.04013.60
4.3.40.0000.03713.60
4.3.30.0030.02713.60
4.3.20.0030.03313.60
4.3.10.0000.02713.60
4.3.00.0070.03013.60

preferences:
42.41 ms | 401 KiB | 5 Q