3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $titleInfo = []; /** @return array */ public function bar() { $key = ''; if ( !isset( $this->titleInfo[$key] ) ) { $this->titleInfo[$key] = [ 42 ]; } return $this->titleInfo[$key]; # The critical line } } $value = ( new Foo )->bar(); var_dump( $value );

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.0040.01118.33
8.3.50.0130.00316.77
8.3.40.0120.00318.84
8.3.30.0070.00718.63
8.3.20.0040.00421.80
8.3.10.0040.00422.00
8.3.00.0040.00721.94
8.2.180.0030.01216.63
8.2.170.0060.00922.96
8.2.160.0110.00421.18
8.2.150.0060.00324.18
8.2.140.0000.00824.66
8.2.130.0050.00326.16
8.2.120.0000.00726.16
8.2.110.0000.01121.99
8.2.100.0070.00417.84
8.2.90.0040.00422.15
8.2.80.0040.00419.34
8.2.70.0030.00618.05
8.2.60.0080.00418.16
8.2.50.0000.00818.10
8.2.40.0080.00021.23
8.2.30.0040.00419.24
8.2.20.0050.00218.18
8.2.10.0030.00519.21
8.2.00.0000.00719.26
8.1.280.0140.00425.92
8.1.270.0060.00321.99
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0040.00422.65
8.1.230.0120.00020.77
8.1.220.0080.00017.74
8.1.210.0030.00518.84
8.1.200.0030.00517.35
8.1.190.0070.00417.00
8.1.180.0000.00818.10
8.1.170.0030.00618.70
8.1.160.0000.00820.68
8.1.150.0000.00718.89
8.1.140.0000.00720.94
8.1.130.0070.00017.45
8.1.120.0050.00217.46
8.1.110.0090.00017.50
8.1.100.0040.00417.46
8.1.90.0040.00417.34
8.1.80.0070.00017.43
8.1.70.0040.00417.47
8.1.60.0000.00717.59
8.1.50.0000.00817.41
8.1.40.0080.00017.52
8.1.30.0000.00917.60
8.1.20.0050.00317.52
8.1.10.0000.00817.59
8.1.00.0040.00717.51
8.0.300.0000.00819.98
8.0.290.0040.00416.63
8.0.280.0030.00318.48
8.0.270.0030.00316.82
8.0.260.0000.00616.88
8.0.250.0030.00316.87
8.0.240.0070.00016.84
8.0.230.0070.00016.85
8.0.220.0030.00316.88
8.0.210.0030.00316.91
8.0.200.0030.00316.91
8.0.190.0040.00417.03
8.0.180.0040.00416.95
8.0.170.0070.00416.92
8.0.160.0030.00516.89
8.0.150.0040.00416.72
8.0.140.0070.00016.76
8.0.130.0000.00513.28
8.0.120.0040.00416.86
8.0.110.0000.00816.93
8.0.100.0000.00716.79
8.0.90.0030.00616.96
8.0.80.0100.00316.83
8.0.70.0040.00416.91
8.0.60.0050.00216.94
8.0.50.0070.00016.93
8.0.30.0110.00717.08
8.0.20.0110.00817.22
8.0.10.0070.00017.03
8.0.00.0110.00816.90
7.4.330.0040.00015.55
7.4.320.0000.00616.50
7.4.300.0000.00716.63
7.4.290.0070.00016.48
7.4.280.0050.00316.51
7.4.270.0080.00316.54
7.4.260.0040.00413.27
7.4.250.0030.00316.57
7.4.240.0020.00616.44
7.4.230.0000.00716.50
7.4.220.0030.00316.49
7.4.210.0100.00616.54
7.4.200.0000.00716.50
7.4.140.0210.00317.86
7.4.130.0120.00916.54
7.4.120.0090.01516.48
7.4.110.0030.01416.64
7.4.100.0080.00816.50
7.4.90.0070.01016.50
7.4.80.0100.01019.39
7.4.70.0030.01516.46
7.4.60.0100.00616.45
7.4.50.0110.00416.35
7.4.40.0110.00416.66
7.4.00.0130.00315.01
7.3.330.0070.00016.25
7.3.320.0030.00313.32
7.3.310.0070.00016.42
7.3.300.0030.00316.30
7.3.290.0000.00716.23
7.3.280.0040.01116.32
7.3.260.0080.01116.43
7.3.240.0080.00916.51
7.3.230.0100.01416.43
7.3.210.0140.00316.42
7.3.200.0060.01316.37
7.3.190.0120.00916.52
7.3.180.0090.01216.55
7.3.170.0060.01216.64
7.3.160.0030.01316.42
7.3.70.0000.01414.76
7.3.60.0150.00014.61
7.3.50.0070.00714.88
7.3.40.0130.00314.71
7.3.30.0070.00414.55
7.3.20.0080.00316.64
7.3.10.0060.00616.77
7.3.00.0030.01016.47
7.2.330.0210.00316.75
7.2.320.0140.00416.57
7.2.310.0040.01216.41
7.2.300.0100.00716.48
7.2.290.0140.00516.40
7.2.200.0000.01114.77
7.2.190.0130.00315.04
7.2.180.0120.00014.87
7.2.170.0070.01015.16
7.2.160.0090.00315.01
7.2.150.0030.00917.00
7.2.140.0150.00017.11
7.2.130.0000.01816.85
7.2.120.0060.00916.69
7.2.110.0090.00617.13
7.2.100.0060.00617.15
7.2.90.0040.00816.73
7.2.80.0090.00617.04
7.2.70.0060.00916.80
7.2.60.0040.01116.87
7.2.50.0000.01516.89
7.2.40.0060.00616.96
7.2.30.0070.00717.00
7.2.20.0070.00716.93
7.2.10.0100.00317.02
7.2.00.0090.00917.16
7.1.300.0070.00715.94
7.1.290.0030.01015.88
7.1.280.0070.00715.85
7.1.270.0060.00915.86
7.1.260.0090.00315.64
7.1.250.0080.00815.76

preferences:
59.01 ms | 401 KiB | 5 Q