3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private function x() { # retrieve caller name $calledby = debug_backtrace(); print_r($calledby); // does not work $caller = (strlen($calledby[1]['class'])) ? $calledby[1]['class'] : $calledby[0]['class']; // works and does does not segfault if (strlen($calledby[1]['class'])) $caller = $calledby[1]['class']; else $caller = $calledby[0]['class']; # arguments are required if (!func_num_args()) { return; } # fill variables with argument contents if exists $variables = (func_num_args() == 0) ? NULL : (is_array(func_get_arg(0)) ? func_get_arg(0) : NULL); } public function __construct() { $this->x(); } } new 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.0070.01016.50
8.3.50.0130.00817.42
8.3.40.0160.00318.83
8.3.30.0180.00318.58
8.3.20.0110.00418.43
8.3.10.0080.00020.57
8.3.00.0060.00919.08
8.2.180.0180.00416.38
8.2.170.0100.01022.96
8.2.160.0120.00321.13
8.2.150.0080.00024.18
8.2.140.0090.00024.66
8.2.130.0110.00426.16
8.2.120.0040.00420.96
8.2.110.0000.01020.91
8.2.100.0080.00417.91
8.2.90.0060.00321.24
8.2.80.0050.00219.41
8.2.70.0000.00817.63
8.2.60.0050.00317.93
8.2.50.0030.00518.07
8.2.40.0040.00418.28
8.2.30.0060.00318.18
8.2.20.0040.00417.82
8.2.10.0030.00617.68
8.2.00.0000.00717.80
8.1.280.0100.00325.92
8.1.270.0070.00024.66
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0060.00322.47
8.1.230.0040.00820.91
8.1.220.0000.00817.74
8.1.210.0060.00318.91
8.1.200.0000.00917.22
8.1.190.0000.00917.53
8.1.180.0080.00418.10
8.1.170.0050.00318.75
8.1.160.0000.00818.81
8.1.150.0040.00418.69
8.1.140.0000.00717.44
8.1.130.0000.00717.84
8.1.120.0000.00817.54
8.1.110.0040.00417.36
8.1.100.0070.00017.45
8.1.90.0000.00717.52
8.1.80.0030.00517.45
8.1.70.0030.00317.38
8.1.60.0040.00417.58
8.1.50.0040.00417.35
8.1.40.0030.00617.43
8.1.30.0000.00817.65
8.1.20.0040.00417.57
8.1.10.0030.00617.47
8.1.00.0040.00417.46
8.0.300.0050.00319.90
8.0.290.0040.00416.75
8.0.280.0000.00818.47
8.0.270.0000.00717.23
8.0.260.0030.00316.89
8.0.250.0040.00416.97
8.0.240.0070.00016.86
8.0.230.0030.00316.96
8.0.220.0030.00316.96
8.0.210.0000.00716.91
8.0.200.0040.00416.89
8.0.190.0060.00316.96
8.0.180.0040.00416.84
8.0.170.0000.00916.88
8.0.160.0080.00016.95
8.0.150.0030.00516.79
8.0.140.0060.00316.79
8.0.130.0000.00513.36
8.0.120.0040.00416.78
8.0.110.0040.00416.85
8.0.100.0040.00416.83
8.0.90.0000.00816.94
8.0.80.0070.01416.86
8.0.70.0040.00416.77
8.0.60.0040.00416.79
8.0.50.0070.00016.83
8.0.30.0110.00817.17
8.0.20.0090.01317.28
8.0.10.0040.00416.80
8.0.00.0180.00116.79
7.4.330.0000.00512.94
7.4.320.0070.00016.53
7.4.300.0000.00616.43
7.4.290.0060.00016.55
7.4.280.0050.00316.63
7.4.270.0070.00016.61
7.4.260.0000.00613.26
7.4.250.0000.00716.45
7.4.240.0020.00516.47
7.4.230.0030.00316.33
7.4.220.0080.00816.49
7.4.210.0070.00816.57
7.4.200.0050.00316.70
7.4.190.0000.00716.66
7.4.160.0170.00016.55
7.4.150.0070.01116.71
7.4.140.0090.00916.54
7.4.130.0100.01116.36
7.4.120.0110.00616.48
7.4.110.0070.01016.52
7.4.100.0100.00716.46
7.4.90.0000.01916.52
7.4.80.0130.00416.50
7.4.70.0100.00716.38
7.4.60.0110.00616.67
7.4.50.0060.00316.21
7.4.40.0030.00816.20
7.4.30.0060.00916.55
7.4.00.0050.00915.05
7.3.330.0070.00013.16
7.3.320.0030.00313.29
7.3.310.0000.00716.27
7.3.300.0030.00316.19
7.3.290.0100.00316.34
7.3.280.0080.00716.34
7.3.270.0120.01516.46
7.3.260.0080.00816.30
7.3.250.0070.01116.44
7.3.240.0170.00616.38
7.3.230.0070.01116.59
7.3.210.0100.00716.32
7.3.200.0100.01219.39
7.3.190.0060.01516.57
7.3.180.0170.00016.46
7.3.170.0030.01416.59
7.3.160.0120.00916.38
7.3.120.0050.00814.64
7.3.110.0070.01014.57
7.3.100.0070.01014.99
7.3.90.0170.00014.76
7.3.80.0030.01314.71
7.3.70.0000.01314.54
7.3.60.0060.00614.49
7.3.50.0030.01014.86
7.3.40.0110.00014.50
7.3.30.0040.00414.68
7.3.20.0080.00816.64
7.3.10.0090.00416.46
7.3.00.0040.00816.41
7.2.330.0090.00916.73
7.2.320.0040.01816.76
7.2.310.0080.01216.66
7.2.300.0100.00716.82
7.2.290.0110.01116.57
7.2.250.0100.00715.22
7.2.240.0000.01715.06
7.2.230.0090.00914.76
7.2.220.0070.01015.26
7.2.210.0040.01115.02
7.2.200.0110.00415.13
7.2.190.0000.01615.08
7.2.180.0060.00614.95
7.2.170.0030.00714.55
7.2.130.0060.00616.97
7.2.120.0030.00916.90
7.2.110.0080.00416.82
7.2.100.0060.00616.55
7.2.90.0100.00317.00
7.2.80.0080.01216.84
7.2.70.0090.00917.01
7.2.60.0070.01116.81
7.2.50.0030.01416.75
7.2.40.0080.00516.90
7.2.30.0070.00716.75
7.2.20.0070.00316.77
7.2.10.0000.01416.56
7.2.00.0050.00818.09
7.1.330.0040.01115.73
7.1.320.0060.00615.93
7.1.310.0060.00915.58
7.1.300.0030.00915.58
7.1.290.0040.00415.57
7.1.280.0090.00315.67
7.1.270.0110.00415.82
7.1.260.0090.00315.56
7.1.250.0000.00915.76
7.1.100.0130.00018.04
7.1.70.0040.00417.25
7.1.60.0070.01819.40
7.1.50.0130.00016.91
7.1.00.0130.06322.51
7.0.200.0000.00916.75
7.0.140.0070.07022.01
7.0.120.0100.06722.15
7.0.110.0030.06019.89
7.0.100.0070.07019.98
7.0.90.0030.08320.00
7.0.80.0130.06720.09
7.0.70.0070.08019.86
7.0.60.0030.09019.99
7.0.50.0030.05320.19
7.0.40.0130.07720.27
7.0.30.0070.08320.16
7.0.20.0070.08720.12
7.0.10.0130.06020.07
7.0.00.0070.04320.02
5.6.250.0100.08020.69
5.6.240.0130.07720.68
5.6.230.0070.08320.69
5.6.220.0000.05320.68
5.6.210.0130.06720.70
5.6.200.0000.05721.15
5.6.190.0070.08021.13
5.6.180.0100.06020.95
5.6.170.0070.04320.99
5.6.160.0030.08321.22
5.6.150.0070.04320.99
5.6.140.0100.08321.09
5.6.130.0130.07321.19
5.6.120.0130.03721.09
5.6.110.0100.08020.95
5.6.100.0030.05721.13
5.6.90.0130.07721.01
5.6.80.0130.03720.59
5.6.70.0070.06720.34
5.6.60.0000.08320.33
5.6.50.0100.07720.47
5.6.40.0030.08320.48
5.6.30.0100.07320.32
5.6.20.0100.07020.46
5.6.10.0100.07020.44
5.6.00.0070.07320.43
5.5.380.0100.06320.58
5.5.370.0100.07720.30
5.5.360.0070.08320.53
5.5.350.0100.07020.39
5.5.340.0070.08020.97
5.5.330.0100.08021.05
5.5.320.0130.07720.79
5.5.310.0130.06320.99
5.5.300.0170.07720.81
5.5.290.0170.07720.70
5.5.280.0170.03720.99
5.5.270.0070.06720.72
5.5.260.0170.07320.98
5.5.250.0100.07020.49
5.5.240.0100.08020.15
5.5.230.0170.06720.29
5.5.220.0070.08020.28
5.5.210.0070.06720.28
5.5.200.0030.07020.25
5.5.190.0130.06720.26
5.5.180.0070.06720.22
5.5.160.0030.07720.32
5.5.150.0030.07720.34
5.5.140.0030.07720.19
5.5.130.0070.07720.32
5.5.120.0130.06720.39
5.5.110.0100.07720.28
5.5.100.0170.07320.18
5.5.90.0100.06020.11
5.5.80.0130.07720.23
5.5.70.0170.07020.22
5.5.60.0100.07719.98
5.5.50.0130.07720.14
5.5.40.0100.05720.20
5.5.30.0000.09019.96
5.5.20.0130.06720.15
5.5.10.0070.06720.12
5.5.00.0130.04320.03
5.4.450.0100.08019.51
5.4.440.0100.08019.27
5.4.430.0130.06019.33
5.4.420.0100.07719.27
5.4.410.0100.07319.36
5.4.400.0030.07719.00
5.4.390.0070.07319.00
5.4.380.0130.07318.98
5.4.370.0100.07318.96
5.4.360.0070.07719.14
5.4.350.0130.06719.34
5.4.340.0000.07319.09
5.4.320.0030.05319.02
5.4.310.0100.04719.00
5.4.300.0100.07318.98
5.4.290.0070.07719.01
5.4.280.0170.07019.30
5.4.270.0130.07019.33
5.4.260.0100.07319.16
5.4.250.0030.08019.21
5.4.240.0100.07019.16
5.4.230.0070.04318.98
5.4.220.0130.07719.18
5.4.210.0030.08019.01
5.4.200.0030.07719.00
5.4.190.0230.06318.93
5.4.180.0030.04718.97
5.4.170.0070.07019.32
5.4.160.0030.07718.98
5.4.150.0270.06318.97
5.4.140.0070.07316.53
5.4.130.0070.07716.56
5.4.120.0100.06316.46
5.4.110.0130.07016.43
5.4.100.0070.05716.64
5.4.90.0070.03716.36
5.4.80.0070.03316.30
5.4.70.0000.04016.45
5.4.60.0070.03716.57
5.4.50.0030.03716.44
5.4.40.0030.03716.45
5.4.30.0030.06016.39
5.4.20.0070.03016.41
5.4.10.0030.05716.34
5.4.00.0100.03716.00
5.3.290.0070.07714.68
5.3.280.0130.06014.63
5.3.270.0070.07314.65
5.3.260.0030.07714.64
5.3.250.0030.08014.70
5.3.240.0000.08014.75
5.3.230.0070.06014.63
5.3.220.0100.06714.57
5.3.210.0100.06714.57
5.3.200.0030.08014.70
5.3.190.0070.05014.71
5.3.180.0030.03714.79
5.3.170.0100.03714.72
5.3.160.0000.04014.58
5.3.150.0070.03714.61
5.3.140.0000.04014.68
5.3.130.0030.03714.67
5.3.120.0070.03314.69
5.3.110.0030.03714.52
5.3.100.0070.03314.04
5.3.90.0030.03314.11
5.3.80.0030.05714.15
5.3.70.0000.04714.09
5.3.60.0100.03014.11
5.3.50.0070.03013.95
5.3.40.0030.07313.96
5.3.30.0000.03713.77
5.3.20.0100.05313.55
5.3.10.0100.02713.68
5.3.00.0070.04313.77
5.2.170.0030.04311.24
5.2.160.0000.03011.12
5.2.150.0030.06311.29
5.2.140.0100.05711.21
5.2.130.0030.06710.96
5.2.120.0000.03310.96
5.2.110.0070.06010.97
5.2.100.0030.03011.19
5.2.90.0000.04711.10
5.2.80.0000.03011.11
5.2.70.0000.03011.12
5.2.60.0030.04711.03
5.2.50.0000.03011.03
5.2.40.0000.03011.14
5.2.30.0000.03011.11
5.2.20.0070.02310.94
5.2.10.0100.05011.00
5.2.00.0000.03310.71
5.1.60.0030.02310.00
5.1.50.0030.0279.82
5.1.40.0070.0209.95
5.1.30.0030.05310.35
5.1.20.0000.02710.35
5.1.10.0000.03310.24
5.1.00.0000.02710.13
5.0.50.0030.0178.73
5.0.40.0030.0238.46
5.0.30.0030.0538.46
5.0.20.0000.0438.46
5.0.10.0000.0378.46
5.0.00.0000.0308.46
4.4.90.0070.0278.46
4.4.80.0070.0078.46
4.4.70.0000.0178.46
4.4.60.0000.0178.46
4.4.50.0000.0138.46
4.4.40.0000.0238.46
4.4.30.0030.0138.46
4.4.20.0030.0178.46
4.4.10.0030.0138.46
4.4.00.0000.0238.46
4.3.110.0030.0208.46
4.3.100.0000.0138.46
4.3.90.0030.0238.46
4.3.80.0030.0338.46
4.3.70.0000.0138.46
4.3.60.0000.0138.46
4.3.50.0000.0308.46
4.3.40.0030.0208.46
4.3.30.0000.0138.46
4.3.20.0030.0138.46
4.3.10.0030.0138.46
4.3.00.0000.0138.46

preferences:
37.32 ms | 401 KiB | 5 Q