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']; 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.0160.00618.55
8.3.50.0120.00616.39
8.3.40.0120.00418.85
8.3.30.0070.00718.79
8.3.20.0000.00820.34
8.3.10.0040.00423.66
8.3.00.0070.00317.76
8.2.180.0100.00716.38
8.2.170.0100.00722.96
8.2.160.0100.00320.22
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0070.00021.00
8.2.120.0040.00426.35
8.2.110.0090.00021.07
8.2.100.0120.00017.84
8.2.90.0040.00419.17
8.2.80.0050.00317.97
8.2.70.0040.00417.75
8.2.60.0060.00318.03
8.2.50.0030.00618.10
8.2.40.0030.00622.29
8.2.30.0040.00419.39
8.2.20.0000.00718.11
8.2.10.0050.00318.08
8.2.00.0020.00518.09
8.1.280.0090.00925.92
8.1.270.0040.00423.97
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0100.00019.16
8.1.230.0080.00320.31
8.1.220.0030.00617.77
8.1.210.0060.00318.77
8.1.200.0060.00317.35
8.1.190.0040.00417.23
8.1.180.0080.00018.10
8.1.170.0000.00818.55
8.1.160.0040.00419.04
8.1.150.0020.00518.70
8.1.140.0040.00419.56
8.1.130.0070.00018.78
8.1.120.0070.00017.38
8.1.110.0000.00717.34
8.1.100.0020.00517.41
8.1.90.0040.00417.38
8.1.80.0040.00417.41
8.1.70.0000.00717.36
8.1.60.0060.00317.60
8.1.50.0000.00717.54
8.1.40.0030.00617.54
8.1.30.0080.00017.66
8.1.20.0030.00817.70
8.1.10.0040.00417.64
8.1.00.0040.00417.52
8.0.300.0040.00418.77
8.0.290.0050.00316.75
8.0.280.0050.00318.38
8.0.270.0030.00317.34
8.0.260.0030.00316.76
8.0.250.0020.00516.95
8.0.240.0000.00716.94
8.0.230.0080.00016.93
8.0.220.0070.00016.74
8.0.210.0000.00716.76
8.0.200.0060.00016.95
8.0.190.0000.01016.82
8.0.180.0080.00016.73
8.0.170.0070.00016.91
8.0.160.0000.00716.93
8.0.150.0000.00716.82
8.0.140.0000.00716.68
8.0.130.0030.00313.30
8.0.120.0000.00716.70
8.0.110.0030.00316.89
8.0.100.0000.00716.80
8.0.90.0080.00016.91
8.0.80.0060.01216.91
8.0.70.0040.00416.71
8.0.60.0050.00216.96
8.0.50.0040.00416.66
8.0.30.0110.00817.25
8.0.20.0090.01217.40
8.0.10.0030.00517.00
8.0.00.0110.00616.61
7.4.330.0000.00515.55
7.4.320.0030.00316.36
7.4.300.0000.00616.59
7.4.290.0050.00516.64
7.4.280.0000.00716.52
7.4.270.0030.00316.42
7.4.260.0050.00013.29
7.4.250.0050.00316.57
7.4.240.0040.00316.43
7.4.230.0030.00316.69
7.4.220.0110.01116.39
7.4.210.0130.00216.51
7.4.200.0030.00316.27
7.4.160.0110.00416.37
7.4.150.0100.00717.40
7.4.140.0080.01017.86
7.4.130.0150.00616.58
7.4.120.0100.01116.49
7.4.110.0090.00916.44
7.4.100.0150.00916.43
7.4.90.0000.01816.38
7.4.80.0140.00319.39
7.4.70.0060.01016.56
7.4.60.0030.01316.45
7.4.50.0060.00616.50
7.4.40.0160.00516.47
7.4.30.0100.00616.48
7.4.10.0120.00615.19
7.4.00.0080.00915.16
7.3.330.0030.00313.23
7.3.320.0000.00613.19
7.3.310.0050.00316.39
7.3.300.0030.00316.32
7.3.290.0000.00716.27
7.3.280.0100.00716.35
7.3.270.0150.00317.40
7.3.260.0150.01316.34
7.3.250.0110.00916.39
7.3.240.0090.00916.54
7.3.230.0060.01716.57
7.3.210.0100.00616.60
7.3.200.0090.00616.57
7.3.190.0080.00816.32
7.3.180.0030.01716.56
7.3.170.0110.00516.47
7.3.160.0060.01116.59
7.3.130.0070.01014.75
7.3.120.0040.01114.87
7.3.110.0130.00314.72
7.3.100.0070.01015.13
7.3.90.0060.00815.07
7.3.80.0060.00614.80
7.3.70.0030.00914.95
7.3.60.0100.00714.86
7.3.50.0090.00614.83
7.3.40.0090.00914.61
7.3.30.0100.00714.78
7.3.20.0030.01016.86
7.3.10.0020.01316.67
7.3.00.0070.00716.52
7.2.330.0070.01116.81
7.2.320.0110.00716.50
7.2.310.0060.01016.67
7.2.300.0090.00816.81
7.2.290.0120.00616.76
7.2.260.0030.00914.96
7.2.250.0030.01315.28
7.2.240.0030.01215.07
7.2.230.0070.01014.90
7.2.220.0030.01315.08
7.2.210.0000.01414.86
7.2.200.0060.00614.91
7.2.190.0090.00615.09
7.2.180.0090.00315.10
7.2.170.0060.00915.04
7.2.160.0040.01414.97
7.2.150.0070.00716.79
7.2.140.0070.01016.93
7.2.130.0040.01116.93
7.2.120.0080.00716.83
7.2.110.0100.00516.82
7.2.100.0050.00816.90
7.2.90.0350.00916.38
7.2.80.0160.00716.42
7.2.70.0110.00716.37
7.2.60.0420.01016.47
7.2.50.0080.00916.38
7.2.40.0200.01116.52
7.2.30.0060.01016.52
7.2.20.0330.00516.53
7.2.10.0230.00616.38
7.2.00.0110.00716.57
7.1.330.0030.01315.76
7.1.320.0000.01515.92
7.1.310.0000.00915.75
7.1.300.0000.01115.59
7.1.290.0100.00315.81
7.1.280.0150.00316.00
7.1.270.0100.00315.84
7.1.260.0070.00715.86
7.1.250.0040.00915.88
7.1.240.0060.00715.69
7.1.230.0050.00615.67
7.1.220.0080.00515.82
7.1.210.0500.00315.15
7.1.200.0220.00615.01
7.1.190.0380.00515.21
7.1.180.0040.00915.26
7.1.170.0640.00415.25
7.1.160.0360.00615.12
7.1.150.0060.00615.08
7.1.140.0420.00715.17
7.1.130.0120.00414.99
7.1.120.0080.00615.16
7.1.110.0080.00615.20
7.1.100.0320.00815.14
7.1.90.0300.00515.16
7.1.80.0140.00815.15
7.1.70.0390.00715.20
7.1.60.0290.00721.09
7.1.50.0330.00621.13
7.1.40.0130.01021.20
7.1.30.0230.00821.07
7.1.20.0140.00921.14
7.1.10.0050.01015.05
7.1.00.0080.00415.07
7.0.330.0050.00815.48
7.0.320.0050.00915.35
7.0.310.0410.00514.74
7.0.300.0090.00614.64
7.0.290.0180.00514.83
7.0.280.0380.00714.77
7.0.270.0340.00414.65
7.0.260.0310.00414.71
7.0.250.0390.00714.76
7.0.240.0300.00514.67
7.0.230.0620.00414.80
7.0.220.0140.01014.81
7.0.210.0220.00414.77
7.0.200.0220.00514.61
7.0.190.0050.00814.83
7.0.180.0400.00214.73
7.0.170.0090.00514.83
7.0.160.0110.00514.72
7.0.150.0110.00614.70
7.0.140.0110.00714.80
7.0.130.0130.00514.80
7.0.120.0070.01014.89
7.0.110.0080.00714.83
7.0.100.0470.00914.81
7.0.90.0090.00414.84
7.0.80.0230.01014.79
7.0.70.0120.00614.89
7.0.60.0060.00814.82
7.0.50.0110.00514.84
7.0.40.0140.00613.49
7.0.30.0060.00913.57
7.0.20.0060.00913.66
7.0.10.0320.00613.51
7.0.00.0460.00913.50
5.6.400.0060.01314.64
5.6.390.0000.00914.30
5.6.380.0010.01114.46
5.6.370.0050.00514.50
5.6.360.0070.00714.22
5.6.350.0060.00314.65
5.6.340.0000.01314.59
5.6.330.0150.00014.64
5.6.320.0100.00614.59
5.6.310.0100.00714.27
5.6.300.0070.00314.70
5.6.290.0060.00314.44
5.6.280.0060.00914.49
5.6.270.0030.01314.52
5.6.260.0110.00714.36
5.6.250.0000.00914.22
5.6.240.0070.01014.39
5.6.230.0030.01214.28
5.6.220.0040.00414.45
5.6.210.0060.00314.06
5.6.200.0050.00514.59
5.6.190.0110.00314.45
5.6.180.0000.01114.70
5.6.170.0040.00414.64
5.6.160.0060.00914.52
5.6.150.0040.01014.59
5.6.140.0070.00714.83
5.6.130.0070.01014.55
5.6.120.0030.01214.45
5.6.110.0090.00614.22
5.6.100.0080.00414.57
5.6.90.0060.00614.37
5.6.80.0040.00714.62
5.6.70.0100.00014.36
5.6.60.0060.00614.17
5.6.50.0060.00914.45
5.6.40.0070.00714.33
5.6.30.0060.00614.32
5.6.20.0070.00314.60
5.6.10.0040.01414.25
5.6.00.0090.00614.43

preferences:
35.77 ms | 401 KiB | 5 Q