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(); $bar->foo; $bar->aa()->a;

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.70.0110.00616.50
8.3.60.0150.00316.61
8.3.50.0090.01016.64
8.3.40.0060.00918.56
8.3.30.0130.00318.79
8.3.20.0080.00020.30
8.3.10.0080.00021.89
8.3.00.0060.00619.41
8.2.180.0140.00418.41
8.2.170.0140.00022.96
8.2.160.0070.00720.43
8.2.150.0070.00025.66
8.2.140.0080.00024.66
8.2.130.0060.00321.05
8.2.120.0080.00026.35
8.2.110.0090.00019.39
8.2.100.0070.00417.90
8.2.90.0070.00419.36
8.2.80.0040.00417.97
8.2.70.0000.00917.48
8.2.60.0040.00417.93
8.2.50.0000.00818.10
8.2.40.0040.00420.39
8.2.30.0000.00721.08
8.2.20.0040.00418.00
8.2.10.0070.00018.17
8.2.00.0050.00318.00
8.1.280.0070.01025.92
8.1.270.0000.00723.87
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0040.00422.20
8.1.230.0040.00717.89
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0060.00317.38
8.1.190.0030.00517.10
8.1.180.0000.00718.10
8.1.170.0040.00418.50
8.1.160.0070.00019.13
8.1.150.0000.00718.84
8.1.140.0050.00319.56
8.1.130.0030.00318.79
8.1.120.0000.00717.41
8.1.110.0060.00317.40
8.1.100.0000.00717.45
8.1.90.0040.00417.30
8.1.80.0000.00717.42
8.1.70.0000.00717.29
8.1.60.0030.00617.58
8.1.50.0040.00417.50
8.1.40.0040.00417.54
8.1.30.0000.00817.65
8.1.20.0000.00817.59
8.1.10.0040.00417.61
8.1.00.0050.00317.53
8.0.300.0040.00418.77
8.0.290.0060.00316.63
8.0.280.0000.00818.39
8.0.270.0000.00717.19
8.0.260.0000.00716.73
8.0.250.0000.00716.80
8.0.240.0040.00416.86
8.0.230.0060.00316.93
8.0.220.0070.00016.73
8.0.210.0050.00216.83
8.0.200.0000.00616.82
8.0.190.0070.00416.87
8.0.180.0080.00016.85
8.0.170.0000.00716.82
8.0.160.0080.00016.88
8.0.150.0040.00416.67
8.0.140.0070.00016.69
8.0.130.0030.00313.23
8.0.120.0070.00016.84
8.0.110.0000.00716.79
8.0.100.0030.00416.69
8.0.90.0030.00316.67
8.0.80.0040.01416.90
8.0.70.0070.00016.95
8.0.60.0040.00416.73
8.0.50.0040.00416.72
8.0.30.0100.00617.03
8.0.20.0110.00817.40
8.0.10.0040.00416.83
8.0.00.0070.01116.90
7.4.330.0030.00315.55
7.4.320.0080.00016.51
7.4.300.0030.00316.59
7.4.290.0080.00016.46
7.4.280.0050.00316.49
7.4.270.0030.00316.50
7.4.260.0050.00013.32
7.4.250.0030.00616.49
7.4.240.0030.00316.59
7.4.230.0070.00016.37
7.4.220.0070.01116.58
7.4.210.0060.00916.64
7.4.200.0030.00316.65
7.4.160.0110.00516.50
7.4.150.0100.00717.40
7.4.140.0110.00717.86
7.4.130.0120.01616.60
7.4.120.0070.01116.53
7.4.110.0040.01216.43
7.4.100.0100.01016.56
7.4.90.0130.00316.67
7.4.80.0090.01319.39
7.4.70.0120.00616.29
7.4.60.0080.00816.61
7.4.50.0060.00916.55
7.4.40.0100.00716.59
7.4.30.0110.00416.44
7.4.00.0100.00715.12
7.3.330.0000.00613.19
7.3.320.0050.00013.38
7.3.310.0000.00716.20
7.3.300.0030.00316.36
7.3.290.0000.00716.37
7.3.280.0100.00716.36
7.3.270.0100.00717.40
7.3.260.0080.00916.45
7.3.250.0120.00816.35
7.3.240.0090.01116.52
7.3.230.0110.00716.42
7.3.210.0100.00716.20
7.3.200.0120.00316.30
7.3.190.0130.00316.36
7.3.180.0030.01816.56
7.3.170.0060.00916.40
7.3.160.0060.00916.60
7.3.10.0090.00016.25
7.3.00.0040.01116.79
7.2.330.0030.01616.76
7.2.320.0100.00716.42
7.2.310.0100.00716.78
7.2.300.0170.00016.41
7.2.290.0050.01116.44
7.2.130.0050.00516.75
7.2.120.0060.00916.83
7.2.110.0070.00717.04
7.2.100.0070.00717.01
7.2.90.0570.00915.85
7.2.80.0620.00615.85
7.2.70.0360.00615.96
7.2.60.0120.00715.93
7.2.50.0540.00616.15
7.2.40.0070.01015.85
7.2.30.0120.00416.08
7.2.20.0090.01015.97
7.2.10.0750.00515.98
7.2.00.0090.00415.96
7.1.250.0030.00615.87
7.1.210.1680.01413.92
7.1.200.1140.01013.84
7.1.190.0090.01214.02
7.1.180.0780.00314.11
7.1.170.1810.00313.93
7.1.160.0070.01314.04
7.1.150.0080.01213.79
7.1.140.0110.01113.83
7.1.130.0910.00613.83
7.1.120.0430.00313.79
7.1.110.0090.00913.90
7.1.100.0450.00613.83
7.1.90.0910.00413.89
7.1.80.0100.01013.76
7.1.70.0170.00513.91
7.1.60.2020.00732.02
7.1.50.2480.00731.73
7.1.40.0350.00332.00
7.1.30.0210.01731.40
7.1.20.0340.00431.76
7.1.10.0170.00613.43
7.1.00.0070.01313.71
7.0.310.1500.00713.50
7.0.300.0590.01613.53
7.0.290.0070.01013.29
7.0.280.0090.01013.39
7.0.270.0080.00813.58
7.0.260.0110.01313.12
7.0.250.0110.00813.50
7.0.240.1930.01013.59
7.0.230.0560.00713.43
7.0.220.1620.00713.67
7.0.210.1700.00013.16
7.0.200.1860.00313.34
7.0.190.1730.00713.51
7.0.180.0930.00313.49
7.0.170.0140.00713.55
7.0.160.0060.00913.45
7.0.150.0550.00913.20
7.0.140.0220.00813.38
7.0.130.0140.00313.34
7.0.120.0090.00913.42
7.0.110.0310.00613.43
7.0.100.3520.01013.38
7.0.90.0150.00013.58
7.0.80.0080.00813.44
7.0.70.1150.00613.67
7.0.60.0090.00813.46
7.0.50.0090.00313.58
7.0.40.0570.00713.49
7.0.30.0080.00813.78
7.0.20.0330.01213.66
7.0.10.0140.00613.55
7.0.00.1090.01013.47

preferences:
53.25 ms | 401 KiB | 5 Q