3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Coalescing { protected $attributes = [ 'attribute1' => 'value1', ]; public function __get($name) { print "GET\n"; if (array_key_exists($name, $this->attributes)) { return $this->attributes[$name]; } trigger_error("Property $name does not exist"); return null; } public function __isset($name) { print "ISSET\n"; return array_key_exists($name, $this->attributes); } } $coal = new Coalescing(); var_dump($coal->attribute1 ?? 'default'); var_dump($coal->attribute2 ?? 'default');

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.0130.00318.30
8.3.50.0160.00321.21
8.3.40.0040.01118.84
8.3.30.0120.00318.66
8.3.20.0040.00420.34
8.3.10.0000.00823.65
8.3.00.0000.00821.69
8.2.180.0120.00318.16
8.2.170.0100.00722.96
8.2.160.0070.00720.11
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00720.72
8.2.120.0040.00426.35
8.2.110.0050.00519.45
8.2.100.0070.00418.05
8.2.90.0030.00519.34
8.2.80.0030.00617.97
8.2.70.0030.00617.75
8.2.60.0040.00418.04
8.2.50.0000.00818.09
8.2.40.0070.00322.17
8.2.30.0030.00519.31
8.2.20.0000.00817.56
8.2.10.0040.00417.93
8.2.00.0040.00418.13
8.1.280.0110.00425.92
8.1.270.0130.00422.01
8.1.260.0030.00628.09
8.1.250.0040.00428.09
8.1.240.0000.00923.88
8.1.230.0120.00017.89
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0100.00017.35
8.1.190.0000.00817.10
8.1.180.0050.00318.10
8.1.170.0040.00418.51
8.1.160.0000.00720.77
8.1.150.0030.00518.86
8.1.140.0040.00419.57
8.1.130.0070.00017.70
8.1.120.0030.00317.37
8.1.110.0050.00217.29
8.1.100.0040.00417.23
8.1.90.0070.00017.43
8.1.80.0070.00017.28
8.1.70.0000.00717.43
8.1.60.0030.00617.48
8.1.50.0030.00617.47
8.1.40.0040.00417.40
8.1.30.0000.00917.73
8.1.20.0040.00417.58
8.1.10.0040.00417.58
8.1.00.0090.00017.40
8.0.300.0000.00918.77
8.0.290.0000.00716.63
8.0.280.0070.00018.48
8.0.270.0030.00317.16
8.0.260.0000.00617.32
8.0.250.0040.00416.94
8.0.240.0000.00616.88
8.0.230.0000.00816.85
8.0.220.0000.00716.85
8.0.210.0030.00316.74
8.0.200.0000.00616.89
8.0.190.0040.00416.89
8.0.180.0040.00416.86
8.0.170.0040.00416.84
8.0.160.0040.00416.86
8.0.150.0020.00516.81
8.0.140.0050.00316.71
8.0.130.0000.00613.32
8.0.120.0040.00416.82
8.0.110.0050.00316.90
8.0.100.0000.00816.89
8.0.90.0040.00416.85
8.0.80.0120.00316.81
8.0.70.0070.00016.84
8.0.60.0020.00516.80
8.0.50.0050.00216.86
8.0.30.0110.01017.06
8.0.20.0110.00817.40
8.0.10.0040.00416.75
8.0.00.0100.00916.62
7.4.330.0020.00216.70
7.4.320.0030.00316.59
7.4.300.0000.00816.53
7.4.290.0000.00716.52
7.4.280.0000.00716.49
7.4.270.0000.00716.52
7.4.260.0000.00716.59
7.4.250.0000.00716.45
7.4.240.0080.00016.53
7.4.230.0030.00316.40
7.4.220.0070.01116.56
7.4.210.0070.00916.58
7.4.200.0000.00716.50
7.4.160.0120.00916.38
7.4.150.0070.01117.40
7.4.140.0120.01317.86
7.4.130.0060.01416.40
7.4.120.0080.01016.53
7.4.110.0060.01016.66
7.4.100.0080.00916.73
7.4.90.0140.00316.47
7.4.80.0090.00919.39
7.4.70.0110.00616.36
7.4.60.0110.00716.40
7.4.50.0030.01316.64
7.4.40.0060.00916.36
7.4.30.0070.01016.64
7.4.00.0070.00914.95
7.3.330.0020.00213.32
7.3.320.0070.00013.39
7.3.310.0070.00016.31
7.3.300.0000.00616.27
7.3.290.0070.00016.18
7.3.280.0090.01016.30
7.3.270.0120.00617.40
7.3.260.0140.00316.39
7.3.250.0060.01116.37
7.3.240.0090.00916.36
7.3.230.0170.00016.39
7.3.210.0130.00316.48
7.3.200.0030.01519.39
7.3.190.0100.00616.29
7.3.180.0150.00316.58
7.3.170.0160.00616.59
7.3.160.0070.01516.48
7.3.120.0070.01015.05
7.3.110.0110.00714.54
7.3.100.0040.01114.68
7.3.90.0030.00614.81
7.3.80.0060.00614.81
7.3.70.0120.00314.72
7.3.60.0030.00914.60
7.3.50.0040.00814.84
7.3.40.0110.00414.85
7.3.30.0120.00614.51
7.3.20.0000.01116.60
7.3.10.0030.00916.68
7.3.00.0070.00716.74
7.2.330.0170.00616.63
7.2.320.0030.01416.30
7.2.310.0080.00816.62
7.2.300.0060.01116.49
7.2.290.0090.00816.42
7.2.250.0100.00715.01
7.2.240.0120.00615.05
7.2.230.0060.00915.20
7.2.220.0120.00315.07
7.2.210.0070.00714.57
7.2.200.0040.00814.90
7.2.190.0000.01514.88
7.2.180.0070.00714.89
7.2.170.0080.00814.93
7.2.160.0030.01515.09
7.2.150.0030.01016.89
7.2.140.0040.01416.98
7.2.130.0030.01016.61
7.2.120.0030.00616.96
7.2.110.0050.00516.81
7.2.100.0120.00016.90
7.2.90.0040.01116.85
7.2.80.0110.00317.04
7.2.70.0040.01116.90
7.2.60.0040.00916.70
7.2.50.0090.00016.82
7.2.40.0040.01116.86
7.2.30.0120.00016.96
7.2.20.0030.01317.06
7.2.10.0070.00716.79
7.2.00.0070.00817.78
7.1.330.0110.00615.67
7.1.320.0070.00715.37
7.1.310.0000.01115.51
7.1.300.0030.00515.78
7.1.290.0040.01115.84
7.1.280.0000.01415.73
7.1.270.0050.00515.56
7.1.260.0080.00415.52
7.1.250.0060.00615.75
7.1.240.0030.00615.81
7.1.230.0070.00715.60
7.1.220.0070.00715.69
7.1.210.0040.00815.64
7.1.200.0020.01015.81
7.1.190.0000.01015.77
7.1.180.0050.00515.71
7.1.170.0040.00715.63
7.1.160.0030.00815.75
7.1.150.0000.01115.81
7.1.140.0090.00315.66
7.1.130.0090.00615.80
7.1.120.0030.00915.55
7.1.110.0000.00915.82
7.1.100.0060.00816.76
7.1.90.0030.01015.75
7.1.80.0070.00715.79
7.1.70.0110.00316.37
7.1.60.0060.01017.64
7.1.50.0070.00716.47
7.1.40.0040.01115.71
7.1.30.0040.00815.51
7.1.20.0080.00415.76
7.1.10.0000.01115.64
7.1.00.0020.04419.00
7.0.330.0120.00315.06
7.0.320.0030.00615.49
7.0.310.0110.00015.30
7.0.300.0030.01015.23
7.0.290.0040.01215.26
7.0.280.0030.01015.48
7.0.270.0030.00915.02
7.0.260.0120.00015.32
7.0.250.0110.00015.48
7.0.240.0060.00915.28
7.0.230.0060.00615.49
7.0.220.0130.00015.33
7.0.210.0000.00815.34
7.0.200.0160.00615.00
7.0.190.0040.00415.42
7.0.180.0000.00915.41
7.0.170.0060.00614.98
7.0.160.0080.00415.41
7.0.150.0030.00615.09
7.0.140.0030.01015.42
7.0.130.0030.00615.23
7.0.120.0060.00615.33
7.0.110.0080.00315.31
7.0.100.0120.03817.58
7.0.90.0130.03817.59
7.0.80.0130.03317.50
7.0.70.0270.03017.56
7.0.60.0330.04317.63
7.0.50.0270.03917.95
7.0.40.0150.03716.74
7.0.30.0080.02516.83
7.0.20.0120.04216.60
7.0.10.0080.04116.71
7.0.00.0070.04516.71
5.6.400.0040.00413.95
5.6.390.0030.00614.09
5.6.380.0000.00914.14
5.6.370.0070.00714.32
5.6.360.0030.01314.38
5.6.350.0080.00414.05
5.6.340.0030.00913.99
5.6.330.0100.00313.95
5.6.320.0050.00414.14
5.6.310.0030.00713.89
5.6.300.0070.00414.31
5.6.290.0130.00014.01
5.6.280.0070.03517.58
5.6.270.0060.00614.16
5.6.260.0090.00014.17
5.6.250.0070.03017.37
5.6.240.0120.03817.41
5.6.230.0030.04817.35
5.6.220.0070.04417.32
5.6.210.0030.03017.41
5.6.200.0050.02917.48
5.6.190.0020.05117.68
5.6.180.0030.04717.65
5.6.170.0070.04717.60
5.6.160.0060.03917.55
5.6.150.0070.04517.60
5.6.140.0070.02917.61
5.6.130.0030.04417.53
5.6.120.0030.05117.64
5.6.110.0100.04117.64
5.6.100.0050.04017.46
5.6.90.0070.04017.52
5.6.80.0090.03917.26
5.6.70.0070.04417.22
5.6.60.0080.04117.32
5.6.50.0040.04717.18
5.6.40.0060.04617.04
5.6.30.0120.03517.15
5.6.20.0020.04417.17
5.6.10.0100.03817.16
5.6.00.0030.03317.23
5.5.380.0050.04517.14
5.5.370.0100.03817.22
5.5.360.0110.04217.09
5.5.350.0100.04517.35
5.5.340.0070.04517.45
5.5.330.0100.03817.40
5.5.320.0080.03517.46
5.5.310.0090.03717.49
5.5.300.0080.04317.59
5.5.290.0070.03317.18
5.5.280.0050.04517.46
5.5.270.0100.04517.37
5.5.260.0080.04317.29
5.5.250.0100.04717.39
5.5.240.0110.03617.24
5.5.230.0030.03917.21
5.5.220.0030.03517.15
5.5.210.0110.03817.12
5.5.200.0090.04416.93
5.5.190.0030.04117.02
5.5.180.0040.04617.16
5.5.170.0000.01213.99
5.5.160.0020.04317.15
5.5.150.0040.04617.09
5.5.140.0020.05017.08
5.5.130.0070.04517.13
5.5.120.0060.04117.13
5.5.110.0020.04617.14
5.5.100.0030.03017.04
5.5.90.0080.04216.94
5.5.80.0070.04016.83
5.5.70.0080.03816.84
5.5.60.0080.03817.08
5.5.50.0080.04217.00
5.5.40.0040.03916.88
5.5.30.0080.04316.74
5.5.20.0140.03417.15
5.5.10.0070.02917.00
5.5.00.0050.04516.96

preferences:
62.66 ms | 401 KiB | 5 Q