3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ErrorLog { static $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 = 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 static function throwDeprecated ($suppress = false) { // Call this method from INSIDE a deprecated function, self::throwError("Deprecated!", E_USER_NOTICE, $suppress, 2); } 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.0120.00416.75
8.3.50.0110.00918.46
8.3.40.0150.00019.14
8.3.30.0100.00718.93
8.3.20.0040.00418.73
8.3.10.0090.00020.71
8.3.00.0050.00319.51
8.2.180.0150.00717.00
8.2.170.0060.01222.96
8.2.160.0030.01218.96
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0030.00618.83
8.2.110.0100.00020.89
8.2.100.0090.00317.97
8.2.90.0050.00519.36
8.2.80.0000.00819.38
8.2.70.0060.00317.63
8.2.60.0060.00318.03
8.2.50.0000.00919.35
8.2.40.0050.00319.88
8.2.30.0040.00418.11
8.2.20.0030.00717.68
8.2.10.0040.00417.95
8.2.00.0000.00717.78
8.1.280.0030.01225.92
8.1.270.0040.00423.99
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00322.59
8.1.230.0040.00720.97
8.1.220.0050.00317.74
8.1.210.0040.00819.04
8.1.200.0060.00317.35
8.1.190.0000.00817.63
8.1.180.0030.00518.10
8.1.170.0030.00518.97
8.1.160.0020.00518.85
8.1.150.0030.00518.63
8.1.140.0030.00517.42
8.1.130.0030.00317.92
8.1.120.0090.00017.45
8.1.110.0040.00417.48
8.1.100.0000.00817.43
8.1.90.0040.00417.51
8.1.80.0040.00417.46
8.1.70.0070.00017.50
8.1.60.0040.00417.64
8.1.50.0030.00517.50
8.1.40.0000.00917.52
8.1.30.0030.00617.61
8.1.20.0000.00817.59
8.1.10.0000.00817.63
8.1.00.0040.00417.54
8.0.300.0070.00020.12
8.0.290.0080.00017.00
8.0.280.0040.00218.49
8.0.270.0000.00717.21
8.0.260.0030.00316.94
8.0.250.0030.00517.09
8.0.240.0030.00316.99
8.0.230.0030.00316.97
8.0.220.0000.00817.05
8.0.210.0000.00716.96
8.0.200.0040.00416.96
8.0.190.0030.00517.06
8.0.180.0050.00217.06
8.0.170.0090.00016.95
8.0.160.0000.00716.96
8.0.150.0000.01016.89
8.0.140.0060.00216.89
8.0.130.0030.00313.39
8.0.120.0000.00816.93
8.0.110.0060.00316.95
8.0.100.0080.00016.85
8.0.90.0040.00416.94
8.0.80.0120.00316.98
8.0.70.0040.00416.89
8.0.60.0000.00816.81
8.0.50.0050.00216.96
8.0.30.0090.00616.91
8.0.20.0170.00417.27
8.0.10.0040.00417.17
8.0.00.0140.00616.99
7.4.330.0000.00613.05
7.4.320.0030.00316.58
7.4.300.0030.00616.54
7.4.290.0040.00416.46
7.4.280.0000.00816.55
7.4.270.0000.00716.68
7.4.260.0000.00513.39
7.4.250.0040.00416.68
7.4.240.0030.00316.55
7.4.230.0000.00816.54
7.4.220.0030.01916.75
7.4.210.0170.00316.63
7.4.200.0000.00816.66
7.4.190.0000.00716.61
7.4.160.0030.01316.70
7.4.150.0070.01116.64
7.4.140.0130.00316.77
7.4.130.0090.00916.43
7.4.120.0140.00416.51
7.4.110.0180.00016.46
7.4.100.0130.00716.66
7.4.90.0110.00716.61
7.4.80.0080.01016.50
7.4.70.0100.00716.75
7.4.60.0080.00816.68
7.4.50.0030.00316.72
7.4.40.0100.00616.59
7.4.30.0120.00716.43
7.4.10.0060.01015.30
7.4.00.0050.01015.00
7.3.330.0030.00313.33
7.3.320.0060.00013.41
7.3.310.0040.00416.43
7.3.300.0000.00716.48
7.3.290.0110.00516.48
7.3.280.0110.00516.42
7.3.270.0100.00716.52
7.3.260.0150.00316.73
7.3.250.0090.01116.58
7.3.240.0170.00016.52
7.3.230.0140.00316.41
7.3.210.0030.02016.43
7.3.200.0070.01519.39
7.3.190.0100.01316.64
7.3.180.0000.01616.51
7.3.170.0060.00916.61
7.3.160.0130.00316.52
7.3.130.0090.00914.68
7.3.120.0070.01015.08
7.3.110.0080.01114.85
7.3.100.0060.00915.16
7.3.90.0040.01114.94
7.3.80.0030.01614.92
7.3.70.0060.00314.67
7.3.60.0030.01014.84
7.3.50.0000.01414.88
7.3.40.0030.01114.72
7.3.30.0050.00314.78
7.3.20.0000.01016.89
7.3.10.0000.01616.68
7.3.00.0000.01416.78
7.2.330.0030.01316.91
7.2.320.0120.01216.77
7.2.310.0060.01216.57
7.2.300.0030.01516.59
7.2.290.0120.00616.83
7.2.260.0080.00615.32
7.2.250.0090.00315.41
7.2.240.0040.01215.15
7.2.230.0000.01315.41
7.2.220.0070.01115.34
7.2.210.0030.00615.00
7.2.200.0040.01115.19
7.2.190.0040.01114.92
7.2.180.0100.00015.28
7.2.170.0040.00815.19
7.2.160.0000.01115.22
7.2.150.0030.01017.05
7.2.140.0070.01116.99
7.2.130.0030.00617.00
7.2.120.0070.00716.78
7.2.110.0120.00616.86
7.2.100.0000.01516.90
7.2.90.0100.00717.03
7.2.80.0030.01316.91
7.2.70.0030.00916.78
7.2.60.0080.00317.11
7.2.50.0090.00617.10
7.2.40.0090.00916.58
7.2.30.0140.00416.95
7.2.20.0070.00717.13
7.2.10.0040.01216.82
7.2.00.0060.00617.00
7.1.330.0030.00815.72
7.1.320.0100.01015.89
7.1.310.0090.00015.71
7.1.300.0000.01615.86
7.1.290.0090.00615.84
7.1.280.0030.00915.87
7.1.270.0000.01115.53
7.1.260.0030.00615.87
7.1.250.0070.00415.97
7.1.240.0060.00615.57
7.1.230.0000.01315.88
7.1.220.0040.01115.77
7.1.210.0070.00415.75
7.1.200.0090.00615.95
7.1.190.0030.00915.80
7.1.180.0150.00015.79
7.1.170.0030.00915.93
7.1.160.0000.01715.77
7.1.150.0030.00815.98
7.1.140.0030.01015.95
7.1.130.0080.00615.87
7.1.120.0030.01015.84
7.1.110.0080.00815.78
7.1.100.0040.00815.70
7.1.90.0060.00615.87
7.1.80.0130.00315.78
7.1.70.0050.00616.33
7.1.60.0030.01517.50
7.1.50.0080.00816.40
7.1.40.0030.01015.63
7.1.30.0000.01515.86
7.1.20.0000.00915.92
7.1.10.0000.01415.98
7.1.00.0120.03219.15
7.0.330.0000.01215.42
7.0.320.0030.00615.28
7.0.310.0060.00915.13
7.0.300.0040.00815.37
7.0.290.0030.01015.18
7.0.280.0060.00315.42
7.0.270.0040.01115.11
7.0.260.0070.00715.27
7.0.250.0000.01115.47
7.0.240.0090.00615.64
7.0.230.0060.00615.48
7.0.220.0070.00715.51
7.0.210.0040.00715.18
7.0.200.0050.00515.84
7.0.190.0030.00615.53
7.0.180.0060.01115.40
7.0.170.0000.00915.56
7.0.160.0030.01015.39
7.0.150.0000.01415.64
7.0.140.0020.04318.69
7.0.130.0040.00815.38
7.0.120.0070.03518.79
7.0.110.0030.01315.18
7.0.100.0030.01315.40
7.0.90.0100.00615.36
7.0.80.0080.00315.45
7.0.70.0080.00415.27
7.0.60.0120.04017.70
7.0.50.0000.04316.64
7.0.40.0080.03816.90
7.0.30.0150.02916.80
7.0.20.0170.04316.82
7.0.10.0060.03016.85
7.0.00.0030.02816.79
5.6.400.0060.01114.53
5.6.390.0090.00614.43
5.6.380.0030.00614.04
5.6.370.0000.01414.43
5.6.360.0030.00914.39
5.6.350.0000.01814.51
5.6.340.0040.00814.17
5.6.330.0040.00814.82
5.6.320.0130.00314.11
5.6.310.0060.00914.72
5.6.300.0040.00714.33
5.6.290.0030.01014.39
5.6.280.0080.03517.54
5.6.270.0100.00314.40
5.6.260.0040.01214.10
5.6.250.0060.00914.50
5.6.240.0060.00314.63
5.6.230.0000.01214.36
5.6.220.0040.00714.52
5.6.210.0020.02717.61
5.6.200.0050.02316.19
5.6.190.0080.02717.52
5.6.180.0300.03917.56
5.6.170.0180.03517.44
5.6.160.0040.04117.48
5.6.150.0000.02616.40
5.6.140.0120.04016.38
5.6.130.0030.04616.38
5.6.120.0050.02117.62
5.6.110.0080.04017.75
5.6.100.0080.04117.72
5.6.90.0080.04517.74
5.6.80.0130.03817.45
5.6.70.0090.00614.46
5.6.60.0060.00614.35
5.6.50.0040.01114.52
5.6.40.0040.01114.66
5.6.30.0040.00414.44
5.6.20.0040.00814.36
5.6.10.0060.01314.41
5.6.00.0030.01514.49
5.5.380.0110.00414.54
5.5.370.0040.00814.59
5.5.360.0070.00714.35
5.5.350.0030.02117.42
5.5.340.0050.03816.17
5.5.330.0100.04017.48
5.5.320.1700.03017.51
5.5.310.0210.03817.20
5.5.300.0100.02216.22
5.5.290.0060.02316.17
5.5.280.0090.03217.59
5.5.270.0130.03717.51
5.5.260.0020.04117.51
5.5.250.0080.04817.63
5.5.240.0080.04217.22
5.5.230.0080.00314.38
5.5.220.0050.00514.16
5.5.210.0070.01014.34
5.5.200.0060.00314.22
5.5.190.0000.01014.27
5.5.180.0090.00614.40
5.5.170.0100.00714.41
5.5.160.0140.00314.38
5.5.150.0030.01014.00
5.5.140.0030.01014.63
5.5.130.0040.00414.41
5.5.120.0030.00714.22
5.5.110.0030.01014.39
5.5.100.0040.01214.37
5.5.90.0000.00814.16
5.5.80.0030.01014.31
5.5.70.0040.01114.22
5.5.60.0000.01414.58
5.5.50.0100.01014.22
5.5.40.0090.00614.32
5.5.30.0040.01514.43
5.5.20.0110.00414.20
5.5.10.0000.01314.34
5.5.00.0000.01214.11
5.4.450.0080.02515.75
5.4.440.0030.04215.90
5.4.430.0100.02815.76
5.4.420.0000.02815.70
5.4.410.0050.03015.83
5.4.400.0070.04215.70
5.4.390.0080.04015.69
5.4.380.0050.02215.73
5.4.370.0050.04215.57
5.4.360.0050.03815.69
5.4.350.0100.03715.65
5.4.340.0050.04415.69
5.4.330.0070.00712.23
5.4.320.0050.02515.54
5.4.310.0030.03815.69
5.4.300.0040.02815.65
5.4.290.0050.04415.69
5.4.280.0030.02115.68
5.4.270.0070.04015.54
5.4.260.0070.03715.69
5.4.250.0070.02915.68
5.4.240.0080.04015.68
5.4.230.0050.04215.72
5.4.220.0030.04315.71
5.4.210.0030.03015.61
5.4.200.0020.02415.69
5.4.190.0030.02315.73
5.4.180.0030.03015.65
5.4.170.0010.02415.71
5.4.160.0030.02415.68
5.4.150.0030.02715.73
5.4.140.0020.02014.35
5.4.130.0000.02414.29
5.4.120.0030.02314.30
5.4.110.0030.02314.35
5.4.100.0030.02114.34
5.4.90.0080.03314.35
5.4.80.0030.02114.30
5.4.70.0020.02314.32
5.4.60.0030.02014.31
5.4.50.0060.01714.29
5.4.40.0070.01714.37
5.4.30.0050.01714.27
5.4.20.0030.02214.42
5.4.10.0060.02014.25
5.4.00.0000.02414.07
5.3.290.0070.02513.46
5.3.280.0060.02313.45
5.3.270.0060.02313.39
5.3.260.0020.02613.44
5.3.250.0060.01713.43
5.3.240.0030.02213.44
5.3.230.0020.02313.37
5.3.220.0070.01813.41
5.3.210.0080.01813.46
5.3.200.0060.01713.44
5.3.190.0000.02413.41
5.3.180.0040.02213.44
5.3.170.0020.02013.44
5.3.160.0030.02313.41
5.3.150.0030.02213.41
5.3.140.0030.02113.43
5.3.130.0040.02213.42
5.3.120.0050.02313.40
5.3.110.0040.02113.42
5.3.100.0050.02013.16
5.3.90.0040.02213.10
5.3.80.0010.02313.14
5.3.70.0040.02113.16
5.3.60.0080.01713.09
5.3.50.0040.02313.11
5.3.40.0060.02313.13
5.3.30.0060.01813.11
5.3.20.0050.01812.99
5.3.10.0030.02012.98
5.3.00.0040.01812.89
5.2.170.0070.02311.19
5.2.160.0030.02711.20
5.2.150.0000.03011.27
5.2.140.0030.03011.32
5.2.130.0070.02311.07
5.2.120.0000.03011.14
5.2.110.0000.03711.28
5.2.100.0030.02711.21
5.2.90.0030.03011.04
5.2.80.0000.03711.13
5.2.70.0030.04311.20
5.2.60.0030.07011.15
5.2.50.0000.06311.04
5.2.40.0000.06310.99
5.2.30.0030.04311.05
5.2.20.0030.03011.14
5.2.10.0000.05710.93
5.2.00.0100.02010.75
5.1.60.0030.05310.05
5.1.50.0000.02710.03
5.1.40.0070.0479.98
5.1.30.0100.05310.38
5.1.20.0000.03310.44
5.1.10.0070.05310.07
5.1.00.0100.02010.13
5.0.50.0030.0238.58
5.0.40.0070.0238.42
5.0.30.0070.0278.17
5.0.20.0000.0338.30
5.0.10.0070.0138.35
5.0.00.0030.0708.17
4.4.90.0030.0238.02
4.4.80.0000.0378.02
4.4.70.0030.0178.02
4.4.60.0000.0338.02
4.4.50.0000.0308.02
4.4.40.0000.0408.02
4.4.30.0000.0208.02
4.4.20.0030.0338.02
4.4.10.0030.0178.02
4.4.00.0000.0278.02
4.3.110.0030.0278.02
4.3.100.0000.0178.02
4.3.90.0000.0338.02
4.3.80.0000.0308.02
4.3.70.0000.0178.02
4.3.60.0030.0338.02
4.3.50.0000.0408.02
4.3.40.0030.0308.02
4.3.30.0070.0238.02
4.3.20.0000.0238.02
4.3.10.0000.0278.02
4.3.00.0030.0238.02

preferences:
42.56 ms | 401 KiB | 5 Q