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]; } } public function __construct() { $this->data = ['foo' => 'test', 'body' => 'content']; } public function test() { $function = debug_backtrace()[1]['function']; $this->data[$function] = ['a' =>'aa', 'b' =>'bb']; return $this; } } class bar extends foo{ public function aa(){ return $this->test(); } } $bar = new bar(); echo $bar->foo; echo $bar->aa()->{'aa'}->a; 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.0070.01116.63
8.3.50.0120.00616.39
8.3.40.0090.00619.02
8.3.30.0160.00018.81
8.3.20.0000.00820.30
8.3.10.0040.00421.79
8.3.00.0060.00319.66
8.2.180.0110.00716.88
8.2.170.0110.00422.96
8.2.160.0100.00320.36
8.2.150.0050.00224.18
8.2.140.0040.00424.66
8.2.130.0050.00321.12
8.2.120.0050.00326.35
8.2.110.0050.00521.12
8.2.100.0070.00418.22
8.2.90.0100.00019.22
8.2.80.0040.00418.03
8.2.70.0070.00417.75
8.2.60.0080.00018.05
8.2.50.0000.00818.10
8.2.40.0000.00820.55
8.2.30.0050.00221.17
8.2.20.0070.00018.13
8.2.10.0040.00418.13
8.2.00.0000.00718.13
8.1.280.0030.01425.92
8.1.270.0070.00023.79
8.1.260.0050.00326.35
8.1.250.0100.00028.09
8.1.240.0060.00323.78
8.1.230.0070.00417.50
8.1.220.0060.00317.74
8.1.210.0030.00618.77
8.1.200.0060.00317.35
8.1.190.0040.00417.10
8.1.180.0000.00818.10
8.1.170.0050.00318.58
8.1.160.0030.00318.97
8.1.150.0000.00720.52
8.1.140.0070.00019.52
8.1.130.0070.00018.82
8.1.120.0040.00417.42
8.1.110.0050.00317.43
8.1.100.0040.00417.33
8.1.90.0000.00817.42
8.1.80.0000.00717.39
8.1.70.0070.00017.30
8.1.60.0040.00417.64
8.1.50.0000.00917.44
8.1.40.0030.00617.37
8.1.30.0000.00817.65
8.1.20.0050.00317.55
8.1.10.0000.00817.45
8.1.00.0040.00417.50
8.0.300.0080.00018.77
8.0.290.0050.00316.75
8.0.280.0000.00718.46
8.0.270.0070.00017.18
8.0.260.0030.00316.94
8.0.250.0030.00316.93
8.0.240.0040.00417.09
8.0.230.0040.00416.83
8.0.220.0070.00016.86
8.0.210.0000.00716.81
8.0.200.0000.00616.83
8.0.190.0050.00516.89
8.0.180.0000.00816.89
8.0.170.0000.00716.94
8.0.160.0000.00816.90
8.0.150.0040.00416.88
8.0.140.0050.00216.82
8.0.130.0000.00513.31
8.0.120.0030.00516.93
8.0.110.0000.00716.84
8.0.100.0040.00416.81
8.0.90.0070.00016.95
8.0.80.0100.00616.78
8.0.70.0040.00416.97
8.0.60.0040.00416.80
8.0.50.0040.00416.88
8.0.30.0060.01217.13
8.0.20.0070.01117.40
8.0.10.0070.00017.08
8.0.00.0120.00616.79
7.4.330.0020.00215.55
7.4.320.0030.00316.48
7.4.300.0000.00616.52
7.4.290.0080.00016.65
7.4.280.0050.00316.60
7.4.270.0030.00316.59
7.4.260.0030.00313.40
7.4.250.0030.00316.48
7.4.240.0030.00316.51
7.4.230.0030.00316.42
7.4.220.0100.01316.61
7.4.210.0060.01116.61
7.4.200.0050.00316.63
7.4.160.0080.00816.48
7.4.150.0070.01017.40
7.4.140.0110.00917.86
7.4.130.0040.01316.55
7.4.120.0090.00916.60
7.4.110.0170.00716.55
7.4.100.0100.01016.68
7.4.90.0090.00916.53
7.4.80.0080.00819.39
7.4.70.0100.00816.34
7.4.60.0090.00616.54
7.4.50.0080.00816.75
7.4.40.0080.00816.51
7.4.30.0110.00716.69
7.4.10.0100.00915.01
7.4.00.0080.01014.98
7.3.330.0030.00313.29
7.3.320.0000.00513.47
7.3.310.0030.00316.45
7.3.300.0000.00616.45
7.3.290.0070.00016.32
7.3.280.0100.00716.43
7.3.270.0140.00617.40
7.3.260.0090.00816.47
7.3.250.0140.00416.45
7.3.240.0080.01116.71
7.3.230.0070.01116.54
7.3.210.0030.01316.45
7.3.200.0060.00916.34
7.3.190.0130.00316.43
7.3.180.0160.00616.72
7.3.170.0100.00716.51
7.3.160.0120.00616.42
7.3.130.0060.00915.10
7.3.120.0060.01014.95
7.3.110.0050.00914.96
7.3.100.0080.00714.84
7.3.90.0030.01115.16
7.3.80.0070.00714.98
7.3.70.0070.00715.03
7.3.60.0040.00714.61
7.3.50.0070.00514.76
7.3.40.0070.00714.97
7.3.30.0070.00714.88
7.3.20.0080.00916.71
7.3.10.0040.00816.80
7.3.00.0090.00516.69
7.2.330.0100.00816.70
7.2.320.0140.00716.69
7.2.310.0100.00716.59
7.2.300.0070.01016.51
7.2.290.0040.01216.51
7.2.260.0100.01015.18
7.2.250.0100.01015.01
7.2.240.0030.00915.14
7.2.230.0040.01015.08
7.2.220.0050.00914.86
7.2.210.0080.00715.14
7.2.200.0080.00914.83
7.2.190.0130.00115.04
7.2.180.0070.00915.06
7.2.170.0050.01215.01
7.2.160.0070.00714.96
7.2.150.0030.00917.04
7.2.140.0020.01116.88
7.2.130.0110.00316.76
7.2.120.0050.01116.85
7.2.110.0020.01116.88
7.2.100.0110.00516.99
7.2.90.0600.01016.30
7.2.80.1010.01016.04
7.2.70.0800.01016.25
7.2.60.0920.01016.38
7.2.50.0660.00816.20
7.2.40.0490.00816.38
7.2.30.0300.01116.35
7.2.20.0130.01016.38
7.2.10.0500.01316.37
7.2.00.0090.00516.49
7.1.330.0050.01015.94
7.1.320.0070.00915.76
7.1.310.0040.01015.77
7.1.300.0030.00915.81
7.1.290.0100.00315.76
7.1.280.0040.00615.71
7.1.270.0080.00815.90
7.1.260.0030.01215.68
7.1.250.0030.00915.75
7.1.240.0030.00615.56
7.1.230.0000.00815.63
7.1.220.0030.01215.84
7.1.210.1600.00514.80
7.1.200.1100.00814.86
7.1.190.0990.00814.81
7.1.180.0610.00814.66
7.1.170.0650.01314.93
7.1.160.0080.00714.84
7.1.150.0090.00914.68
7.1.140.0040.01014.70
7.1.130.0190.00714.84
7.1.120.0560.00414.95
7.1.110.0390.00814.89
7.1.100.0080.00914.73
7.1.90.0030.01514.59
7.1.80.1260.00514.87
7.1.70.1110.01214.86
7.1.60.0820.00823.66
7.1.50.0230.00623.71
7.1.40.0920.00823.89
7.1.30.0130.00823.86
7.1.20.0280.01423.79
7.1.10.0320.00414.61
7.1.00.0830.00714.68
7.0.330.0060.00615.34
7.0.320.0060.00615.44
7.0.310.1020.00914.49
7.0.300.1370.01014.53
7.0.290.0120.00914.41
7.0.280.0360.01014.45
7.0.270.1270.00714.49
7.0.260.0850.00714.42
7.0.250.0090.00514.48
7.0.240.1460.00714.68
7.0.230.1140.00614.42
7.0.220.0090.00414.42
7.0.210.0790.00514.53
7.0.200.0130.01014.39
7.0.190.0110.00514.48
7.0.180.0130.00614.30
7.0.170.0090.00814.47
7.0.160.0090.00514.49
7.0.150.0080.00914.49
7.0.140.0720.00514.66
7.0.130.0560.00914.61
7.0.120.0240.00714.45
7.0.110.0190.00714.38
7.0.100.0480.00514.50
7.0.90.0260.00314.46
7.0.80.0320.00714.54
7.0.70.0100.00614.54
7.0.60.0080.00514.50
7.0.50.0220.00714.42
7.0.40.0470.00513.63
7.0.30.0530.00513.31
7.0.20.0380.00613.64
7.0.10.0520.00313.62
7.0.00.0890.00613.56
5.6.400.0070.01014.81
5.6.390.0120.00314.52
5.6.380.0070.00714.30
5.6.370.0060.00914.55
5.6.360.0100.00714.54
5.6.350.0060.00614.31
5.6.340.0070.00714.15
5.6.330.0030.00714.56
5.6.320.0070.01014.59
5.6.310.0000.01414.68
5.6.300.0030.01014.18
5.6.290.0090.00614.44
5.6.280.0090.00314.57
5.6.270.0000.01514.32
5.6.260.0000.00914.50
5.6.250.0030.00914.42
5.6.240.0160.00014.75
5.6.230.0040.01114.41
5.6.220.0040.01114.52
5.6.210.0030.00614.59
5.6.200.0110.00414.30
5.6.190.0080.00814.30
5.6.180.0050.00814.50
5.6.170.0050.00514.55
5.6.160.0130.00014.80
5.6.150.0030.00714.41
5.6.140.0040.00414.29
5.6.130.0040.01114.69
5.6.120.0090.00614.29
5.6.110.0070.00314.13
5.6.100.0100.00414.38
5.6.90.0060.00314.40
5.6.80.0100.00314.39
5.6.70.0120.00414.47
5.6.60.0070.00314.59
5.6.50.0100.00014.27
5.6.40.0040.01114.15
5.6.30.0000.00914.19
5.6.20.0000.01014.30
5.6.10.0040.00414.67
5.6.00.0030.00814.37

preferences:
49.1 ms | 401 KiB | 5 Q