3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { function __toString() { return "bar";}} class obj implements ArrayAccess { private $container = array(); public function __construct() { $this->container = array( "one" => 1, "two" => 2, "three" => 3, ); } public function offsetSet($offset, $value) { var_dump($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) { var_dump($offset); return isset($this->container[$offset]) ? $this->container[$offset] : null; } } $a = new obj; $a[] += 12;

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.0070.01118.55
8.3.50.0150.01021.95
8.3.40.0150.00618.98
8.3.30.0170.00019.22
8.3.20.0050.00320.16
8.3.10.0060.00323.69
8.3.00.0080.00019.38
8.2.180.0090.00618.41
8.2.170.0040.01122.96
8.2.160.0070.00720.27
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0070.00022.23
8.2.110.0070.01422.24
8.2.100.0040.00817.75
8.2.90.0040.00419.22
8.2.80.0030.00517.97
8.2.70.0000.00817.75
8.2.60.0050.00318.05
8.2.50.0000.00818.07
8.2.40.0060.00318.34
8.2.30.0080.00018.06
8.2.20.0040.00417.64
8.2.10.0000.00718.04
8.2.00.0030.00517.86
8.1.280.0170.00325.92
8.1.270.0050.00322.19
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00923.92
8.1.230.0040.00719.15
8.1.220.0040.00417.76
8.1.210.0040.00418.77
8.1.200.0030.00717.35
8.1.190.0050.00317.35
8.1.180.0040.00418.10
8.1.170.0030.00520.37
8.1.160.0040.00422.08
8.1.150.0050.00218.81
8.1.140.0040.00417.53
8.1.130.0050.00219.56
8.1.120.0070.00017.53
8.1.110.0000.00817.49
8.1.100.0050.00217.36
8.1.90.0000.00817.40
8.1.80.0040.00417.47
8.1.70.0070.00017.45
8.1.60.0050.00817.48
8.1.50.0000.00917.44
8.1.40.0000.00817.40
8.1.30.0080.00017.54
8.1.20.0050.00317.69
8.1.10.0040.00417.59
8.1.00.0040.00417.46
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0000.00718.46
8.0.270.0030.00317.19
8.0.260.0070.00018.43
8.0.250.0040.00416.86
8.0.240.0030.00316.86
8.0.230.0000.00716.91
8.0.220.0000.00716.95
8.0.210.0060.00016.93
8.0.200.0070.00016.88
8.0.190.0050.00216.92
8.0.180.0040.00416.89
8.0.170.0000.00816.97
8.0.160.0000.00816.94
8.0.150.0040.00416.76
8.0.140.0000.00716.88
8.0.130.0060.00013.33
8.0.120.0050.00316.92
8.0.110.0070.00016.79
8.0.100.0000.00716.75
8.0.90.0000.00716.81
8.0.80.0100.01316.88
8.0.70.0040.00416.80
8.0.60.0040.00416.77
8.0.50.0040.00416.73
8.0.30.0140.00617.03
8.0.20.0100.01217.40
8.0.10.0040.00416.87
8.0.00.0080.00916.79
7.4.330.0050.00015.02
7.4.320.0030.00316.50
7.4.300.0000.00716.52
7.4.290.0070.00016.51
7.4.280.0040.00416.45
7.4.270.0000.00716.52
7.4.260.0000.00816.64
7.4.250.0070.00016.47
7.4.240.0010.00616.51
7.4.230.0000.00716.52
7.4.220.0120.00616.68
7.4.210.0070.00716.56
7.4.200.0030.00316.41
7.4.160.0120.00416.40
7.4.150.0210.00317.40
7.4.140.0090.00917.86
7.4.130.0130.00716.57
7.4.120.0100.00716.44
7.4.110.0090.00916.53
7.4.100.0150.00416.41
7.4.90.0100.00716.46
7.4.80.0090.00919.39
7.4.70.0120.00916.59
7.4.60.0060.01016.43
7.4.50.0030.00516.17
7.4.40.0120.00616.66
7.4.30.0150.00616.55
7.4.00.0020.01215.02
7.3.330.0000.00613.30
7.3.320.0030.00313.31
7.3.310.0000.00716.30
7.3.300.0060.00016.25
7.3.290.0080.00816.26
7.3.280.0080.00716.27
7.3.270.0120.00917.40
7.3.260.0100.00716.38
7.3.250.0070.01016.34
7.3.240.0040.01416.61
7.3.230.0100.00716.39
7.3.210.0060.01216.53
7.3.200.0090.00919.39
7.3.190.0090.01316.28
7.3.180.0120.00416.57
7.3.170.0030.01716.63
7.3.160.0140.00716.38
7.3.120.0100.00615.04
7.3.110.0030.01314.91
7.3.100.0040.01115.05
7.3.90.0090.00614.90
7.3.80.0070.01114.63
7.3.70.0000.01414.98
7.3.60.0080.00814.93
7.3.50.0030.01414.64
7.3.40.0000.00914.70
7.3.30.0070.00714.75
7.3.20.0090.00616.74
7.3.10.0060.00916.69
7.3.00.0070.00316.82
7.2.330.0130.00316.84
7.2.320.0110.00516.66
7.2.310.0130.00316.66
7.2.300.0000.01616.61
7.2.290.0090.01616.79
7.2.250.0080.01115.00
7.2.240.0030.01514.99
7.2.230.0100.00315.25
7.2.220.0030.01315.34
7.2.210.0040.01115.10
7.2.200.0070.01115.25
7.2.190.0030.01214.86
7.2.180.0080.00415.15
7.2.170.0120.00314.81
7.2.60.0130.00317.00
7.2.00.0000.01219.61
7.1.330.0030.01215.89
7.1.320.0040.00815.61
7.1.310.0140.00015.91
7.1.300.0070.00715.59
7.1.290.0000.01415.60
7.1.280.0000.01315.46
7.1.270.0070.00715.78
7.1.260.0040.01116.00
7.1.200.0000.01515.83
7.1.100.0000.01418.40
7.1.70.0030.01017.25
7.1.60.0190.00619.32
7.1.50.0200.01434.79
7.1.00.0100.07022.30
7.0.200.0030.00516.73
7.0.140.0030.07322.08
7.0.110.0070.04719.96
7.0.100.0200.08319.96
7.0.90.0370.07719.99
7.0.80.0070.07719.96
7.0.70.0100.04319.92
7.0.60.0070.05019.85
7.0.50.0030.06720.00
7.0.40.0000.04019.68
7.0.30.0130.07719.74
7.0.20.0000.05319.72
7.0.10.0130.05319.65
7.0.00.0030.04319.84
5.6.280.0100.06721.13
5.6.260.0100.04020.67
5.6.250.0200.06720.65
5.6.240.0070.09020.68
5.6.230.0030.08320.56
5.6.220.0000.07020.68
5.6.210.0030.04320.69
5.6.200.0100.07320.70
5.6.190.0100.03020.55
5.6.180.0100.05320.57
5.6.170.0030.07720.86
5.6.160.0100.03020.71
5.6.150.0100.03720.57
5.6.140.0070.04020.62
5.6.130.0030.07720.63
5.6.120.0000.04320.58
5.6.110.0100.02720.65
5.6.100.0070.09320.64
5.6.90.0030.05020.68
5.6.80.0000.04719.97
5.6.70.0070.07720.00
5.6.60.0100.03320.02
5.6.50.0070.07720.04
5.6.40.0070.05319.98
5.6.30.0070.05020.02
5.6.20.0070.06719.91
5.6.10.0130.06720.05
5.6.00.0030.07320.05
5.5.380.0070.04017.55
5.5.370.0030.07717.72
5.5.360.0100.04017.68
5.5.350.0030.07017.48
5.5.340.0070.05018.13
5.5.330.0030.03318.07
5.5.320.0100.07018.27
5.5.310.0030.07318.07
5.5.300.0100.06018.22
5.5.290.0030.04717.91
5.5.280.0030.04317.93
5.5.270.0070.03317.82
5.5.260.0000.05318.04
5.5.250.0000.03717.90
5.5.240.0100.03717.48
5.5.230.0100.08017.43
5.5.220.0030.05017.30
5.5.210.0070.07017.29
5.5.200.0070.07317.44
5.5.190.0030.03317.45
5.5.180.0100.06317.43
5.5.160.0030.07017.47
5.5.150.0070.04317.48
5.5.140.0030.07717.44
5.5.130.0130.06017.48
5.5.120.0100.06717.28
5.5.110.0070.07317.27
5.5.100.0030.03317.17
5.5.90.0200.02317.34
5.5.80.0070.03017.38
5.5.70.0000.07017.18
5.5.60.0000.04317.33
5.5.50.0070.07717.16
5.5.40.0030.07717.34
5.5.30.0130.06717.14
5.5.20.0070.04717.34
5.5.10.0030.04717.46
5.5.00.0130.06317.37
5.4.450.0070.04019.35
5.4.440.0030.03319.32
5.4.430.0070.03719.27
5.4.420.0030.05319.35
5.4.410.0030.03319.35
5.4.400.0030.04019.25
5.4.390.0100.06719.00
5.4.380.0030.07018.98
5.4.370.0070.07019.00
5.4.360.0030.04019.32
5.4.350.0070.07319.32
5.4.340.0100.07019.25
5.4.320.0100.06318.97
5.4.310.0030.07319.21
5.4.300.0070.06019.26
5.4.290.0030.03319.00
5.4.280.0030.08319.00
5.4.270.0070.07319.16
5.4.260.0100.07718.99
5.4.250.0100.03318.99
5.4.240.0070.07718.97
5.4.230.0000.05018.98
5.4.220.0100.03018.93
5.4.210.0130.06719.20
5.4.200.0030.03318.98
5.4.190.0070.06319.20
5.4.180.0100.03018.99
5.4.170.0030.03719.00
5.4.160.0070.08719.01
5.4.150.0000.03718.97
5.4.140.0100.03716.51
5.4.130.0030.06016.37
5.4.120.0070.06316.45
5.4.110.0130.06316.46
5.4.100.0000.07016.40
5.4.90.0130.06316.55
5.4.80.0070.04016.41
5.4.70.0100.03316.48
5.4.60.0030.03316.44
5.4.50.0000.03716.22
5.4.40.0030.03716.42
5.4.30.0070.03316.22
5.4.20.0100.02716.39
5.4.10.0070.04016.52
5.4.00.0030.03315.80
5.3.290.0100.08314.68
5.3.280.0100.06314.61
5.3.270.0030.05314.76
5.3.260.0130.07014.59
5.3.250.0100.04014.48
5.3.240.0000.07014.65
5.3.230.0030.04014.75
5.3.220.0030.04014.57
5.3.210.0100.07714.59
5.3.200.0100.04014.65
5.3.190.0030.07014.66
5.3.180.0030.03014.80
5.3.170.0100.05314.56
5.3.160.0070.04014.58
5.3.150.0030.03714.56
5.3.140.0070.03714.66
5.3.130.0000.07014.57
5.3.120.0030.04714.79
5.3.110.0000.04014.59
5.3.100.0030.03714.18
5.3.90.0030.03714.18
5.3.80.0030.03714.00
5.3.70.0070.05713.88
5.3.60.0100.03314.02
5.3.50.0000.03314.05
5.3.40.0100.03713.95
5.3.30.0000.03014.04
5.3.20.0000.03013.71
5.3.10.0070.03713.63
5.3.00.0030.05013.72
5.2.170.0000.03012.33
5.2.160.0000.03712.33
5.2.150.0000.03312.33
5.2.140.0000.02712.33
5.2.130.0070.03012.33
5.2.120.0100.04312.33
5.2.110.0100.05012.33
5.2.100.0070.06012.33
5.2.90.0000.04012.33
5.2.80.0000.05012.33
5.2.70.0070.02712.33
5.2.60.0030.03012.33
5.2.50.0070.03712.33
5.2.40.0030.02312.33
5.2.30.0030.03012.33
5.2.20.0000.02712.33
5.2.10.0000.02712.33
5.2.00.0000.03312.33
5.1.60.0130.01712.33
5.1.50.0030.02012.33
5.1.40.0000.02312.33
5.1.30.0130.01312.33
5.1.20.0070.02012.33
5.1.10.0070.04712.33
5.1.00.0070.05712.33
5.0.50.0030.02012.33
5.0.40.0000.03712.33
5.0.30.0030.03012.33
5.0.20.0100.02312.33
5.0.10.0000.02012.33
5.0.00.0100.04712.33
4.4.90.0000.02012.33
4.4.80.0000.02012.33
4.4.70.0000.01312.33
4.4.60.0000.01312.33
4.4.50.0000.01712.33
4.4.40.0000.03312.33
4.4.30.0070.01012.33
4.4.20.0000.02312.33
4.4.10.0000.04012.33
4.4.00.0030.05712.33
4.3.110.0000.03712.33
4.3.100.0030.01312.33
4.3.90.0030.03012.33
4.3.80.0000.04312.33
4.3.70.0070.03012.33
4.3.60.0000.03012.33
4.3.50.0030.01312.33
4.3.40.0070.04712.33
4.3.30.0000.02012.33
4.3.20.0000.01712.33
4.3.10.0030.01312.33
4.3.00.0000.03012.33

preferences:
68.97 ms | 401 KiB | 5 Q