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; return $this->relations[$function] = ['a' =>'aa', 'b' =>'bb']; } } 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.0000.01516.50
8.3.50.0110.00716.69
8.3.40.0110.00718.71
8.3.30.0070.00718.88
8.3.20.0040.00420.34
8.3.10.0080.00023.50
8.3.00.0030.00617.84
8.2.180.0120.00616.88
8.2.170.0120.00322.96
8.2.160.0120.00320.35
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00421.06
8.2.120.0040.00426.35
8.2.110.0060.00320.38
8.2.100.0100.00617.77
8.2.90.0000.00819.30
8.2.80.0020.00518.04
8.2.70.0040.00417.50
8.2.60.0040.00417.93
8.2.50.0040.00418.10
8.2.40.0090.00022.28
8.2.30.0000.00819.40
8.2.20.0000.00718.08
8.2.10.0070.00018.06
8.2.00.0040.00418.05
8.1.280.0120.00325.92
8.1.270.0040.00423.81
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0090.00022.62
8.1.230.0040.00718.98
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0040.00417.35
8.1.190.0000.00817.22
8.1.180.0050.00218.10
8.1.170.0060.00318.54
8.1.160.0000.00718.95
8.1.150.0060.00318.65
8.1.140.0000.00819.45
8.1.130.0070.00018.87
8.1.120.0000.00717.45
8.1.110.0040.00417.45
8.1.100.0030.00517.30
8.1.90.0000.00717.34
8.1.80.0040.00417.31
8.1.70.0040.00417.38
8.1.60.0030.00617.66
8.1.50.0040.00417.57
8.1.40.0040.00417.54
8.1.30.0080.00017.66
8.1.20.0050.00317.71
8.1.10.0040.00417.48
8.1.00.0070.00017.51
8.0.300.0060.00318.77
8.0.290.0050.00316.61
8.0.280.0000.00718.48
8.0.270.0070.00017.34
8.0.260.0000.00816.90
8.0.250.0000.00716.99
8.0.240.0000.00716.94
8.0.230.0060.00316.94
8.0.220.0000.00816.79
8.0.210.0030.00416.77
8.0.200.0030.00316.86
8.0.190.0070.00416.82
8.0.180.0000.00816.73
8.0.170.0040.00416.91
8.0.160.0000.00716.93
8.0.150.0000.00716.82
8.0.140.0040.00416.83
8.0.130.0000.00613.22
8.0.120.0040.00416.79
8.0.110.0030.00316.73
8.0.100.0000.00716.83
8.0.90.0040.00416.68
8.0.80.0060.01016.86
8.0.70.0000.00916.92
8.0.60.0050.00316.90
8.0.50.0000.00716.75
8.0.30.0090.00617.11
8.0.20.0060.01317.40
8.0.10.0040.00416.87
8.0.00.0140.00316.79
7.4.330.0050.00015.55
7.4.320.0030.00316.54
7.4.300.0000.00616.61
7.4.290.0070.00416.60
7.4.280.0040.00416.55
7.4.270.0000.00716.60
7.4.260.0000.00613.36
7.4.250.0070.00016.56
7.4.240.0000.00716.53
7.4.230.0000.00716.45
7.4.220.0060.01316.64
7.4.210.0060.00916.65
7.4.200.0070.00016.44
7.4.160.0110.00716.46
7.4.150.0080.01017.40
7.4.140.0090.01217.86
7.4.130.0060.01516.71
7.4.120.0120.00916.60
7.4.110.0130.00716.49
7.4.100.0150.00416.62
7.4.90.0100.00716.63
7.4.80.0070.01019.39
7.4.70.0100.00716.53
7.4.60.0130.00316.35
7.4.50.0030.01016.41
7.4.40.0040.01416.39
7.4.30.0060.01016.75
7.4.10.0090.00914.88
7.4.00.0060.01114.98
7.3.330.0000.00613.45
7.3.320.0050.00013.34
7.3.310.0000.00716.41
7.3.300.0040.00416.33
7.3.290.0000.00716.38
7.3.280.0070.00916.34
7.3.270.0040.01417.40
7.3.260.0130.00616.53
7.3.250.0100.00816.53
7.3.240.0120.00516.50
7.3.230.0080.01316.37
7.3.210.0100.00716.34
7.3.200.0120.00916.60
7.3.190.0130.00316.24
7.3.180.0060.01216.54
7.3.170.0030.01216.52
7.3.160.0080.00816.49
7.3.130.0140.00414.80
7.3.120.0030.01214.42
7.3.110.0160.00314.66
7.3.100.0030.01015.11
7.3.90.0110.00314.45
7.3.80.0060.00314.85
7.3.70.0060.00814.72
7.3.60.0070.00714.81
7.3.50.0070.00714.74
7.3.40.0040.00414.59
7.3.30.0080.00314.68
7.3.20.0090.00616.63
7.3.10.0000.01216.36
7.3.00.0090.00316.56
7.2.330.0060.01216.66
7.2.320.0100.00616.56
7.2.310.0060.00916.85
7.2.300.0060.01516.79
7.2.290.0130.00516.88
7.2.260.0100.00714.65
7.2.250.0070.01114.95
7.2.240.0040.01115.19
7.2.230.0120.00914.92
7.2.220.0060.01215.27
7.2.210.0030.00614.97
7.2.200.0100.00015.22
7.2.190.0070.00714.82
7.2.180.0040.00814.80
7.2.170.0040.00815.11
7.2.160.0090.00614.85
7.2.150.0030.01016.70
7.2.140.0070.00716.95
7.2.130.0070.00916.48
7.2.120.0100.00916.75
7.2.110.0050.01216.77
7.2.100.0090.00916.82
7.2.90.0260.00616.23
7.2.80.0220.00516.25
7.2.70.0210.00816.23
7.2.60.0140.01016.26
7.2.50.0130.00716.20
7.2.40.0120.00616.31
7.2.30.0320.00916.22
7.2.20.0130.00616.08
7.2.10.0210.00616.35
7.2.00.0270.00516.28
7.1.330.0040.01115.79
7.1.320.0060.00615.91
7.1.310.0100.00315.48
7.1.300.0140.00315.89
7.1.290.0060.00315.63
7.1.280.0090.00315.51
7.1.270.0030.00515.97
7.1.260.0100.00315.72
7.1.250.0100.00715.77
7.1.240.0040.00915.45
7.1.230.0100.00515.58
7.1.220.0060.00815.65
7.1.210.0280.00715.29
7.1.200.0180.00515.15
7.1.190.0130.00715.00
7.1.180.0090.01015.11
7.1.170.0220.00415.06
7.1.160.0090.00615.06
7.1.150.0090.00815.16
7.1.140.0240.00515.05
7.1.130.0120.00815.16
7.1.120.0150.00914.97
7.1.110.0220.00615.14
7.1.100.0300.00715.03
7.1.90.0240.00415.08
7.1.80.0170.00715.10
7.1.70.0180.00815.17
7.1.60.0280.00621.29
7.1.50.0260.00721.16
7.1.40.0360.01121.06
7.1.30.0120.01321.15
7.1.20.0240.00721.13
7.1.10.0200.00815.11
7.1.00.0120.00815.21
7.0.330.0070.00615.37
7.0.320.0070.00915.19
7.0.310.0180.00614.76
7.0.300.0210.00414.82
7.0.290.0210.00714.80
7.0.280.0300.00814.73
7.0.270.0210.00514.71
7.0.260.0120.01114.71
7.0.250.0180.01214.63
7.0.240.0180.00914.70
7.0.230.0230.00514.73
7.0.220.0150.00414.56
7.0.210.0230.00814.65
7.0.200.0210.00914.83
7.0.190.0250.00714.80
7.0.180.0180.00814.70
7.0.170.0230.00814.77
7.0.160.0150.00914.93
7.0.150.0200.00414.71
7.0.140.0170.00614.90
7.0.130.0190.01014.66
7.0.120.0070.00514.77
7.0.110.0110.00414.63
7.0.100.0180.00814.74
7.0.90.0260.01014.65
7.0.80.0240.00514.76
7.0.70.0250.00514.84
7.0.60.0240.00314.74
7.0.50.0220.00814.79
7.0.40.0250.00613.39
7.0.30.0230.00613.63
7.0.20.0250.00313.42
7.0.10.0230.01013.37
7.0.00.0070.00813.36
5.6.400.0060.00914.51
5.6.390.0030.01014.34
5.6.380.0070.00914.51
5.6.370.0100.00314.40
5.6.360.0070.00414.27
5.6.350.0130.00014.25
5.6.340.0070.00314.25
5.6.330.0070.00714.42
5.6.320.0100.00614.42
5.6.310.0030.01314.68
5.6.300.0040.01114.58
5.6.290.0000.01714.41
5.6.280.0030.00614.48
5.6.270.0090.00614.43
5.6.260.0070.00614.65
5.6.250.0030.00614.65
5.6.240.0110.00414.43
5.6.230.0070.00714.42
5.6.220.0030.00714.30
5.6.210.0040.00714.57
5.6.200.0030.01014.14
5.6.190.0030.01014.58
5.6.180.0070.00714.75
5.6.170.0070.00314.73
5.6.160.0090.00014.59
5.6.150.0060.01014.39
5.6.140.0000.01614.44
5.6.130.0100.00314.39
5.6.120.0100.00314.63
5.6.110.0040.00414.12
5.6.100.0060.00614.23
5.6.90.0060.00614.27
5.6.80.0040.01114.40
5.6.70.0110.00014.51
5.6.60.0030.01014.55
5.6.50.0060.00614.38
5.6.40.0000.00914.50
5.6.30.0140.00014.14
5.6.20.0040.01114.33
5.6.10.0060.00614.26
5.6.00.0080.00014.43

preferences:
43.28 ms | 401 KiB | 5 Q