3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo implements ArrayAccess { private $container = array(); public function offsetSet($offset, $value) { if (is_null($offset)) { $this->container[] = $value; } else { $this->container[$offset] = $value; } } public function offsetExists($offset) { return isset($this->container[$offset]); } public function offsetUnset($offset) { unset($this->container[$offset]); } public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; } } $object = new Foo(); $object->Id = 1; $object->Title = 'Test'; print_r($object); $records = array( $object, array( 'Id' => 2, 'Title' => 'John' ) ); print_r(array_column($records, 'Title'));

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.0060.00918.56
8.3.50.0200.00722.12
8.3.40.0110.01118.71
8.3.30.0080.00819.15
8.3.20.0040.00420.34
8.3.10.0040.00422.09
8.3.00.0000.00822.38
8.2.180.0110.00416.38
8.2.170.0110.00722.96
8.2.160.0070.00721.11
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0000.00826.16
8.2.120.0050.00319.36
8.2.110.0070.00322.20
8.2.100.0070.00719.70
8.2.90.0040.00419.39
8.2.80.0030.00519.76
8.2.70.0000.00917.63
8.2.60.0030.00618.05
8.2.50.0040.00418.07
8.2.40.0060.00318.16
8.2.30.0100.00018.18
8.2.20.0000.00717.66
8.2.10.0040.00417.70
8.2.00.0000.00717.65
8.1.280.0130.00625.92
8.1.270.0080.00021.89
8.1.260.0050.00326.35
8.1.250.0030.00528.09
8.1.240.0070.00323.96
8.1.230.0100.00018.94
8.1.220.0040.00417.79
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0080.00017.53
8.1.180.0030.00518.10
8.1.170.0040.00418.70
8.1.160.0080.00022.08
8.1.150.0030.00518.66
8.1.140.0000.00717.46
8.1.130.0050.00317.73
8.1.120.0000.00817.54
8.1.110.0040.00417.37
8.1.100.0040.00417.37
8.1.90.0000.00817.46
8.1.80.0070.00017.43
8.1.70.0070.00017.38
8.1.60.0040.00417.69
8.1.50.0050.00217.52
8.1.40.0000.00817.57
8.1.30.0080.00017.71
8.1.20.0030.00517.54
8.1.10.0000.00817.50
8.1.00.0000.00817.57
8.0.300.0000.00718.77
8.0.290.0000.00717.05
8.0.280.0030.00318.45
8.0.270.0000.00717.23
8.0.260.0060.00016.75
8.0.250.0030.00316.89
8.0.240.0000.00716.95
8.0.230.0030.00517.01
8.0.220.0050.00316.97
8.0.210.0000.00716.81
8.0.200.0080.00016.98
8.0.190.0080.00016.95
8.0.180.0000.00716.81
8.0.170.0050.00216.94
8.0.160.0070.00016.95
8.0.150.0070.00016.77
8.0.140.0040.00416.87
8.0.130.0000.00513.36
8.0.120.0040.00416.89
8.0.110.0030.00516.93
8.0.100.0040.00416.69
8.0.90.0080.00016.69
8.0.80.0120.00616.94
8.0.70.0050.00316.73
8.0.60.0000.00716.97
8.0.50.0000.00717.02
8.0.30.0090.00917.05
8.0.20.0060.01517.40
8.0.10.0070.00016.92
8.0.00.0080.01116.83
7.4.330.0050.00015.15
7.4.320.0000.00616.41
7.4.300.0060.00016.43
7.4.290.0000.00716.50
7.4.280.0000.00816.52
7.4.270.0000.00716.60
7.4.260.0000.00916.44
7.4.250.0040.00416.46
7.4.240.0040.00316.51
7.4.230.0070.00016.72
7.4.220.0090.01616.64
7.4.210.0080.00716.61
7.4.200.0030.00316.36
7.4.190.0000.00716.76
7.4.160.0120.00916.61
7.4.150.0100.01017.40
7.4.140.0130.00417.86
7.4.130.0110.01116.59
7.4.120.0090.00816.54
7.4.110.0080.00916.70
7.4.100.0070.01016.53
7.4.90.0000.01816.43
7.4.80.0130.00819.39
7.4.70.0040.01216.59
7.4.60.0060.01216.50
7.4.50.0040.00016.45
7.4.40.0060.00622.77
7.4.30.0090.00916.59
7.4.00.0110.00414.98
7.3.330.0050.00013.31
7.3.320.0030.00313.26
7.3.310.0000.00716.34
7.3.300.0000.00716.26
7.3.290.0140.00016.31
7.3.280.0080.01016.27
7.3.270.0090.01217.40
7.3.260.0140.00816.47
7.3.250.0100.00716.48
7.3.240.0120.00916.44
7.3.230.0100.00716.59
7.3.210.0150.00316.54
7.3.200.0100.01119.39
7.3.190.0190.00416.50
7.3.180.0120.00316.45
7.3.170.0030.01616.52
7.3.160.0080.00816.38
7.3.120.0080.00614.78
7.3.110.0070.01015.05
7.3.100.0060.00914.64
7.3.90.0030.01314.81
7.3.80.0040.01414.91
7.3.70.0040.01514.87
7.3.60.0060.00914.71
7.3.50.0080.00414.65
7.3.40.0060.00614.73
7.3.30.0100.00314.57
7.3.20.0030.00716.71
7.3.10.0040.01116.80
7.3.00.0070.00716.43
7.2.330.0150.00316.80
7.2.320.0050.01916.88
7.2.310.0070.01016.40
7.2.300.0120.00616.78
7.2.290.0040.01316.79
7.2.250.0160.00315.25
7.2.240.0070.01014.77
7.2.230.0030.00715.04
7.2.220.0060.00915.20
7.2.210.0040.01115.21
7.2.200.0090.00615.13
7.2.190.0060.00614.99
7.2.180.0060.00615.06
7.2.170.0030.01215.21
7.2.60.0040.01216.90
7.2.00.0030.01319.40
7.1.330.0070.00715.42
7.1.320.0040.01115.98
7.1.310.0040.01115.91
7.1.300.0040.00715.86
7.1.290.0030.01015.65
7.1.280.0040.01115.70
7.1.270.0080.00815.78
7.1.260.0070.00415.88
7.1.200.0030.01015.48
7.1.100.0040.00417.95
7.1.70.0040.00817.17
7.1.60.0070.01719.82
7.1.50.0030.01717.01
7.1.00.0030.07722.35
7.0.200.0070.00716.60
7.0.140.0000.07022.08
7.0.60.0070.03719.95
7.0.50.0130.07717.89
7.0.40.0000.06020.04
7.0.30.0300.08020.23
7.0.20.0200.05320.05
7.0.10.0400.06320.07
7.0.00.0130.06720.05
5.6.280.0030.07321.05
5.6.210.0030.07720.46
5.6.200.0070.04718.18
5.6.190.0000.06020.42
5.6.180.2800.03720.34
5.6.170.0370.07020.71
5.6.160.0070.09020.48
5.6.150.0100.05718.14
5.6.140.0100.05718.15
5.6.130.0130.05718.24
5.6.120.0130.06721.13
5.6.110.0100.07721.12
5.6.100.0030.08321.12
5.6.90.0230.05320.97
5.6.80.0130.07320.54
5.6.70.0330.04320.40
5.5.350.0030.04320.34
5.5.340.0030.04717.99
5.5.330.0170.08320.31
5.5.320.0300.07720.30
5.5.310.0330.05320.33
5.5.300.0070.04018.04
5.5.290.0100.03717.92
5.5.280.0070.04020.88
5.5.270.0100.08020.84
5.5.260.0070.07020.79
5.5.250.0100.03720.70
5.5.240.0130.02720.16
5.4.450.2100.04019.17
5.4.440.1570.04719.57
5.4.430.0100.07019.48
5.4.420.0030.04719.54
5.4.410.1430.02719.14
5.4.400.2070.04019.09
5.4.390.1900.03719.25
5.4.380.2000.04319.17
5.4.370.2100.04319.15
5.4.360.2000.05719.04
5.4.350.2300.06318.89
5.4.340.1870.03719.13
5.4.320.2200.04019.00
5.4.310.2070.04319.15
5.4.300.2070.05019.07
5.4.290.2270.04019.14
5.4.280.2170.05018.84
5.4.270.1570.03719.08
5.4.260.2170.03319.09
5.4.250.2070.04319.26
5.4.240.2100.03719.08
5.4.230.1900.04018.98
5.4.220.2100.03718.99
5.4.210.2230.04319.12
5.4.200.2000.03718.87
5.4.190.2170.03719.14
5.4.180.2000.03719.13
5.4.170.2370.03019.07
5.4.160.2270.04718.82
5.4.150.2100.04018.98
5.4.140.1930.04016.66
5.4.130.1100.03016.51
5.4.120.0000.04716.32
5.4.110.0000.06016.47
5.4.100.1500.03716.55
5.4.90.1930.03716.46
5.4.80.1900.03716.43
5.4.70.2270.04716.54
5.4.60.2100.04716.49
5.4.50.2100.04016.55
5.4.40.1900.03716.53
5.4.30.1830.04016.51
5.4.20.2030.02316.30
5.4.10.2000.05016.53
5.4.00.0170.02315.95
5.3.290.0000.04014.70
5.3.280.0100.03714.58
5.3.270.0970.04014.84
5.3.260.2000.03714.62
5.3.250.2130.04314.53
5.3.240.2330.04314.70
5.3.230.2300.03714.57
5.3.220.1930.04314.57
5.3.210.2070.03714.63
5.3.200.1930.03314.63
5.3.190.2030.04714.49
5.3.180.2200.04014.62
5.3.170.2030.04314.69
5.3.160.2270.04314.72
5.3.150.2200.04314.59
5.3.140.2100.04714.48
5.3.130.2230.05314.59
5.3.120.1930.03714.45
5.3.110.1930.03714.57
5.3.100.1930.04314.12
5.3.90.1970.03713.95
5.3.80.2000.03714.00
5.3.70.1900.04314.17
5.3.60.2000.04014.09
5.3.50.2170.04014.18
5.3.40.1700.03714.03
5.3.30.0770.03314.04
5.3.20.1370.03313.79
5.3.10.1600.03013.67
5.3.00.1300.03313.55
5.2.170.1470.03011.30
5.2.160.1570.03311.07
5.2.150.1570.02711.23
5.2.140.1970.03311.24
5.2.130.1130.03311.33
5.2.120.1500.02311.33
5.2.110.1800.03011.26
5.2.100.1130.03011.09
5.2.90.1400.02311.23
5.2.80.1630.03011.16
5.2.70.1200.02711.18
5.2.60.1600.02711.13
5.2.50.1430.03010.98
5.2.40.1170.03310.93
5.2.30.1270.02710.91
5.2.20.1570.03310.89
5.2.10.1230.03010.78
5.2.00.1170.02710.70
5.1.60.1130.0279.88
5.1.50.1500.0309.91
5.1.40.0700.0339.92
5.1.30.0000.02710.35
5.1.20.0000.02710.59
5.1.10.0000.02710.24
5.1.00.0600.0209.97
5.0.50.0500.0208.49
5.0.40.0700.0208.32
5.0.30.0630.0378.15
5.0.20.0670.0208.19
5.0.10.0700.0178.23
5.0.00.0430.0338.32
4.4.90.0630.0137.95
4.4.80.0630.0177.95
4.4.70.0700.0207.95
4.4.60.0430.0307.95
4.4.50.0870.0137.95
4.4.40.0870.0307.95
4.4.30.0700.0177.95
4.4.20.0830.0237.95
4.4.10.0700.0137.95
4.4.00.0730.0307.95
4.3.110.0730.0177.95
4.3.100.0570.0177.95
4.3.90.0730.0177.95
4.3.80.0670.0237.95
4.3.70.0670.0277.95
4.3.60.0530.0177.95
4.3.50.0000.0177.95
4.3.40.0000.0507.95
4.3.30.0030.0377.95
4.3.20.0000.0207.95
4.3.10.0000.0177.95
4.3.00.0000.0177.95

preferences:
41.77 ms | 401 KiB | 5 Q