3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_calling_scope() { return debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3)[2]['class'] ?? null; } class Foo { public function __get($name) { var_dump(get_calling_scope()); return ''; } public function test() { $this->bar; } } class Bar extends Foo { public function __get($name) { parent::__get($name); return ''; } } $foo = new Foo(); $foo->bar; $foo->test(); $bar = new Bar(); $bar->test();

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.5.30.0070.01121.28
8.5.20.0100.00819.54
8.5.10.0090.00720.14
8.5.00.0120.00920.07
8.4.180.0110.01022.10
8.4.170.0140.00720.42
8.4.160.0110.01023.09
8.4.150.0070.00517.80
8.4.140.0080.01417.48
8.4.130.0140.00917.61
8.4.120.0130.00720.32
8.4.110.0090.00820.46
8.4.100.0130.00817.76
8.4.90.0130.00817.68
8.4.80.0120.00720.65
8.4.70.0080.00817.74
8.4.60.0120.00917.86
8.4.50.0100.01019.38
8.4.40.0200.00019.25
8.4.30.0100.01018.99
8.4.20.0070.01322.65
8.4.10.0190.00023.66
8.3.300.0150.00920.93
8.3.290.0130.00720.72
8.3.280.0140.00718.29
8.3.270.0110.00816.57
8.3.260.0120.00716.66
8.3.250.0130.00518.70
8.3.240.0090.00816.64
8.3.230.0130.00716.54
8.3.220.0110.00817.09
8.3.210.0090.00916.60
8.3.200.0120.00816.39
8.3.190.0090.00918.93
8.3.180.0090.00616.43
8.3.170.0150.00318.96
8.3.160.0000.00716.79
8.3.150.0110.00719.06
8.3.140.0040.00419.15
8.3.130.0030.00518.63
8.3.120.0030.00618.75
8.3.110.0060.00920.94
8.3.100.0080.00424.06
8.3.90.0120.00626.77
8.3.80.0030.00618.30
8.3.70.0040.01116.38
8.3.60.0140.00416.75
8.3.50.0090.00616.61
8.3.40.0040.01420.43
8.3.30.0070.00718.62
8.3.20.0040.00424.18
8.3.10.0000.00724.66
8.3.00.0040.00426.16
8.2.300.0130.00818.07
8.2.290.0120.00820.28
8.2.280.0050.00516.58
8.2.270.0110.00718.27
8.2.260.0040.00418.48
8.2.250.0000.00816.48
8.2.240.0090.00017.04
8.2.230.0040.00422.58
8.2.220.0090.00037.54
8.2.210.0060.01326.77
8.2.200.0090.00018.29
8.2.190.0090.00616.58
8.2.180.0130.00716.50
8.2.170.0110.00418.71
8.2.160.0100.00322.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0030.00626.16
8.2.120.0040.00426.16
8.2.110.0060.00319.36
8.2.100.0000.01117.78
8.2.90.0060.00319.50
8.2.80.0000.00719.32
8.2.70.0030.00617.75
8.2.60.0000.00917.92
8.2.50.0060.00318.07
8.2.40.0040.00418.15
8.2.30.0050.00218.01
8.2.20.0070.00019.25
8.2.10.0020.00617.63
8.2.00.0010.00717.67
8.1.340.0150.00517.66
8.1.330.0110.00716.75
8.1.320.0100.00817.74
8.1.310.0040.00418.46
8.1.300.0060.00318.36
8.1.290.0040.00430.84
8.1.280.0060.01225.92
8.1.270.0050.00324.66
8.1.260.0000.00726.35
8.1.250.0000.00828.09
8.1.240.0080.00420.69
8.1.230.0040.00722.75
8.1.220.0030.00617.74
8.1.210.0040.00818.77
8.1.200.0040.00717.36
8.1.190.0090.00017.23
8.1.180.0000.00722.13
8.1.170.0030.00518.83
8.1.160.0040.00418.82
8.1.150.0000.00818.57
8.1.140.0040.00417.33
8.1.130.0060.00217.37
8.1.120.0030.00517.37
8.1.110.0020.00617.32
8.1.100.0050.00317.35
8.1.90.0010.00717.41
8.1.80.0030.00517.43
8.1.70.0050.00317.36
8.1.60.0030.00517.61
8.1.50.0020.00617.54
8.1.40.0040.00317.59
8.1.30.0030.00617.54
8.1.20.0010.00717.60
8.1.10.0040.00417.54
8.1.00.0050.00317.44
8.0.300.0000.00719.90
8.0.290.0050.00316.58
8.0.280.0000.00818.25
8.0.270.0050.00216.71
8.0.260.0020.00516.71
8.0.250.0030.00516.68
8.0.240.0040.00416.83
8.0.230.0030.00416.75
8.0.220.0010.00716.73
8.0.210.0010.00616.62
8.0.200.0040.00416.72
8.0.190.0040.00416.75
8.0.180.0040.00316.78
8.0.170.0040.00416.72
8.0.160.0050.00316.70
8.0.150.0040.00316.68
8.0.140.0020.00616.71
8.0.130.0020.00616.67
8.0.120.0000.00716.62
8.0.110.0020.00616.62
8.0.100.0030.00516.61
8.0.90.0030.00516.69
8.0.80.0010.00616.67
8.0.70.0010.00616.70
8.0.60.0050.00216.70
8.0.50.0040.00416.67
8.0.30.0030.00516.66
8.0.20.0040.00416.74
8.0.10.0040.00316.82

preferences:
45.35 ms | 1113 KiB | 5 Q