3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ArrayExtended implements ArrayAccess{ protected $ary = array(); public function __construct(array $a = null) { if($a) $this->ary = $a; } // Useful methods public function reverse() { $this->ary = array_reverse($this->ary); return $this; } // Mandatory methods for ArrayAccess implementation public function offsetExists($off){return array_key_exists($off,$this->ary);} public function offsetGet($off){return $this->ary[$off];} public function offsetSet($off,$val){$this->ary[$off]=$val;} public function offsetUnset($off){unset($this->ary[$off]);} } $o = new ArrayExtended(array('a','b')); $o[] = 'c'; print_r($o);

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.0000.01418.55
8.3.50.0130.00521.33
8.3.40.0090.01218.79
8.3.30.0070.00720.21
8.3.20.0110.00820.09
8.3.10.0000.00821.13
8.3.00.0150.00022.44
8.2.180.0090.01216.38
8.2.170.0110.01122.96
8.2.160.0090.00922.08
8.2.150.0090.00024.18
8.2.140.0040.00424.66
8.2.130.0030.00626.16
8.2.120.0040.00420.93
8.2.110.0060.00319.21
8.2.100.0060.00617.91
8.2.90.0000.00719.21
8.2.80.0000.00817.97
8.2.70.0000.00817.50
8.2.60.0000.00918.04
8.2.50.0050.00318.07
8.2.40.0040.00418.18
8.2.30.0000.00819.53
8.2.20.0040.00417.65
8.2.10.0060.00317.65
8.2.00.0050.00317.64
8.1.280.0140.00325.92
8.1.270.0070.00023.99
8.1.260.0050.00226.35
8.1.250.0000.00828.09
8.1.240.0000.00823.95
8.1.230.0060.00620.85
8.1.220.0000.00818.77
8.1.210.0050.00320.78
8.1.200.0040.00417.23
8.1.190.0090.00017.63
8.1.180.0080.00018.10
8.1.170.0080.00018.46
8.1.160.0000.00818.97
8.1.150.0000.00818.63
8.1.140.0070.00017.40
8.1.130.0040.00417.85
8.1.120.0070.00017.46
8.1.110.0000.00717.37
8.1.100.0040.00417.36
8.1.90.0040.00417.45
8.1.80.0030.00317.44
8.1.70.0000.00717.48
8.1.60.0030.00617.62
8.1.50.0050.00217.60
8.1.40.0040.00417.41
8.1.30.0040.00417.66
8.1.20.0040.00417.66
8.1.10.0030.00517.50
8.1.00.0000.00817.38
8.0.300.0040.00419.89
8.0.290.0080.00017.05
8.0.280.0040.00418.34
8.0.270.0000.00717.15
8.0.260.0000.00716.89
8.0.250.0070.00016.98
8.0.240.0060.00316.95
8.0.230.0000.00617.01
8.0.220.0000.00716.79
8.0.210.0000.00816.80
8.0.200.0040.00417.04
8.0.190.0050.00216.88
8.0.180.0000.00816.86
8.0.170.0040.00416.97
8.0.160.0040.00316.84
8.0.150.0040.00416.82
8.0.140.0040.00416.77
8.0.130.0000.00613.41
8.0.120.0040.00416.89
8.0.110.0000.00816.96
8.0.100.0040.00416.84
8.0.90.0050.00316.98
8.0.80.0030.01216.85
8.0.70.0030.00416.97
8.0.60.0000.00716.78
8.0.50.0040.00416.76
8.0.30.0140.00517.00
8.0.20.0160.00617.40
8.0.10.0040.00416.86
8.0.00.0080.00916.68
7.4.330.0000.00616.67
7.4.320.0030.00316.47
7.4.300.0070.00016.53
7.4.290.0000.00716.53
7.4.280.0050.00316.63
7.4.270.0030.00416.48
7.4.260.0000.00513.29
7.4.250.0000.00716.57
7.4.240.0030.00716.55
7.4.230.0030.00516.72
7.4.220.0060.00916.56
7.4.210.0090.00716.67
7.4.200.0030.00316.41
7.4.190.0070.00016.52
7.4.160.0040.01216.54
7.4.150.0090.00917.40
7.4.140.0060.01317.86
7.4.130.0030.01816.51
7.4.120.0100.00816.49
7.4.110.0110.00816.64
7.4.100.0110.00816.51
7.4.90.0110.01116.61
7.4.80.0070.01419.39
7.4.70.0080.00916.46
7.4.60.0070.01116.63
7.4.50.0000.00816.48
7.4.40.0030.01022.77
7.4.30.0100.00616.54
7.4.00.0090.00714.88
7.3.330.0000.00513.16
7.3.320.0000.00513.30
7.3.310.0030.00316.47
7.3.300.0040.00416.39
7.3.290.0130.00716.37
7.3.280.0140.00616.37
7.3.270.0130.00617.40
7.3.260.0150.00818.24
7.3.250.0090.00916.49
7.3.240.0080.00816.62
7.3.230.0110.00616.44
7.3.210.0130.00316.35
7.3.200.0080.01419.39
7.3.190.0060.01116.39
7.3.180.0130.00716.35
7.3.170.0090.00616.37
7.3.160.0060.01116.50
7.3.120.0030.01514.95
7.3.110.0120.00615.09
7.3.100.0070.00714.81
7.3.90.0040.00414.74
7.3.80.0040.01114.76
7.3.70.0060.00314.79
7.3.60.0050.01314.99
7.3.50.0090.00614.55
7.3.40.0060.00314.85
7.3.30.0030.00714.87
7.3.20.0040.01216.59
7.3.10.0110.00316.69
7.3.00.0100.00716.76
7.2.330.0080.01216.68
7.2.320.0120.00616.60
7.2.310.0140.00716.74
7.2.300.0110.01116.36
7.2.290.0100.00616.88
7.2.250.0030.01615.26
7.2.240.0030.01315.16
7.2.230.0080.00615.03
7.2.220.0000.01315.09
7.2.210.0000.01514.90
7.2.200.0070.01014.78
7.2.190.0030.01615.07
7.2.180.0040.01115.02
7.2.170.0170.00015.19
7.2.130.0070.00717.02
7.2.120.0050.00517.07
7.2.110.0040.01016.48
7.2.100.0160.00816.79
7.2.90.0040.01117.00
7.2.80.0080.01116.99
7.2.70.0140.00716.92
7.2.60.0110.00816.94
7.2.50.0050.00517.02
7.2.40.0100.00716.80
7.2.30.0140.00016.59
7.2.20.0110.00316.90
7.2.10.0000.01616.95
7.2.00.0060.00616.91
7.1.330.0000.01415.97
7.1.320.0000.01015.57
7.1.310.0040.00815.76
7.1.300.0060.00915.68
7.1.290.0090.00015.82
7.1.280.0030.01015.86
7.1.270.0100.00615.79
7.1.260.0030.01415.91
7.1.250.0030.00815.82
7.1.240.0100.00515.51
7.1.230.0070.00315.53
7.1.220.0050.01015.90
7.1.210.0120.00715.71
7.1.200.0200.00815.80
7.1.190.0130.01015.38
7.1.180.0030.01015.73
7.1.170.0040.01115.81
7.1.160.0040.01115.87
7.1.150.0070.00715.83
7.1.140.0030.00615.78
7.1.130.0070.00715.80
7.1.120.0060.00615.89
7.1.110.0030.01015.83
7.1.100.0070.01015.74
7.1.90.0000.01415.61
7.1.80.0050.01015.96
7.1.70.0070.00316.23
7.1.60.0100.01017.39
7.1.50.0080.01016.28
7.1.40.0070.00315.76
7.1.30.0060.00915.75
7.1.20.0030.00715.43
7.1.10.0060.00315.65
7.1.00.0020.02619.10
7.0.330.0090.00315.45
7.0.320.0100.00615.28
7.0.310.0080.01115.37
7.0.300.0030.01015.28
7.0.290.0040.00815.16
7.0.280.0000.01315.03
7.0.270.0090.00315.21
7.0.260.0000.00915.25
7.0.250.0070.00715.61
7.0.240.0060.00615.29
7.0.230.0070.01015.40
7.0.220.0060.00315.39
7.0.210.0070.00715.20
7.0.200.0020.00916.06
7.0.190.0030.00515.45
7.0.180.0030.00615.39
7.0.170.0040.00715.43
7.0.160.0090.00615.17
7.0.150.0060.01015.32
7.0.140.0050.04018.58
7.0.130.0070.00415.08
7.0.120.0050.00615.58
7.0.110.0030.01315.27
7.0.100.0300.02517.52
7.0.90.0230.04717.55
7.0.80.0300.04817.69
7.0.70.0300.04017.62
7.0.60.0320.04117.71
7.0.50.0300.03817.86
7.0.40.0050.02616.77
7.0.30.0050.04816.62
7.0.20.0100.03516.73
7.0.10.0080.03516.74
7.0.00.0150.03516.78
5.6.380.0180.00014.33
5.6.370.0090.00414.27
5.6.360.0070.00614.35
5.6.350.0090.00614.57
5.6.340.0000.01114.33
5.6.330.0030.01314.18
5.6.320.0040.01214.44
5.6.310.0030.01314.57
5.6.300.0000.01414.25
5.6.290.0060.00314.55
5.6.280.0030.04017.69
5.6.270.0090.00614.61
5.6.260.0030.01014.51
5.6.250.0090.03817.52
5.6.240.0090.03817.46
5.6.230.0050.04317.52
5.6.220.0060.04317.54
5.6.210.0050.02517.38
5.6.200.0080.04917.70
5.6.190.0160.03617.60
5.6.180.0060.04117.68
5.6.170.0050.04317.72
5.6.160.0020.03217.68
5.6.150.0100.04317.93
5.6.140.0050.04617.75
5.6.130.0120.02617.81
5.6.120.0030.04417.70
5.6.110.0070.04717.55
5.6.100.0080.04317.66
5.6.90.0080.04717.60
5.6.80.0140.03817.32
5.6.70.0060.04717.20
5.6.60.0140.03517.21
5.6.50.0020.04617.29
5.6.40.0090.02717.37
5.6.30.0090.02817.25
5.6.20.0030.04517.20
5.6.10.0090.04117.30
5.6.00.0080.02717.24
5.5.380.0060.02215.74
5.5.370.0080.03815.83
5.5.360.0100.02215.71
5.5.350.0050.04515.96
5.5.340.0030.03116.11
5.5.330.0020.04015.98
5.5.320.0080.03616.19
5.5.310.0050.02516.02
5.5.300.0050.04215.97
5.5.290.0070.04716.15
5.5.280.0020.03516.03
5.5.270.0080.03815.93
5.5.260.0070.04216.06
5.5.250.0090.04115.71
5.5.240.0030.04415.64
5.5.230.0030.04715.72
5.5.220.0040.04415.63
5.5.210.0150.03015.67
5.5.200.0070.03915.68
5.5.190.0070.03315.44
5.5.180.0060.03415.34
5.5.170.0080.00311.31
5.5.160.0070.03815.71
5.5.150.0100.03315.71
5.5.140.0100.03015.65
5.5.130.0120.03515.73
5.5.120.0050.03315.66
5.5.110.0050.04515.69
5.5.100.0110.02515.43
5.5.90.0000.04615.71
5.5.80.0120.03815.76
5.5.70.0020.02915.52
5.5.60.0100.03715.75
5.5.50.0080.04315.58
5.5.40.0000.04315.60
5.5.30.0070.02915.68
5.5.20.0050.02815.63
5.5.10.0070.03715.68
5.5.00.0060.03615.54
5.4.450.0060.02715.12
5.4.440.0060.03315.03
5.4.430.0040.03815.04
5.4.420.0100.04015.23
5.4.410.0030.04315.21
5.4.400.0120.03514.97
5.4.390.0060.04015.07
5.4.380.0080.04014.93
5.4.370.0070.04114.96
5.4.360.0080.03715.12
5.4.350.0070.04215.04
5.4.340.0120.01815.07
5.4.330.0060.00310.88
5.4.320.0020.04515.13
5.4.310.0050.04215.00
5.4.300.0090.03915.14
5.4.290.0060.04215.05
5.4.280.0050.04315.29
5.4.270.0070.03515.09
5.4.260.0050.04315.04
5.4.250.0100.03515.10
5.4.240.0050.03714.98
5.4.230.0050.03815.13
5.4.220.0070.03315.11
5.4.210.0110.03915.04
5.4.200.0070.03815.06
5.4.190.0110.04015.16
5.4.180.0050.03915.09
5.4.170.0070.03515.04
5.4.160.0060.04315.17
5.4.150.0090.03314.99
5.4.140.0030.02213.81
5.4.130.0080.01813.74
5.4.120.0110.03513.87
5.4.110.0130.03113.76
5.4.100.0110.03913.72
5.4.90.0090.03213.69
5.4.80.0100.02813.73
5.4.70.0060.03313.65
5.4.60.0050.03713.63
5.4.50.0000.03813.72
5.4.40.0020.04013.74
5.4.30.0060.04113.61
5.4.20.0080.03813.71
5.4.10.0060.04113.47
5.4.00.0100.03713.47
5.3.290.0050.03712.78
5.3.280.0030.04212.66
5.3.270.0070.03912.64
5.3.260.0050.02012.60
5.3.250.0100.03312.65
5.3.240.0070.03412.56
5.3.230.0080.01712.47
5.3.220.0070.03512.55
5.3.210.0110.03512.59
5.3.200.0020.04012.58
5.3.190.0010.04112.61
5.3.180.0090.03512.62
5.3.170.0000.04112.61
5.3.160.0030.04312.52
5.3.150.0080.03712.59
5.3.140.0030.03712.63
5.3.130.0110.03312.69
5.3.120.0120.03312.69
5.3.110.0100.02512.60
5.3.100.0130.03812.40
5.3.90.0150.02412.18
5.3.80.0170.03712.25
5.3.70.0110.03812.23
5.3.60.0110.03612.34
5.3.50.0070.03712.28
5.3.40.0030.04012.29
5.3.30.0120.03212.19
5.3.20.0090.04011.97
5.3.10.0060.03711.92
5.3.00.0110.03811.83
5.2.170.0030.03410.43
5.2.160.0050.02210.41
5.2.150.0080.01510.43
5.2.140.0140.03010.31
5.2.130.0130.02910.28
5.2.120.0040.03110.37
5.2.110.0040.02010.31
5.2.100.0120.02810.31
5.2.90.0050.03210.25
5.2.80.0130.03010.29
5.2.70.0040.03210.24
5.2.60.0080.01810.30
5.2.50.0120.03210.27
5.2.40.0110.02810.19
5.2.30.0050.03410.21
5.2.20.0070.03210.20
5.2.10.0050.02510.18
5.2.00.0100.02810.13
5.1.60.0020.0309.76
5.1.50.0050.0239.63
5.1.40.0080.0289.73
5.1.30.0050.0299.91
5.1.20.0060.0289.94
5.1.10.0040.0269.67
5.1.00.0030.0169.80
5.0.50.0070.0209.09
5.0.40.0040.0259.09
5.0.30.0030.0389.09
5.0.20.0050.0139.09
5.0.10.0020.0259.09
5.0.00.0010.0219.09
4.4.90.0000.0129.09
4.4.80.0070.0179.09
4.4.70.0060.0159.09
4.4.60.0050.0169.09
4.4.50.0020.0219.09
4.4.40.0030.0279.09
4.4.30.0000.0209.09
4.4.20.0040.0159.09
4.4.10.0050.0189.09
4.4.00.0050.0159.09
4.3.110.0050.0109.09
4.3.100.0030.0109.09
4.3.90.0060.0159.09
4.3.80.0050.0249.09
4.3.70.0050.0189.09
4.3.60.0020.0139.09
4.3.50.0000.0129.09
4.3.40.0050.0159.09
4.3.30.0040.0079.09
4.3.20.0020.0209.09
4.3.10.0020.0199.09
4.3.00.0030.0209.09

preferences:
46.76 ms | 401 KiB | 5 Q