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)){ $getCalled = get_called_class(); return (new $getCalled())->$name(); } } public function __construct() { $this->data = ['foo' => 'test', 'body' => 'content']; } public function test() { $function = debug_backtrace()[1]['function']; echo $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.0140.00718.52
8.3.50.0040.01216.23
8.3.40.0040.01218.67
8.3.30.0070.01018.50
8.3.20.0050.00320.34
8.3.10.0040.00421.91
8.3.00.0070.00417.82
8.2.180.0100.01016.75
8.2.170.0150.00022.96
8.2.160.0100.00720.39
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0090.00026.16
8.2.120.0040.00419.81
8.2.110.0070.00321.05
8.2.100.0030.00917.72
8.2.90.0000.00818.28
8.2.80.0040.00417.97
8.2.70.0000.00818.05
8.2.60.0000.00917.93
8.2.50.0020.00518.10
8.2.40.0000.00822.27
8.2.30.0000.00819.40
8.2.20.0040.00418.03
8.2.10.0000.00718.02
8.2.00.0000.00818.14
8.1.280.0140.00325.92
8.1.270.0040.00423.97
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0030.00622.06
8.1.230.0080.00320.90
8.1.220.0040.00417.79
8.1.210.0060.00318.77
8.1.200.0030.00717.22
8.1.190.0060.00317.35
8.1.180.0000.00818.10
8.1.170.0040.00418.59
8.1.160.0040.00419.04
8.1.150.0040.00418.63
8.1.140.0000.00719.48
8.1.130.0000.00718.86
8.1.120.0040.00417.28
8.1.110.0050.00517.44
8.1.100.0020.00517.46
8.1.90.0040.00417.47
8.1.80.0050.00317.44
8.1.70.0040.00417.43
8.1.60.0000.00817.58
8.1.50.0040.00417.51
8.1.40.0040.00417.59
8.1.30.0000.00817.64
8.1.20.0050.00517.58
8.1.10.0000.00817.61
8.1.00.0030.00517.39
8.0.300.0040.00420.07
8.0.290.0000.00816.75
8.0.280.0030.00318.52
8.0.270.0000.00817.35
8.0.260.0000.00716.75
8.0.250.0000.00617.05
8.0.240.0070.00016.99
8.0.230.0040.00416.85
8.0.220.0030.00316.93
8.0.210.0030.00316.84
8.0.200.0030.00316.93
8.0.190.0060.00316.96
8.0.180.0070.00016.87
8.0.170.0030.00316.85
8.0.160.0050.00316.75
8.0.150.0030.00516.87
8.0.140.0050.00216.68
8.0.130.0050.00013.25
8.0.120.0000.00816.85
8.0.110.0000.00716.87
8.0.100.0000.00716.89
8.0.90.0060.00316.73
8.0.80.0070.01016.87
8.0.70.0000.00816.90
8.0.60.0040.00416.75
8.0.50.0040.00416.74
8.0.30.0120.00517.13
8.0.20.0100.00817.40
8.0.10.0030.00616.82
8.0.00.0130.01016.82
7.4.330.0000.00515.55
7.4.320.0070.00016.54
7.4.300.0000.00616.53
7.4.290.0030.00616.54
7.4.280.0080.00016.44
7.4.270.0000.00716.55
7.4.260.0050.00013.29
7.4.250.0040.00416.50
7.4.240.0070.00016.62
7.4.230.0000.00716.32
7.4.220.0130.01316.73
7.4.210.0080.00716.58
7.4.200.0040.00416.41
7.4.160.0120.00516.66
7.4.150.0080.00817.40
7.4.140.0150.00617.86
7.4.130.0000.02016.65
7.4.120.0130.00816.56
7.4.110.0060.01216.42
7.4.100.0110.00616.51
7.4.90.0060.01516.39
7.4.80.0160.00319.39
7.4.70.0090.00916.63
7.4.60.0120.00316.52
7.4.50.0000.01516.50
7.4.40.0100.00716.72
7.4.30.0090.00616.66
7.4.10.0060.01215.08
7.4.00.0050.01214.96
7.3.330.0030.00313.33
7.3.320.0030.00313.44
7.3.310.0000.00716.27
7.3.300.0000.00616.38
7.3.290.0000.00716.25
7.3.280.0080.00716.37
7.3.270.0110.00617.40
7.3.260.0140.00416.45
7.3.250.0080.01016.44
7.3.240.0120.00816.36
7.3.230.0140.00316.67
7.3.210.0070.01016.57
7.3.200.0120.00916.43
7.3.190.0060.00916.36
7.3.180.0130.01016.44
7.3.170.0120.00316.63
7.3.160.0110.00916.66
7.3.130.0120.00614.66
7.3.120.0160.00314.84
7.3.110.0070.01114.90
7.3.100.0120.00315.03
7.3.90.0130.00614.60
7.3.80.0080.00614.85
7.3.70.0070.00714.75
7.3.60.0000.01014.95
7.3.50.0070.00714.63
7.3.40.0060.00614.72
7.3.30.0070.00714.91
7.3.20.0090.00616.65
7.3.10.0130.00516.61
7.3.00.0150.00716.62
7.2.330.0100.00716.52
7.2.320.0100.00716.78
7.2.310.0120.00416.51
7.2.300.0080.01216.87
7.2.290.0090.00916.50
7.2.260.0130.00715.31
7.2.250.0030.01315.19
7.2.240.0070.00715.37
7.2.230.0060.00615.03
7.2.220.0070.01014.93
7.2.210.0000.01614.82
7.2.200.0070.01014.88
7.2.190.0030.01415.12
7.2.180.0060.00715.11
7.2.170.0030.01315.03
7.2.160.0030.00815.21
7.2.150.0060.00817.09
7.2.140.0070.01016.93
7.2.130.0150.00617.06
7.2.120.0060.01016.91
7.2.110.0090.00816.86
7.2.100.0040.01316.92
7.2.90.0080.00916.12
7.2.80.0050.01116.21
7.2.70.0080.01016.15
7.2.60.0050.00916.31
7.2.50.0380.00816.29
7.2.40.0390.00816.38
7.2.30.0640.00616.34
7.2.20.0390.01016.31
7.2.10.0340.00916.05
7.2.00.0460.00716.14
7.1.330.0070.01115.64
7.1.320.0040.01115.68
7.1.310.0040.01115.91
7.1.300.0030.00916.00
7.1.290.0070.00315.58
7.1.280.0040.00815.84
7.1.270.0100.00315.64
7.1.260.0030.01015.87
7.1.250.0080.00815.96
7.1.240.0140.00015.79
7.1.230.0070.00315.91
7.1.220.0080.00615.30
7.1.210.0220.00914.85
7.1.200.0060.01314.77
7.1.190.0550.00814.97
7.1.180.0080.00714.82
7.1.170.0510.01214.89
7.1.160.0520.00914.96
7.1.150.0510.00614.83
7.1.140.0660.00814.93
7.1.130.0470.00714.91
7.1.120.0780.00515.04
7.1.110.0610.01114.90
7.1.100.0070.01214.94
7.1.90.0090.00714.82
7.1.80.0090.00615.04
7.1.70.0620.00814.78
7.1.60.0220.00823.93
7.1.50.0280.01023.69
7.1.40.0180.01023.95
7.1.30.0450.01023.89
7.1.20.0780.01323.79
7.1.10.0860.00514.76
7.1.00.0070.01014.97
7.0.330.0030.00615.35
7.0.320.0140.00015.08
7.0.310.0200.00814.42
7.0.300.0520.00914.45
7.0.290.0450.00814.53
7.0.280.0830.00814.56
7.0.270.0590.00814.28
7.0.260.0540.00314.30
7.0.250.0110.00914.46
7.0.240.0180.01314.32
7.0.230.0270.01014.41
7.0.220.0090.00214.56
7.0.210.0050.01114.25
7.0.200.0100.00814.51
7.0.190.0370.00814.44
7.0.180.0920.00514.32
7.0.170.0100.00914.53
7.0.160.0110.00314.38
7.0.150.0820.01014.53
7.0.140.0130.00114.43
7.0.130.0100.00714.61
7.0.120.0070.00814.64
7.0.110.0060.00414.64
7.0.100.0180.00314.53
7.0.90.0080.00814.57
7.0.80.0030.01014.49
7.0.70.0080.00614.54
7.0.60.0070.00714.70
7.0.50.0460.00914.51
7.0.40.0670.00613.64
7.0.30.0050.00713.29
7.0.20.0110.00413.66
7.0.10.0100.00213.60
7.0.00.0150.00513.47
5.6.400.0070.00714.72
5.6.390.0000.00914.64
5.6.380.0000.01014.18
5.6.370.0000.01214.84
5.6.360.0030.00914.81
5.6.350.0050.00514.10
5.6.340.0040.01114.70
5.6.330.0000.01314.33
5.6.320.0130.00314.43
5.6.310.0030.00614.65
5.6.300.0060.00614.52
5.6.290.0090.00614.44
5.6.280.0060.01314.21
5.6.270.0030.00614.57
5.6.260.0070.00314.37
5.6.250.0070.00414.63
5.6.240.0040.00414.66
5.6.230.0110.00614.63
5.6.220.0030.01414.59
5.6.210.0000.01514.45
5.6.200.0040.00914.38
5.6.190.0070.00714.65
5.6.180.0030.01014.17
5.6.170.0100.00014.44
5.6.160.0030.00714.48
5.6.150.0030.00714.22
5.6.140.0060.01214.46
5.6.130.0030.01014.42
5.6.120.0040.01114.40
5.6.110.0090.00614.18
5.6.100.0000.01114.25
5.6.90.0100.00014.68
5.6.80.0040.01114.27
5.6.70.0070.00714.61
5.6.60.0030.01014.17
5.6.50.0090.00914.28
5.6.40.0000.01414.40
5.6.30.0030.01014.38
5.6.20.0050.01014.46
5.6.10.0030.01214.47
5.6.00.0030.00914.23

preferences:
63.99 ms | 400 KiB | 5 Q