3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestKey { private $data = array(); public function __set($name, $value) { $this->data[$name] = $value; } public function __get($name) { return @$this->data[$name]; } /** As of PHP 5.1.0 */ public function __isset($name) { // does not matter if (array_key_exists($name, $this->data)) { return true; } return false; } /** As of PHP 5.1.0 */ public function __unset($name) { unset($this->data[$name]); } } class TestValue { private $data = array(); public function __set($name, $value) { $this->data[$name] = $value; } public function __get($name) { return @$this->data[$name]; } /** As of PHP 5.1.0 */ public function __isset($name) { return isset($this->data[$name]); } /** As of PHP 5.1.0 */ public function __unset($name) { $this->data[$name] = null; } } $k = new TestKey(); $v = new TestValue(); $k->foo = $v->foo = "bar"; var_dump(isset($k->foo) === isset($v->foo)); $k->foo = $v->foo = null; var_dump(isset($k->foo) === isset($v->foo)); unset($k->foo, $v->foo); var_dump(isset($k->foo) === isset($v->foo));

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.0110.01116.63
8.3.50.0140.00822.00
8.3.40.0120.00918.70
8.3.30.0030.01719.26
8.3.20.0120.00320.33
8.3.10.0040.00423.53
8.3.00.0050.00319.38
8.2.180.0120.00618.41
8.2.170.0070.00722.96
8.2.160.0070.00720.46
8.2.150.0100.01024.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00422.08
8.2.110.0090.00020.34
8.2.100.0090.00317.72
8.2.90.0000.00819.30
8.2.80.0050.00317.97
8.2.70.0030.00517.63
8.2.60.0080.00017.93
8.2.50.0030.00818.07
8.2.40.0050.00318.22
8.2.30.0000.00717.95
8.2.20.0070.00017.68
8.2.10.0040.00419.72
8.2.00.0030.00517.68
8.1.280.0070.00725.92
8.1.270.0090.00023.92
8.1.260.0040.01126.35
8.1.250.0080.00028.09
8.1.240.0030.00623.92
8.1.230.0080.00418.95
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0060.00317.22
8.1.190.0040.00417.53
8.1.180.0050.00318.10
8.1.170.0090.00018.52
8.1.160.0040.00421.95
8.1.150.0040.00418.63
8.1.140.0030.00517.43
8.1.130.0040.00417.90
8.1.120.0040.00417.42
8.1.110.0030.00517.30
8.1.100.0000.00717.48
8.1.90.0000.00817.43
8.1.80.0060.00317.43
8.1.70.0000.00717.33
8.1.60.0040.00417.48
8.1.50.0060.00317.60
8.1.40.0050.00317.52
8.1.30.0000.00817.57
8.1.20.0000.00817.56
8.1.10.0000.00817.48
8.1.00.0080.00017.47
8.0.300.0000.00718.77
8.0.290.0060.00317.05
8.0.280.0020.00518.48
8.0.270.0040.00417.38
8.0.260.0030.00316.84
8.0.250.0030.00316.89
8.0.240.0040.00416.88
8.0.230.0040.00417.02
8.0.220.0030.00316.85
8.0.210.0040.00416.93
8.0.200.0030.00316.86
8.0.190.0040.00416.86
8.0.180.0070.00016.95
8.0.170.0000.00816.84
8.0.160.0040.00417.01
8.0.150.0070.00016.86
8.0.140.0040.00416.93
8.0.130.0060.00013.43
8.0.120.0050.00316.83
8.0.110.0040.00416.88
8.0.100.0000.00816.71
8.0.90.0000.00816.77
8.0.80.0030.02016.96
8.0.70.0060.00316.98
8.0.60.0040.00416.91
8.0.50.0040.00416.90
8.0.30.0080.01217.21
8.0.20.0080.01217.40
8.0.10.0060.00317.01
8.0.00.0090.00916.97
7.4.330.0060.00015.00
7.4.320.0030.00316.63
7.4.300.0060.00016.54
7.4.290.0030.00316.52
7.4.280.0030.00316.64
7.4.270.0000.00716.49
7.4.260.0030.00316.58
7.4.250.0040.00416.47
7.4.240.0030.00316.63
7.4.230.0000.00716.61
7.4.220.0110.00716.39
7.4.210.0060.01016.61
7.4.200.0030.00316.50
7.4.190.0040.00416.43
7.4.160.0060.01016.53
7.4.150.0140.00317.40
7.4.140.0150.00317.86
7.4.130.0090.00916.46
7.4.120.0070.00916.57
7.4.110.0030.01616.71
7.4.100.0150.00416.65
7.4.90.0130.00416.54
7.4.80.0150.00619.39
7.4.70.0030.01316.40
7.4.60.0030.01516.44
7.4.50.0030.00316.40
7.4.40.0080.00822.77
7.4.30.0090.00616.66
7.4.00.0070.00714.61
7.3.330.0000.00813.21
7.3.320.0000.00513.24
7.3.310.0070.00016.24
7.3.300.0070.00016.38
7.3.290.0080.00816.37
7.3.280.0070.01116.37
7.3.270.0150.00317.40
7.3.260.0070.01116.45
7.3.250.0070.01216.36
7.3.240.0070.01016.41
7.3.230.0060.01116.45
7.3.210.0100.00716.35
7.3.200.0060.00919.39
7.3.190.0130.00716.58
7.3.180.0100.00616.41
7.3.170.0040.01116.38
7.3.160.0100.00716.36
7.3.120.0000.01715.02
7.2.330.0060.01216.84
7.2.320.0110.00616.75
7.2.310.0030.01616.68
7.2.300.0100.00616.65
7.2.290.0130.00916.58
7.2.00.0060.00619.36
7.1.100.0000.01218.21
7.1.70.0000.00717.03
7.1.60.0190.00319.33
7.1.50.0160.00616.99
7.1.00.0000.08022.45
7.0.200.0040.00716.88
7.0.140.0000.07722.10
7.0.100.0430.06319.98
7.0.90.0000.05719.98
7.0.80.0070.08020.01
7.0.70.0170.06719.87
7.0.60.0100.07319.95
7.0.50.0100.07320.30
7.0.40.0000.07720.10
7.0.30.0130.07020.13
7.0.20.0000.04319.99
7.0.10.0030.04020.14
7.0.00.0100.07720.12
5.6.280.0030.07321.14
5.6.250.0100.08020.70
5.6.240.0100.08020.71
5.6.230.0070.07720.64
5.6.220.0070.08320.68
5.6.210.0070.09020.78
5.6.200.0070.08321.13
5.6.190.0100.07021.20
5.6.180.0000.05321.15
5.6.170.0030.05321.12
5.6.160.0070.07721.19
5.6.150.0100.05321.02
5.6.140.0030.08021.14
5.6.130.0030.06321.03
5.6.120.0230.03021.03
5.6.110.0170.06721.03
5.6.100.0100.07721.07
5.6.90.0100.04321.13
5.6.80.0030.08020.57
5.6.70.0130.07320.47
5.6.60.0000.07320.33
5.6.50.0070.04020.44
5.6.40.0070.05720.44
5.6.30.0100.05720.39
5.6.20.0030.08720.39
5.6.10.0070.07720.40
5.6.00.0170.08320.38
5.5.380.0070.08720.40
5.5.370.0100.07720.53
5.5.360.0170.04320.46
5.5.350.0070.09020.37
5.5.340.0130.07320.90
5.5.330.0030.08020.81
5.5.320.0100.08020.79
5.5.310.0100.06720.94
5.5.300.0070.06720.65
5.5.290.0130.07720.84
5.5.280.0030.08320.85
5.5.270.0100.08020.89
5.5.260.0170.08020.90
5.5.250.0100.05720.75
5.5.240.0070.05720.29
5.5.230.0200.04320.21
5.5.220.0070.08320.25
5.5.210.0030.06720.30
5.5.200.0100.04020.11
5.5.190.0100.05020.25
5.5.180.0030.04320.12
5.5.160.0130.05020.16
5.5.150.0130.07320.25
5.5.140.0070.06320.23
5.5.130.0100.04720.20
5.5.120.0030.07020.28
5.5.110.0070.04320.29
5.5.100.0030.08320.19
5.5.90.0070.05020.14
5.5.80.0100.06020.16
5.5.70.0030.07020.12
5.5.60.0100.07320.10
5.5.50.0030.07720.10
5.5.40.0100.07719.94
5.5.30.0070.08020.07
5.5.20.0000.06320.11
5.5.10.0000.08020.00
5.5.00.0030.07020.00
5.4.450.0030.08319.46
5.4.440.0030.04719.37
5.4.430.0030.06019.35
5.4.420.0070.05319.17
5.4.410.0130.03719.32
5.4.400.0200.06018.95
5.4.390.0030.07719.04
5.4.380.0030.06019.13
5.4.370.0070.07319.04
5.4.360.0070.04319.05
5.4.350.0130.06018.91
5.4.340.0100.06719.03
5.4.320.0130.04019.09
5.4.310.0100.07718.85
5.4.300.0130.03718.87
5.4.290.0030.08318.90
5.4.280.0070.07719.22
5.4.270.0070.04019.02
5.4.260.0130.04719.02
5.4.250.0030.06018.83
5.4.240.0130.06319.04
5.4.230.0100.07019.04
5.4.220.0070.05319.13
5.4.210.0130.07319.04
5.4.200.0070.05019.02
5.4.190.0070.06719.02
5.4.180.0100.04019.13
5.4.170.0100.04018.84
5.4.160.0100.07318.85
5.4.150.0100.07718.93
5.4.140.0130.05016.48
5.4.130.0100.07316.50
5.4.120.0070.07716.46
5.4.110.0170.07016.45
5.4.100.0130.03016.41
5.4.90.0170.05716.45
5.4.80.0070.05716.55
5.4.70.0100.07016.52
5.4.60.0030.07716.42
5.4.50.0100.06716.28
5.4.40.0100.07716.41
5.4.30.0100.03716.44
5.4.20.0070.07016.47
5.4.10.0070.04316.39
5.4.00.0070.05315.87
5.3.290.0130.07014.79
5.3.280.0130.07714.58
5.3.270.0070.08014.55
5.3.260.0070.05314.56
5.3.250.0070.05014.76
5.3.240.0070.07714.55
5.3.230.0100.07314.55
5.3.220.0070.07314.59
5.3.210.0170.06714.61
5.3.200.0070.07714.51
5.3.190.0070.05714.59
5.3.180.0070.07314.68
5.3.170.0030.05314.64
5.3.160.0100.07314.58
5.3.150.0070.07714.52
5.3.140.0000.04714.55
5.3.130.0000.09014.53
5.3.120.0030.07314.54
5.3.110.0070.03714.57
5.3.100.0100.03714.06
5.3.90.0070.05313.96
5.3.80.0130.05014.15
5.3.70.0030.03714.06
5.3.60.0030.05714.11
5.3.50.0030.04014.03
5.3.40.0100.03714.05
5.3.30.0100.06313.99
5.3.20.0070.06013.61
5.3.10.0000.05013.59
5.3.00.0070.05313.59
5.2.170.0030.03311.19
5.2.160.0100.02011.07
5.2.150.0070.03311.07
5.2.140.0070.02711.15
5.2.130.0100.04311.04
5.2.120.0000.05311.04
5.2.110.0030.02710.98
5.2.100.0100.03711.25
5.2.90.0100.03711.11
5.2.80.0100.02311.27
5.2.70.0030.03311.12
5.2.60.0070.03011.16
5.2.50.0070.04711.06
5.2.40.0030.06010.90
5.2.30.0030.06311.10
5.2.20.0030.04011.02
5.2.10.0000.05710.74
5.2.00.0070.04310.67
5.1.60.0030.05310.00
5.1.50.0070.04710.04
5.1.40.0070.03710.09
5.1.30.0070.05010.42
5.1.20.0030.02710.29
5.1.10.0030.05710.15
5.1.00.0070.02710.00
5.0.50.0000.04310.00
5.0.40.0070.04010.00
5.0.30.0070.05710.00
5.0.20.0000.02010.00
5.0.10.0070.03010.00
5.0.00.0070.06710.00
4.4.90.0100.02710.00
4.4.80.0030.03310.00
4.4.70.0030.03310.00
4.4.60.0070.02310.00
4.4.50.0000.03710.00
4.4.40.0100.03710.00
4.4.30.0000.02010.00
4.4.20.0030.02310.00
4.4.10.0030.03310.00
4.4.00.0070.05010.00
4.3.110.0000.02010.00
4.3.100.0000.02010.00
4.3.90.0000.03310.00
4.3.80.0100.04010.00
4.3.70.0000.02310.00
4.3.60.0000.01710.00
4.3.50.0070.02710.00
4.3.40.0000.02310.00
4.3.30.0030.03010.00
4.3.20.0000.03710.00
4.3.10.0000.03710.00
4.3.00.0030.03310.00

preferences:
37.23 ms | 401 KiB | 5 Q