3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ErrorLog { 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 = $this->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"] . "."; } } $out = "\"" . $err . "\" " . $info; if (!$suppress) { trigger_error($out, $level); } } function throwDeprecated ($suppress = false) { // Call this method from INSIDE a deprecated function, $this->throwError("Deprecated!", E_USER_NOTICE, $suppress, 2); } 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.0110.00416.88
8.3.50.0140.00617.37
8.3.40.0140.00018.79
8.3.30.0120.00618.73
8.3.20.0080.00018.73
8.3.10.0040.00418.77
8.3.00.0060.00319.25
8.2.180.0150.00016.63
8.2.170.0060.00922.96
8.2.160.0110.00420.92
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00422.08
8.2.110.0060.00321.06
8.2.100.0000.01217.72
8.2.90.0040.00419.22
8.2.80.0040.00419.47
8.2.70.0040.00417.62
8.2.60.0000.01017.89
8.2.50.0040.00418.07
8.2.40.0030.00518.20
8.2.30.0000.00717.93
8.2.20.0020.00517.69
8.2.10.0080.00017.58
8.2.00.0040.00417.78
8.1.280.0070.00725.92
8.1.270.0080.00024.66
8.1.260.0000.00826.35
8.1.250.0050.00328.09
8.1.240.0040.00722.43
8.1.230.0070.00421.02
8.1.220.0040.00417.74
8.1.210.0060.00318.91
8.1.200.0060.00317.09
8.1.190.0030.00617.53
8.1.180.0000.00818.10
8.1.170.0040.00418.80
8.1.160.0040.00418.80
8.1.150.0040.00418.46
8.1.140.0040.00417.36
8.1.130.0000.00717.80
8.1.120.0050.00217.41
8.1.110.0000.00817.41
8.1.100.0000.00817.42
8.1.90.0000.00717.37
8.1.80.0020.00517.39
8.1.70.0000.00817.26
8.1.60.0030.00617.59
8.1.50.0040.00417.32
8.1.40.0000.00817.41
8.1.30.0050.00517.64
8.1.20.0060.00317.53
8.1.10.0040.00417.51
8.1.00.0070.00017.44
8.0.300.0050.00219.98
8.0.290.0000.00816.75
8.0.280.0000.00718.42
8.0.270.0030.00317.11
8.0.260.0000.00716.80
8.0.250.0000.00716.89
8.0.240.0040.00417.02
8.0.230.0040.00416.99
8.0.220.0030.00316.94
8.0.210.0040.00416.96
8.0.200.0000.00716.85
8.0.190.0070.00017.03
8.0.180.0000.00716.86
8.0.170.0080.00016.86
8.0.160.0040.00316.88
8.0.150.0000.00916.87
8.0.140.0060.00716.94
8.0.130.0030.00313.32
8.0.120.0040.00416.88
8.0.110.0050.00216.78
8.0.100.0000.00716.76
8.0.90.0000.00716.99
8.0.80.0100.01116.86
8.0.70.0000.00716.99
8.0.60.0040.00416.89
8.0.50.0050.00216.86
8.0.30.0190.00616.98
8.0.20.0100.01217.17
8.0.10.0000.00816.85
8.0.00.0140.00316.85
7.4.330.0000.00512.78
7.4.320.0070.00016.54
7.4.300.0060.00016.46
7.4.290.0050.00516.38
7.4.280.0080.00016.53
7.4.270.0030.00316.52
7.4.260.0050.00013.23
7.4.250.0060.00316.45
7.4.240.0000.00716.48
7.4.230.0030.00316.32
7.4.220.0090.01216.56
7.4.210.0060.00916.54
7.4.200.0040.00416.60
7.4.190.0030.00316.29
7.4.160.0120.00416.38
7.4.150.0130.00316.53
7.4.140.0040.01316.57
7.4.130.0090.00816.46
7.4.120.0080.00816.46
7.4.110.0110.00716.48
7.4.100.0110.01116.46
7.4.90.0070.01016.52
7.4.80.0090.00916.60
7.4.70.0090.00616.50
7.4.60.0060.00916.44
7.4.50.0060.00616.62
7.4.40.0040.01516.58
7.4.30.0100.00816.57
7.4.10.0070.01115.10
7.4.00.0120.00715.01
7.3.330.0090.00013.36
7.3.320.0030.00313.27
7.3.310.0040.00416.27
7.3.300.0040.00416.42
7.3.290.0030.01016.40
7.3.280.0120.00816.42
7.3.270.0140.00416.41
7.3.260.0120.01216.54
7.3.250.0090.00816.53
7.3.240.0070.01016.36
7.3.230.0110.00616.27
7.3.210.0060.01316.31
7.3.200.0080.00919.39
7.3.190.0070.01016.61
7.3.180.0090.00616.61
7.3.170.0080.00816.34
7.3.160.0100.00716.32
7.3.130.0070.01114.76
7.3.120.0090.00914.81
7.3.110.0100.00814.92
7.3.100.0050.00914.86
7.3.90.0080.00714.80
7.3.80.0040.00814.65
7.3.70.0050.01014.79
7.3.60.0060.00514.79
7.3.50.0070.00614.79
7.3.40.0020.01014.74
7.3.30.0090.00514.85
7.3.20.0040.00616.74
7.3.10.0060.00816.49
7.3.00.0050.00516.69
7.2.330.0070.01316.63
7.2.320.0100.00716.30
7.2.310.0070.01716.53
7.2.300.0070.01016.46
7.2.290.0030.01316.55
7.2.260.0050.01514.63
7.2.250.0060.00915.02
7.2.240.0090.00615.12
7.2.230.0060.00914.89
7.2.220.0030.01414.89
7.2.210.0000.01214.91
7.2.200.0080.00714.86
7.2.190.0070.00914.97
7.2.180.0050.00814.82
7.2.170.0070.00714.92
7.2.160.0090.00614.84
7.2.150.0050.00816.79
7.2.140.0050.00816.58
7.2.130.0070.00916.66
7.2.120.0060.00916.65
7.2.110.0020.01316.74
7.2.100.0060.00816.74
7.2.90.0080.00516.75
7.2.80.0050.01016.74
7.2.70.0040.00916.75
7.2.60.0040.00816.80
7.2.50.0030.01016.55
7.2.40.0070.01016.91
7.2.30.0070.00816.79
7.2.20.0030.01216.51
7.2.10.0100.00216.73
7.2.00.0050.00717.70
7.1.330.0100.00215.79
7.1.320.0060.00915.58
7.1.310.0060.00615.61
7.1.300.0030.00815.65
7.1.290.0060.00915.68
7.1.280.0060.00715.56
7.1.270.0030.00815.47
7.1.260.0050.00915.61
7.1.250.0000.01215.60
7.1.240.0070.00615.66
7.1.230.0070.00715.55
7.1.220.0040.00915.51
7.1.210.0070.00715.62
7.1.200.0080.00515.62
7.1.190.0060.00715.70
7.1.180.0020.00915.59
7.1.170.0060.00615.64
7.1.160.0090.00615.49
7.1.150.0030.00815.72
7.1.140.0060.00915.64
7.1.130.0020.01115.65
7.1.120.0020.00815.69
7.1.110.0030.01115.78
7.1.100.0080.00516.35
7.1.90.0070.00915.69
7.1.80.0080.00515.56
7.1.70.0070.00516.08
7.1.60.0050.00916.89
7.1.50.0090.00716.13
7.1.40.0070.00915.64
7.1.30.0060.00815.55
7.1.20.0070.00615.54
7.1.10.0060.00815.72
7.1.00.0030.01717.84
7.0.330.0030.01215.09
7.0.320.0050.00815.25
7.0.310.0030.01115.25
7.0.300.0060.00415.27
7.0.290.0060.01015.21
7.0.280.0050.00915.20
7.0.270.0050.01015.19
7.0.260.0020.01115.16
7.0.250.0070.00515.30
7.0.240.0050.00815.33
7.0.230.0050.00915.34
7.0.220.0100.00315.16
7.0.210.0000.01015.31
7.0.200.0120.00614.93
7.0.190.0030.01015.20
7.0.180.0040.00915.40
7.0.170.0070.00615.32
7.0.160.0060.00615.26
7.0.150.0050.00915.25
7.0.140.0050.03017.55
7.0.130.0030.00815.29
7.0.120.0070.01617.51
7.0.110.0020.01115.34
7.0.100.0090.00415.28
7.0.90.0070.00615.16
7.0.80.0020.00815.33
7.0.70.0040.00815.33
7.0.60.0060.02516.82
7.0.50.0100.02516.24
7.0.40.0050.03515.63
7.0.30.0150.03015.57
7.0.20.0130.03015.60
7.0.10.0040.02015.56
7.0.00.0080.03015.46
5.6.400.0040.01114.25
5.6.390.0030.01014.19
5.6.380.0040.00614.02
5.6.370.0050.00713.99
5.6.360.0070.00514.05
5.6.350.0030.01014.33
5.6.340.0030.01114.36
5.6.330.0030.00914.39
5.6.320.0050.00814.19
5.6.310.0090.00414.37
5.6.300.0050.00814.31
5.6.290.0100.00614.34
5.6.280.0040.02816.48
5.6.270.0070.00814.18
5.6.260.0060.00814.02
5.6.250.0080.00614.14
5.6.240.0070.00514.26
5.6.230.0030.00814.09
5.6.220.0070.00314.21
5.6.210.0080.02616.31
5.6.200.0060.02515.55
5.6.190.0090.02616.28
5.6.180.0140.01816.35
5.6.170.0160.02816.28
5.6.160.0070.02916.40
5.6.150.0060.02815.61
5.6.140.0080.03015.46
5.6.130.0070.01915.50
5.6.120.0050.01916.33
5.6.110.0040.03416.44
5.6.100.0060.03516.46
5.6.90.0060.03616.33
5.6.80.0040.02116.27
5.6.70.0080.00414.20
5.6.60.0030.01014.10
5.6.50.0110.00414.10
5.6.40.0110.00614.20
5.6.30.0050.00514.02
5.6.20.0100.00314.22
5.6.10.0030.01214.19
5.6.00.0080.00214.17
5.5.380.0040.00914.14
5.5.370.0030.01014.13
5.5.360.0040.00914.06
5.5.350.0120.02816.25
5.5.340.0020.02115.30
5.5.330.0070.02315.93
5.5.320.0220.01916.34
5.5.310.0140.03116.13
5.5.300.0110.02715.32
5.5.290.0080.02115.33
5.5.280.0030.02116.25
5.5.270.0050.03116.19
5.5.260.0050.01716.26
5.5.250.0070.03416.35
5.5.240.0100.02916.14
5.5.230.0020.01313.91
5.5.220.0040.00814.07
5.5.210.0080.00514.01
5.5.200.0110.00313.93
5.5.190.0040.00913.87
5.5.180.0050.01013.83
5.5.170.0090.00713.99
5.5.160.0070.00714.21
5.5.150.0050.01014.08
5.5.140.0070.00614.08
5.5.130.0060.00714.10
5.5.120.0050.01013.92
5.5.110.0040.01014.04
5.5.100.0080.00513.96
5.5.90.0110.00314.01
5.5.80.0040.00614.20
5.5.70.0110.00313.97
5.5.60.0060.01013.90
5.5.50.0050.01013.95
5.5.40.0030.01014.23
5.5.30.0090.00414.09
5.5.20.0070.00514.09
5.5.10.0050.00913.92
5.5.00.0090.00913.83
5.4.450.0060.01514.37
5.4.440.0030.02114.19
5.4.430.0040.01714.24
5.4.420.0020.03114.23
5.4.410.0020.02014.27
5.4.400.0030.02714.13
5.4.390.0020.03014.18
5.4.380.0050.02514.17
5.4.370.0050.02814.08
5.4.360.0040.03314.13
5.4.350.0080.02314.08
5.4.340.0020.02814.16
5.4.330.0050.00511.66
5.4.320.0030.03414.13
5.4.310.0050.02914.14
5.4.300.0060.02714.06
5.4.290.0040.03014.15
5.4.280.0040.02014.12
5.4.270.0030.01713.94
5.4.260.0050.02613.97
5.4.250.0020.02214.02
5.4.240.0070.02414.06
5.4.230.0030.02714.15
5.4.220.0070.02914.19
5.4.210.0060.01414.00
5.4.200.0040.02414.05
5.4.190.0050.02314.01
5.4.180.0080.01714.18
5.4.170.0000.02514.06
5.4.160.0090.02814.05
5.4.150.0030.01613.96
5.4.140.0030.01613.19
5.4.130.0060.02113.24
5.4.120.0010.03113.36
5.4.110.0060.02113.30
5.4.100.0050.01613.21
5.4.90.0030.01913.30
5.4.80.0020.01713.22
5.4.70.0090.02613.25
5.4.60.0070.02513.24
5.4.50.0050.01513.17
5.4.40.0060.02513.27
5.4.30.0020.01713.25
5.4.20.0030.03013.16
5.4.10.0050.01513.28
5.4.00.0060.02912.93
5.3.290.0030.02812.57
5.3.280.0070.02112.48
5.3.270.0030.02512.43
5.3.260.0060.02012.44
5.3.250.0030.01912.53
5.3.240.0050.01512.43
5.3.230.0080.02512.43
5.3.220.0040.02612.48
5.3.210.0050.02212.39
5.3.200.0020.01612.48
5.3.190.0020.01712.40
5.3.180.0040.01612.47
5.3.170.0090.02612.50
5.3.160.0030.02312.54
5.3.150.0070.01712.52
5.3.140.0060.02812.52
5.3.130.0020.03012.45
5.3.120.0030.02712.45
5.3.110.0040.02312.45
5.3.100.0070.01812.36
5.3.90.0040.01512.36
5.3.80.0050.02612.29
5.3.70.0020.03312.33
5.3.60.0040.02812.31
5.3.50.0030.02212.31
5.3.40.0070.02712.28
5.3.30.0040.01512.25
5.3.20.0060.02712.21
5.3.10.0050.02712.20
5.3.00.0030.03112.09
5.2.170.0100.05711.21
5.2.160.0030.04011.25
5.2.150.0030.04011.21
5.2.140.0030.03011.14
5.2.130.0130.02311.27
5.2.120.0070.06011.05
5.2.110.0000.06311.20
5.2.100.0130.05711.09
5.2.90.0000.06011.02
5.2.80.0070.04711.27
5.2.70.0000.03311.18
5.2.60.0030.03311.05
5.2.50.0030.05311.05
5.2.40.0030.03711.03
5.2.30.0070.03311.03
5.2.20.0030.06311.04
5.2.10.0000.06310.94
5.2.00.0070.05310.90
5.1.60.0030.0309.97
5.1.50.0000.0439.99
5.1.40.0070.0279.91
5.1.30.0070.05310.41
5.1.20.0100.05010.45
5.1.10.0000.04310.07
5.1.00.0030.03010.00
5.0.50.0000.0378.73
5.0.40.0000.0238.46
5.0.30.0000.0408.32
5.0.20.0030.0408.38
5.0.10.0030.0238.25
5.0.00.0030.0308.33
4.4.90.0030.0208.20
4.4.80.0070.0338.20
4.4.70.0000.0238.20
4.4.60.0000.0408.20
4.4.50.0030.0238.20
4.4.40.0070.0478.20
4.4.30.0000.0338.20
4.4.20.0030.0378.20
4.4.10.0030.0338.20
4.4.00.0030.0238.20
4.3.110.0000.0208.20
4.3.100.0000.0208.20
4.3.90.0130.0208.20
4.3.80.0030.0478.20
4.3.70.0000.0378.20
4.3.60.0030.0338.20
4.3.50.0030.0238.20
4.3.40.0030.0338.20
4.3.30.0000.0178.20
4.3.20.0000.0408.20
4.3.10.0030.0238.20
4.3.00.0000.0338.20

preferences:
43.42 ms | 401 KiB | 5 Q