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.0100.01018.68
8.3.50.0090.01616.38
8.3.40.0100.00718.56
8.3.30.0130.00318.52
8.3.20.0000.00820.29
8.3.10.0040.00421.70
8.3.00.0090.00017.78
8.2.180.0070.01316.63
8.2.170.0060.01322.96
8.2.160.0100.00720.35
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00020.96
8.2.120.0040.00426.35
8.2.110.0030.00722.08
8.2.100.0080.00417.91
8.2.90.0030.00519.40
8.2.80.0080.00018.05
8.2.70.0040.00417.63
8.2.60.0030.00617.93
8.2.50.0040.00418.18
8.2.40.0080.00022.29
8.2.30.0030.00519.37
8.2.20.0060.00318.24
8.2.10.0040.00418.01
8.2.00.0040.00418.18
8.1.280.0120.00425.92
8.1.270.0050.00323.91
8.1.260.0080.00026.35
8.1.250.0000.00928.09
8.1.240.0090.00023.92
8.1.230.0060.00620.31
8.1.220.0070.00017.74
8.1.210.0040.00418.77
8.1.200.0100.00017.36
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0090.00018.53
8.1.160.0070.00019.02
8.1.150.0070.00018.68
8.1.140.0070.00019.59
8.1.130.0030.00318.78
8.1.120.0050.00217.32
8.1.110.0080.00017.34
8.1.100.0000.00817.34
8.1.90.0040.00417.25
8.1.80.0040.00417.43
8.1.70.0000.00717.44
8.1.60.0060.00317.62
8.1.50.0060.00317.46
8.1.40.0040.00417.48
8.1.30.0000.00817.70
8.1.20.0040.00817.71
8.1.10.0040.00417.45
8.1.00.0000.00717.55
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0070.00018.46
8.0.270.0000.00717.33
8.0.260.0030.00316.89
8.0.250.0000.00716.97
8.0.240.0070.00016.86
8.0.230.0060.00316.84
8.0.220.0000.00716.74
8.0.210.0000.00816.75
8.0.200.0030.00316.91
8.0.190.0040.00416.84
8.0.180.0000.00716.73
8.0.170.0000.00716.89
8.0.160.0000.00816.91
8.0.150.0070.00016.77
8.0.140.0040.00316.80
8.0.130.0000.00513.34
8.0.120.0030.00516.79
8.0.110.0050.00316.69
8.0.100.0000.00716.96
8.0.90.0040.00416.91
8.0.80.0030.01316.85
8.0.70.0030.00516.90
8.0.60.0050.00216.88
8.0.50.0000.00716.73
8.0.30.0100.00917.29
8.0.20.0100.01117.41
8.0.10.0000.00716.93
8.0.00.0140.00416.47
7.4.330.0000.00515.55
7.4.320.0040.00416.48
7.4.300.0000.00616.54
7.4.290.0070.00316.50
7.4.280.0080.00016.63
7.4.270.0030.00316.51
7.4.260.0030.00313.27
7.4.250.0040.00416.48
7.4.240.0030.00316.61
7.4.230.0000.00716.49
7.4.220.0070.01616.68
7.4.210.0070.00916.51
7.4.200.0030.00316.35
7.4.160.0090.00616.74
7.4.150.0100.00717.40
7.4.140.0120.00817.86
7.4.130.0120.01216.51
7.4.120.0110.00916.56
7.4.110.0120.00416.68
7.4.100.0150.00916.52
7.4.90.0060.01216.47
7.4.80.0070.01019.39
7.4.70.0110.00516.51
7.4.60.0120.00316.47
7.4.50.0000.01616.29
7.4.40.0090.00816.69
7.4.30.0070.01116.67
7.4.10.0100.01014.84
7.4.00.0060.01314.91
7.3.330.0000.00613.19
7.3.320.0000.00513.31
7.3.310.0040.00416.36
7.3.300.0070.00016.36
7.3.290.0070.00016.17
7.3.280.0070.00916.36
7.3.270.0070.01017.40
7.3.260.0080.01116.37
7.3.250.0060.01116.43
7.3.240.0100.00716.47
7.3.230.0110.01416.33
7.3.210.0070.01016.76
7.3.200.0060.01016.43
7.3.190.0090.00916.33
7.3.180.0080.00816.21
7.3.170.0000.01816.29
7.3.160.0140.00516.34
7.3.130.0030.01414.50
7.3.120.0030.01014.62
7.3.110.0100.00914.69
7.3.100.0050.00814.62
7.3.90.0090.00515.02
7.3.80.0060.00614.90
7.3.70.0080.00514.78
7.3.60.0020.01114.65
7.3.50.0090.00814.74
7.3.40.0070.00814.72
7.3.30.0010.00914.82
7.3.20.0030.01116.67
7.3.10.0030.01316.42
7.3.00.0100.00716.71
7.2.330.0170.00316.61
7.2.320.0060.01016.62
7.2.310.0120.00416.76
7.2.300.0140.00716.56
7.2.290.0080.00916.80
7.2.260.0000.01714.87
7.2.250.0080.01115.16
7.2.240.0030.01215.08
7.2.230.0100.00415.03
7.2.220.0020.01415.21
7.2.210.0070.00915.23
7.2.200.0050.00715.06
7.2.190.0060.00815.15
7.2.180.0100.00715.11
7.2.170.0050.00914.95
7.2.160.0000.01014.77
7.2.150.0070.00716.81
7.2.140.0100.00716.91
7.2.130.0060.00617.17
7.2.120.0130.00316.95
7.2.110.0090.00117.05
7.2.100.0030.00716.89
7.2.90.0060.00816.51
7.2.80.0050.01016.81
7.2.70.0060.01016.92
7.2.60.0030.01016.96
7.2.50.0040.01115.83
7.2.40.0300.01016.91
7.2.30.0080.00817.01
7.2.20.0080.00716.96
7.2.10.0100.00416.80
7.2.00.0060.01216.95
7.1.330.0150.00015.59
7.1.320.0060.00915.82
7.1.310.0070.00816.07
7.1.300.0100.00515.66
7.1.290.0100.00815.71
7.1.280.0030.00815.79
7.1.270.0080.00815.77
7.1.260.0040.01115.82
7.1.250.0070.00715.76
7.1.240.0080.00515.84
7.1.230.0070.00715.72
7.1.220.0070.00315.55
7.1.210.0030.01015.83
7.1.200.0420.00715.77
7.1.190.0040.00915.67
7.1.180.0080.00615.69
7.1.170.0100.00314.88
7.1.160.0070.00815.87
7.1.150.0290.00515.82
7.1.140.0310.00515.85
7.1.130.0020.01315.75
7.1.120.0090.00815.80
7.1.110.0080.00715.87
7.1.100.0090.00615.73
7.1.90.0070.00515.88
7.1.80.0040.01115.88
7.1.70.0110.00415.76
7.1.60.0150.01224.87
7.1.50.0130.01524.96
7.1.40.0580.01624.78
7.1.30.0150.01124.83
7.1.20.0240.01623.84
7.1.10.0100.00515.85
7.1.00.0260.00515.69
7.0.330.0070.01015.40
7.0.320.0120.00315.32
7.0.310.0040.01115.32
7.0.300.0060.00915.39
7.0.290.0370.00514.59
7.0.280.0060.00915.53
7.0.270.0060.00715.33
7.0.260.0060.00815.30
7.0.250.0050.00815.35
7.0.240.0040.00615.51
7.0.230.0060.00615.33
7.0.220.0050.00715.47
7.0.210.0080.00515.51
7.0.200.0060.00815.28
7.0.190.0060.01015.31
7.0.180.0100.00415.17
7.0.170.0340.00915.44
7.0.160.0030.01115.46
7.0.150.0350.00815.43
7.0.140.0400.00115.38
7.0.130.0050.00715.39
7.0.120.0360.00515.45
7.0.110.0630.00915.51
7.0.100.0110.00315.39
7.0.90.0350.00815.35
7.0.80.0290.00415.37
7.0.70.0050.01015.44
7.0.60.0270.00515.49
7.0.50.0080.00715.41
7.0.40.0020.01114.52
7.0.30.0060.00514.49
7.0.20.0120.00414.55
7.0.10.0080.00714.50
7.0.00.0030.01014.42
5.6.400.0100.00714.50
5.6.390.0060.01014.67
5.6.380.0100.00014.51
5.6.370.0000.01414.50
5.6.360.0100.00614.40
5.6.350.0100.00714.52
5.6.340.0080.00514.57
5.6.330.0100.00714.43
5.6.320.0040.01114.64
5.6.310.0060.00614.43
5.6.300.0000.01314.57
5.6.290.0130.00014.18
5.6.280.0080.00314.54
5.6.270.0030.01014.62
5.6.260.0060.01214.73
5.6.250.0090.00414.50
5.6.240.0110.00314.62
5.6.230.0070.01114.61
5.6.220.0060.00914.50
5.6.210.0120.00414.46
5.6.200.0100.00314.60
5.6.190.0090.00314.35
5.6.180.0070.00414.63
5.6.170.0030.00914.27
5.6.160.0060.01314.46
5.6.150.0040.01114.46
5.6.140.0100.00314.25
5.6.130.0030.01714.33
5.6.120.0070.01114.33
5.6.110.0070.00714.44
5.6.100.0060.00914.38
5.6.90.0040.00414.58
5.6.80.0000.01214.62
5.6.70.0090.00614.22
5.6.60.0030.00914.33
5.6.50.0030.01314.20
5.6.40.0030.01214.33
5.6.30.0110.00714.32
5.6.20.0000.01514.31
5.6.10.0070.01014.35
5.6.00.0090.00614.30

preferences:
45.95 ms | 401 KiB | 5 Q