3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { private $data; private $relations; public function __set($name, $value) { $this->data[$name] = $value; } public function __get($name) { if(isset($this->data[$name])){ return $this->data[$name]; } if(method_exists('bar',$name)){ echo 'evet'; } } public function __construct() { $this->data = ['foo' => 'test', 'body' => 'content']; } public function test() { $function = debug_backtrace()[1]['function']; $this->relations[$function] = ['a' =>'aa', 'b' =>'bb']; return $this; } } class bar extends foo{ public function aa(){ return $this->test(); } } $bar = new bar(); $bar->aa; print_r($bar);

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.50
8.3.50.0140.00316.61
8.3.40.0150.00018.82
8.3.30.0090.00618.79
8.3.20.0040.00420.34
8.3.10.0040.00421.78
8.3.00.0060.00317.59
8.2.180.0110.00716.75
8.2.170.0110.00422.96
8.2.160.0000.01520.57
8.2.150.0070.00024.18
8.2.140.0030.00524.66
8.2.130.0090.00021.13
8.2.120.0000.00826.35
8.2.110.0030.00720.45
8.2.100.0080.00418.09
8.2.90.0050.00319.34
8.2.80.0090.00017.97
8.2.70.0070.00317.75
8.2.60.0050.00318.00
8.2.50.0080.00018.16
8.2.40.0000.00720.55
8.2.30.0030.00521.09
8.2.20.0050.00318.07
8.2.10.0050.00318.01
8.2.00.0000.00817.95
8.1.280.0040.01225.92
8.1.270.0070.00022.14
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00321.95
8.1.230.0100.00319.10
8.1.220.0070.00017.78
8.1.210.0050.00318.77
8.1.200.0060.00317.23
8.1.190.0000.00917.23
8.1.180.0000.00718.10
8.1.170.0040.00418.59
8.1.160.0000.00719.10
8.1.150.0030.00518.74
8.1.140.0040.00419.58
8.1.130.0000.00718.81
8.1.120.0080.00017.47
8.1.110.0030.00617.38
8.1.100.0040.00417.30
8.1.90.0000.00817.45
8.1.80.0030.00517.34
8.1.70.0000.00717.40
8.1.60.0040.00417.53
8.1.50.0050.00317.43
8.1.40.0000.00817.45
8.1.30.0040.00417.70
8.1.20.0060.00317.67
8.1.10.0000.00817.50
8.1.00.0000.00817.50
8.0.300.0050.00318.77
8.0.290.0030.00516.75
8.0.280.0000.00818.51
8.0.270.0030.00317.27
8.0.260.0000.00616.72
8.0.250.0000.00616.96
8.0.240.0040.00416.91
8.0.230.0040.00416.90
8.0.220.0040.00316.89
8.0.210.0040.00416.76
8.0.200.0030.00516.88
8.0.190.0030.00616.99
8.0.180.0050.00216.85
8.0.170.0040.00416.80
8.0.160.0040.00416.88
8.0.150.0000.00716.84
8.0.140.0000.00816.83
8.0.130.0000.00513.32
8.0.120.0000.00716.73
8.0.110.0030.00316.71
8.0.100.0000.00716.69
8.0.90.0040.00416.96
8.0.80.0040.01116.84
8.0.70.0040.00416.80
8.0.60.0000.00716.68
8.0.50.0070.00316.96
8.0.30.0080.00917.09
8.0.20.0100.00817.40
8.0.10.0000.00816.84
8.0.00.0090.00916.45
7.4.330.0050.00015.55
7.4.320.0060.00016.60
7.4.300.0030.00316.63
7.4.290.0050.00516.50
7.4.280.0040.00416.52
7.4.270.0050.00216.64
7.4.260.0000.00513.31
7.4.250.0000.00716.50
7.4.240.0030.00316.57
7.4.230.0070.00016.55
7.4.220.0080.01616.58
7.4.210.0070.00716.63
7.4.200.0000.00716.55
7.4.160.0060.01016.55
7.4.150.0130.00617.40
7.4.140.0090.01017.86
7.4.130.0120.01216.55
7.4.120.0150.00616.63
7.4.110.0030.01316.75
7.4.100.0100.01016.31
7.4.90.0110.00616.47
7.4.80.0150.00619.39
7.4.70.0070.01416.51
7.4.60.0140.00716.64
7.4.50.0130.00316.48
7.4.40.0130.00716.42
7.4.30.0110.00616.53
7.4.00.0070.01115.21
7.3.330.0030.00313.31
7.3.320.0060.00013.30
7.3.310.0030.00416.33
7.3.300.0040.00416.34
7.3.290.0030.00516.31
7.3.280.0080.00816.27
7.3.270.0000.01717.40
7.3.260.0090.00816.55
7.3.250.0110.00916.49
7.3.240.0100.00716.47
7.3.230.0040.01216.29
7.3.210.0130.00316.50
7.3.200.0090.01216.33
7.3.190.0100.00716.18
7.3.180.0120.00316.61
7.3.170.0120.00416.32
7.3.160.0100.00716.46
7.2.330.0180.00316.79
7.2.320.0030.01316.79
7.2.310.0030.01416.58
7.2.300.0130.01016.43
7.2.290.0060.01216.71
7.2.90.1180.00314.57
7.2.80.1950.01014.85
7.2.70.1430.01014.88
7.2.60.1000.01014.75
7.2.50.0160.01314.87
7.2.40.0150.00615.01
7.2.30.0060.01215.05
7.2.20.0180.00015.01
7.2.10.1190.00315.02
7.2.00.0510.00715.10
7.1.210.2060.01013.91
7.1.200.0060.01013.80
7.1.190.2350.01013.78
7.1.180.2000.01014.04
7.1.170.0100.00713.86
7.1.160.1760.00013.70
7.1.150.0300.00313.92
7.1.140.0070.00713.99
7.1.130.0100.01014.07
7.1.120.0180.00413.72
7.1.110.1280.00614.09
7.1.100.0130.00413.94
7.1.90.0320.00513.93
7.1.80.0690.00013.90
7.1.70.0590.00613.95
7.1.60.0280.01432.11
7.1.50.1460.00331.43
7.1.40.0840.00631.67
7.1.30.1810.00331.70
7.1.20.1440.01031.90
7.1.10.0570.00313.83
7.1.00.0080.00414.14
7.0.310.1650.00013.82
7.0.300.0090.01213.43
7.0.290.1240.01313.55
7.0.280.0350.01013.55
7.0.270.0040.01213.34
7.0.260.1060.00413.61
7.0.250.0200.00713.32
7.0.240.0040.01213.38
7.0.230.0590.00313.21
7.0.220.0380.00713.35
7.0.210.0670.00713.35
7.0.200.0180.00713.69
7.0.190.0890.00713.70
7.0.180.0670.00913.65
7.0.170.0890.00913.75
7.0.160.0820.00613.53
7.0.150.0100.00313.56
7.0.140.0840.00313.59
7.0.130.0090.00313.80
7.0.120.0480.00713.75
7.0.110.0040.00913.62
7.0.100.0300.00913.62
7.0.90.0380.00313.61
7.0.80.0060.01213.56
7.0.70.0410.00413.56
7.0.60.0060.00913.68
7.0.50.0080.01013.47
7.0.40.0200.00313.75
7.0.30.0130.00813.67
7.0.20.0070.00713.84
7.0.10.0110.00413.67
7.0.00.0660.00713.68

preferences:
40.32 ms | 401 KiB | 5 Q