3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $items; function __construct($a) { $this->items = []; $this->items['params'] = []; $this->items['a'] = $a; } function __get($name) { if ($name === 'a') { return $this->items['a']; } return null; } function __isset($a) { var_dump($a); return isset($this->items->params[$a]); } function bar() { if (isset($this->a['xyz'])) { return 'yes'; } return 'no'; } function baz() { $tmp = $this->a; if (isset($tmp['xyz'])) { return 'yes'; } return 'no'; } } $f = new Foo(['xyz' => true]); var_dump($f->bar()); var_dump($f->baz());

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.0070.00718.31
8.3.60.0120.00618.43
8.3.50.0150.00421.16
8.3.40.0040.01118.76
8.3.30.0110.00418.70
8.3.20.0040.00420.56
8.3.10.0070.00021.77
8.3.00.0040.00418.05
8.2.190.0120.00316.58
8.2.180.0070.00725.92
8.2.170.0170.00722.96
8.2.160.0150.00321.12
8.2.150.0050.00324.18
8.2.140.0090.00024.66
8.2.130.0040.00419.54
8.2.120.0040.00426.35
8.2.110.0060.00319.16
8.2.100.0090.00317.91
8.2.90.0000.00917.72
8.2.80.0080.00018.22
8.2.70.0040.00417.50
8.2.60.0080.00017.63
8.2.50.0000.00917.36
8.2.40.0050.00317.63
8.2.30.0040.00419.39
8.2.20.0000.00717.71
8.2.10.0000.00718.20
8.2.00.0050.00218.00
8.1.280.0070.01025.92
8.1.270.0070.00023.84
8.1.260.0080.00028.09
8.1.250.0030.00528.09
8.1.240.0030.00622.42
8.1.230.0090.00620.70
8.1.220.0060.00317.74
8.1.210.0040.00418.89
8.1.200.0040.00417.25
8.1.190.0000.00917.22
8.1.180.0040.00418.10
8.1.170.0030.00518.42
8.1.160.0080.00020.70
8.1.150.0000.00720.66
8.1.140.0000.00819.45
8.1.130.0040.00217.69
8.1.120.0050.00317.32
8.1.110.0000.00717.44
8.1.100.0040.00417.37
8.1.90.0000.00817.28
8.1.80.0000.00717.41
8.1.70.0030.00617.46
8.1.60.0060.00317.64
8.1.50.0060.00317.44
8.1.40.0000.00817.44
8.1.30.0030.00517.60
8.1.20.0080.00017.59
8.1.10.0030.00517.55
8.1.00.0110.00017.52
8.0.300.0000.00719.82
8.0.290.0040.00416.63
8.0.280.0000.00818.34
8.0.270.0000.00716.62
8.0.260.0060.00017.17
8.0.250.0000.00716.92
8.0.240.0050.00216.80
8.0.230.0030.00316.93
8.0.220.0000.00716.74
8.0.210.0000.00716.84
8.0.200.0070.00016.90
8.0.190.0040.00416.78
8.0.180.0000.00716.91
8.0.170.0040.00416.77
8.0.160.0000.00716.87
8.0.150.0040.00416.70
8.0.140.0050.00216.83
8.0.130.0000.00513.27
8.0.120.0040.00416.86
8.0.110.0000.00716.83
8.0.100.0040.00416.67
8.0.90.0000.00716.90
8.0.80.0090.00616.91
8.0.70.0030.00616.86
8.0.60.0020.00516.96
8.0.50.0020.00516.75
8.0.30.0140.00917.16
8.0.20.0140.00717.40
8.0.10.0070.00017.02
8.0.00.0170.00616.96
7.4.330.0050.00015.08
7.4.320.0030.00316.63
7.4.300.0030.00316.66
7.4.290.0030.00316.50
7.4.280.0000.00916.52
7.4.270.0040.00416.53
7.4.260.0030.00316.59
7.4.250.0040.00416.59
7.4.240.0050.00316.58
7.4.230.0000.00716.64
7.4.220.0120.00316.57
7.4.210.0150.00016.64
7.4.200.0040.00416.43
7.4.160.0030.01316.59
7.4.150.0170.00017.40
7.4.140.0090.01217.86
7.4.130.0100.00716.53
7.4.120.0100.00716.50
7.4.110.0030.01416.58
7.4.100.0060.01016.63
7.4.90.0150.00416.49
7.4.80.0110.00819.39
7.4.70.0000.01716.56
7.4.60.0100.01016.65
7.4.50.0090.00616.51
7.4.40.0130.01016.51
7.4.30.0130.00416.48
7.4.00.0050.01114.98
7.3.330.0070.00013.32
7.3.320.0000.00613.48
7.3.310.0000.00716.49
7.3.300.0030.00316.40
7.3.290.0100.00716.42
7.3.280.0070.00916.36
7.3.270.0130.00517.40
7.3.260.0090.00916.35
7.3.250.0080.01016.50
7.3.240.0110.01016.58
7.3.230.0090.00916.62
7.3.210.0070.01016.57
7.3.200.0100.00719.39
7.3.190.0150.00716.32
7.3.180.0080.00816.39
7.3.170.0030.01316.27
7.3.160.0060.00916.62
7.3.120.0120.00614.66
7.3.110.0110.00715.03
7.3.100.0000.01114.71
7.3.90.0060.01215.11
7.3.80.0070.00714.92
7.3.70.0060.00314.94
7.3.60.0080.00814.87
7.3.50.0040.00814.77
7.3.40.0120.00314.66
7.3.30.0120.00014.86
7.3.20.0030.01016.64
7.3.10.0000.01116.46
7.3.00.0040.00716.64
7.2.330.0140.00516.54
7.2.320.0110.01116.86
7.2.310.0070.01016.55
7.2.300.0060.01116.68
7.2.290.0070.01016.58
7.2.250.0030.01714.75
7.2.240.0100.00715.08
7.2.230.0070.01114.68
7.2.220.0030.01215.20
7.2.210.0060.00315.09
7.2.200.0070.01015.16
7.2.190.0070.00714.84
7.2.180.0040.01115.16
7.2.170.0100.00714.84
7.2.130.0090.00917.04
7.2.120.0110.00416.97
7.2.110.0090.00916.98
7.2.100.0060.00617.03
7.2.90.0130.00616.82
7.2.80.0090.00616.79
7.2.70.0070.01017.10
7.2.60.0100.00316.85
7.2.50.0060.00616.70
7.2.40.0040.01217.10
7.2.30.0090.00417.11
7.2.20.0000.01116.86
7.2.10.0040.00916.79
7.2.00.0130.00316.79
7.1.330.0110.00415.77
7.1.320.0070.00716.02
7.1.310.0070.01015.88
7.1.300.0030.00615.81
7.1.290.0090.00615.81
7.1.280.0150.00015.69
7.1.270.0030.01015.94
7.1.260.0060.00615.95
7.1.250.0080.00815.58
7.1.240.0000.01015.59
7.1.230.0030.01015.52
7.1.220.0080.00915.94
7.1.210.0060.00615.44
7.1.200.0080.00515.79
7.1.190.0030.01015.52
7.1.180.0070.01015.83
7.1.170.0080.00615.72
7.1.160.0100.00315.66
7.1.150.0060.00815.87
7.1.140.0070.00715.57
7.1.130.0080.00815.54
7.1.120.0040.00715.49
7.1.110.0090.00315.63
7.1.100.0030.00615.61
7.1.90.0080.00815.71
7.1.80.0100.00615.85
7.1.70.0030.01116.59
7.1.60.0030.01517.74
7.1.50.0040.00916.44
7.1.40.0030.01015.86
7.1.30.0040.01115.74
7.1.20.0100.00715.44
7.1.10.0060.00915.63
7.1.00.0060.03819.15
7.0.330.0100.00315.41
7.0.320.0040.00415.41
7.0.310.0040.00415.33
7.0.300.0140.00015.50
7.0.290.0030.00915.46
7.0.280.0040.01115.43
7.0.270.0090.00615.17
7.0.260.0030.00715.35
7.0.250.0040.01115.41
7.0.240.0060.00915.31
7.0.230.0130.00315.39
7.0.220.0000.01015.48
7.0.210.0070.00715.30
7.0.200.0020.00716.04
7.0.190.0030.00615.16
7.0.180.0000.01215.46
7.0.170.0060.00615.03
7.0.160.0100.00315.37
7.0.150.0040.01115.37
7.0.140.0000.00815.40
7.0.130.0060.00315.55
7.0.120.0030.01015.30
7.0.110.0030.00515.44
7.0.100.0040.00815.43
7.0.90.0030.00615.17
7.0.80.0070.00715.16
7.0.70.0070.00715.15
7.0.60.0140.03217.66
7.0.50.0130.03317.85
7.0.40.0200.03616.78
7.0.30.0080.03316.91
7.0.20.0160.03116.92
7.0.10.0200.02517.00
7.0.00.0150.04316.86
5.6.380.0110.00314.79
5.6.370.0090.00914.21
5.6.360.0040.01114.29
5.6.350.0120.00014.23
5.6.340.0110.00314.64
5.6.330.0070.00714.74
5.6.320.0090.00614.55
5.6.310.0000.01014.63
5.6.300.0030.01314.36
5.6.290.0000.01514.73
5.6.280.0020.04217.60
5.6.270.0080.00814.40
5.6.260.0000.01414.57
5.6.250.0000.01114.27
5.6.240.0000.01314.36
5.6.230.0140.00014.50
5.6.220.0030.01014.14
5.6.210.0030.04517.74
5.6.200.0160.03017.71
5.6.190.0130.04017.78
5.6.180.0160.03117.67
5.6.170.0070.03517.77
5.6.160.0150.03317.68
5.6.150.0150.03317.60
5.6.140.0120.02917.78
5.6.130.0190.03117.64
5.6.120.0080.03517.64
5.6.110.0160.03317.63
5.6.100.0160.03017.64
5.6.90.0170.03617.80
5.6.80.0210.03817.45
5.6.70.0130.03317.41
5.6.60.0100.03417.43
5.6.50.0250.03317.38
5.6.40.0150.03217.41
5.6.30.0210.02917.34
5.6.20.0170.03117.40
5.6.10.0150.02917.39
5.6.00.0200.02717.52
5.5.380.0020.00511.54
5.5.370.0040.00811.05
5.5.360.0060.00011.24
5.5.350.0130.01615.80
5.5.340.0150.02816.10
5.5.330.0180.02716.02
5.5.320.0170.03016.16
5.5.310.0100.02816.16
5.5.300.0080.03116.12
5.5.290.0070.03915.99
5.5.280.0120.02716.20
5.5.270.0120.03016.12
5.5.260.0150.03415.93
5.5.250.0160.03116.07
5.5.240.0100.03515.88
5.5.230.0150.02815.73
5.5.220.0100.03315.62
5.5.210.0100.03315.85
5.5.200.0080.03715.56
5.5.190.0140.03615.60
5.5.180.0170.03115.75
5.5.170.0030.00311.01
5.5.160.0080.03115.65
5.5.150.0100.02715.70
5.5.140.0100.03115.52
5.5.130.0100.03115.67
5.5.120.0120.03215.64
5.5.110.0180.03615.76
5.5.100.0200.02815.93
5.5.90.0120.03015.61
5.5.80.0140.03615.68
5.5.70.0180.02815.70
5.5.60.0260.03315.49
5.5.50.0150.03215.76
5.5.40.0200.03315.60
5.5.30.0130.03415.38
5.5.20.0150.03015.48
5.5.10.0150.03015.73
5.5.00.0150.03215.69

preferences:
53.74 ms | 401 KiB | 5 Q