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 = 12; $b = array(1); $b{2} = 2; var_dump($b);

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.40.0070.00718.55
8.3.30.0100.00719.14
8.3.20.0000.00820.21
8.3.10.0080.00023.48
8.3.00.0040.00419.38
8.2.170.0110.00422.96
8.2.160.0070.00720.38
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0000.00721.97
8.2.110.0040.00422.31
8.2.100.0070.00417.84
8.2.90.0000.00819.05
8.2.80.0000.00817.97
8.2.70.0060.00317.38
8.2.60.0000.00817.68
8.2.50.0030.00618.07
8.2.40.0050.00317.93
8.2.30.0000.00717.82
8.2.20.0040.00417.44
8.2.10.0030.00517.92
8.2.00.0040.00417.55
8.1.270.0040.00423.97
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0080.00322.19
8.1.230.0070.00317.64
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0030.00617.13
8.1.190.0040.00417.11
8.1.180.0080.00018.10
8.1.170.0040.00420.29
8.1.160.0070.00021.96
8.1.150.0000.00718.78
8.1.140.0000.00717.34
8.1.130.0000.00717.83
8.1.120.0000.00817.38
8.1.110.0040.00417.37
8.1.100.0000.00717.25
8.1.90.0080.00017.22
8.1.80.0070.00017.38
8.1.70.0040.00417.26
8.1.60.0030.00917.52
8.1.50.0040.00417.40
8.1.40.0060.00317.41
8.1.30.0030.00617.54
8.1.20.0080.00017.46
8.1.10.0000.00817.41
8.1.00.0060.00317.29
8.0.300.0040.00418.77
8.0.290.0000.00816.63
8.0.280.0000.00818.33
8.0.270.0030.00517.04
8.0.260.0000.00817.17
8.0.250.0000.00716.90
8.0.240.0030.00516.86
8.0.230.0000.00716.89
8.0.220.0000.00716.73
8.0.210.0030.00316.88
8.0.200.0030.00316.89
8.0.190.0000.00716.88
8.0.180.0000.00716.90
8.0.170.0000.00816.77
8.0.160.0030.00616.95
8.0.150.0040.00416.70
8.0.140.0070.00016.67
8.0.130.0060.00013.25
8.0.120.0040.00416.80
8.0.110.0050.00316.75
8.0.100.0040.00416.83
8.0.90.0080.00016.65
8.0.80.0160.00616.89
8.0.70.0040.00416.84
8.0.60.0000.00716.72
8.0.50.0040.00416.82
8.0.30.0100.01116.96
8.0.20.0100.00917.40
8.0.10.0040.00416.82
8.0.00.0080.01016.62
7.4.330.0000.00615.02
7.4.320.0000.00616.51
7.4.300.0030.00316.64
7.4.290.0030.00316.50
7.4.280.0050.00316.46
7.4.270.0000.00716.62
7.4.260.0030.00616.51
7.4.250.0040.00416.38
7.4.240.0060.00116.48
7.4.230.0070.00016.40
7.4.220.0070.01016.58
7.4.210.0040.01416.52
7.4.200.0040.00416.45
7.4.160.0040.01216.57
7.4.150.0070.01317.40
7.4.140.0120.00917.86
7.4.130.0090.00916.64
7.4.120.0060.01316.62
7.4.110.0100.00716.58
7.4.100.0060.01316.55
7.4.90.0030.01416.63
7.4.80.0130.01019.39
7.4.70.0110.00716.29
7.4.60.0100.00616.59
7.4.50.0040.00416.58
7.4.40.0130.00316.32
7.4.30.0140.00416.70
7.4.10.0070.01115.04
7.4.00.0050.01015.06
7.3.330.0030.00313.31
7.3.320.0000.00513.08
7.3.310.0030.00316.28
7.3.300.0000.00716.25
7.3.290.0130.00616.27
7.3.280.0090.00716.23
7.3.270.0090.01217.40
7.3.260.0140.00316.40
7.3.250.0140.00816.53
7.3.240.0120.00616.49
7.3.230.0190.00016.39
7.3.210.0070.01016.49
7.3.200.0130.00719.39
7.3.190.0090.01216.33
7.3.180.0090.00616.24
7.3.170.0160.00316.39
7.3.160.0120.00616.18
7.3.130.0060.01214.79
7.3.120.0090.00914.97
7.3.110.0130.00614.87
7.3.100.0040.01214.80
7.3.90.0060.00914.66
7.3.80.0040.01114.63
7.3.70.0000.01214.87
7.3.60.0030.01014.69
7.3.50.0030.01014.82
7.3.40.0070.00714.59
7.3.30.0000.01314.70
7.3.20.0000.01016.45
7.3.10.0090.00916.42
7.3.00.0030.00916.77
7.2.330.0080.00916.53
7.2.320.0030.01216.51
7.2.310.0150.00416.52
7.2.300.0170.00316.74
7.2.290.0090.01516.50
7.2.260.0000.01314.72
7.2.250.0080.01014.84
7.2.240.0120.00314.98
7.2.230.0060.00614.85
7.2.220.0070.01015.23
7.2.210.0000.01514.89
7.2.200.0130.00014.90
7.2.190.0040.01414.96
7.2.180.0030.01615.09
7.2.170.0090.00614.96
7.2.160.0070.00314.87
7.2.150.0080.00916.93
7.2.140.0080.00816.73
7.2.130.0030.01016.69
7.2.120.0070.00716.82
7.2.110.0000.01016.50
7.2.100.0040.01116.49
7.2.90.0070.00716.84
7.2.80.0040.01116.83
7.2.70.0130.00316.82
7.2.60.0100.00316.94
7.2.50.0060.01116.90
7.2.40.0060.00816.79
7.2.30.0100.00716.82
7.2.20.0000.01316.67
7.2.10.0030.01316.95
7.2.00.0040.01116.89
7.1.330.0110.00315.91
7.1.320.0090.00715.84
7.1.310.0030.00715.86
7.1.300.0070.00715.87
7.1.290.0030.01515.77
7.1.280.0080.00615.76
7.1.270.0040.01115.81
7.1.260.0100.00715.65
7.1.250.0070.00715.75
7.1.240.0000.01415.68
7.1.230.0030.00715.55
7.1.220.0000.00915.89
7.1.210.0150.00015.73
7.1.200.0000.01615.71
7.1.190.0030.00915.54
7.1.180.0070.00715.70
7.1.170.0070.00715.71
7.1.160.0100.00715.88
7.1.150.0090.00615.86
7.1.140.0090.00915.92
7.1.130.0030.01315.70
7.1.120.0080.00415.59
7.1.110.0060.00315.80
7.1.100.0060.00915.53
7.1.90.0040.00415.61
7.1.80.0050.00515.72
7.1.70.0020.00916.48
7.1.60.0050.01417.61
7.1.50.0040.00816.23
7.1.40.0090.00615.99
7.1.30.0030.00715.63
7.1.20.0000.01215.66
7.1.10.0060.00915.70
7.1.00.0080.03719.06
7.0.330.0030.01015.29
7.0.320.0080.00315.49
7.0.310.0060.00615.37
7.0.300.0090.00615.19
7.0.290.0070.00715.45
7.0.280.0070.00315.11
7.0.270.0030.01015.52
7.0.260.0030.00615.61
7.0.250.0030.01015.38
7.0.240.0030.01015.46
7.0.230.0000.00815.45
7.0.220.0040.00415.59
7.0.210.0070.00715.15
7.0.200.0020.00916.23
7.0.190.0070.00315.50
7.0.180.0110.00415.53
7.0.170.0070.00715.49
7.0.160.0070.00415.49
7.0.150.0070.00715.52
7.0.140.0100.03618.68
7.0.130.0060.00315.36
7.0.120.0060.00915.12
7.0.110.0070.00715.52
7.0.100.0040.00815.60
7.0.90.0040.00815.31
7.0.80.0100.00615.33
7.0.70.0070.01015.14
7.0.60.0070.04217.70
7.0.50.0100.03716.65
7.0.40.0070.02916.93
7.0.30.0150.03316.86
7.0.20.0130.03816.89
7.0.10.0090.04416.79
7.0.00.0050.04516.81
5.6.400.0100.00314.65
5.6.390.0060.00614.47
5.6.380.0070.00714.63
5.6.370.0070.00714.35
5.6.360.0030.01014.62
5.6.350.0030.01314.32
5.6.340.0090.00614.39
5.6.330.0090.00614.20
5.6.320.0030.01014.55
5.6.310.0070.00714.39
5.6.300.0070.00714.65
5.6.290.0030.01214.42
5.6.280.0060.03817.68
5.6.270.0070.01014.32
5.6.260.0030.00714.52
5.6.250.0000.00914.49
5.6.240.0090.00614.35
5.6.230.0070.00714.44
5.6.220.0070.01114.13
5.6.210.0150.02517.59
5.6.200.0050.03916.31
5.6.190.0080.03117.57
5.6.180.0160.02017.58
5.6.170.0140.04217.51
5.6.160.0050.02217.30
5.6.150.0080.02016.38
5.6.140.0100.03516.23
5.6.130.0090.04316.29
5.6.120.0050.03517.87
5.6.110.0040.02617.68
5.6.100.0030.03917.76
5.6.90.0070.03217.79
5.6.80.0080.02517.29
5.6.70.2050.02417.35
5.6.60.0090.00614.25
5.6.50.0000.01314.10
5.6.40.0000.01514.34
5.6.30.0030.00614.37
5.6.20.0070.00714.09
5.6.10.0120.00314.45
5.6.00.0030.01014.25
5.5.380.0050.00313.97
5.5.370.0070.01014.45
5.5.360.0070.00714.39
5.5.350.0150.04217.45
5.5.340.0050.02216.22
5.5.330.0100.03117.35
5.5.320.0170.04017.33
5.5.310.0150.02517.44
5.5.300.0030.03116.00
5.5.290.0100.02716.32
5.5.280.0050.04917.66
5.5.270.0080.04517.67
5.5.260.0130.03017.71
5.5.250.0050.04317.48
5.5.240.0200.03517.11
5.5.230.0070.00714.40
5.5.220.0090.00314.10
5.5.210.0030.01214.28
5.5.200.0110.00714.16
5.5.190.0040.00713.99
5.5.180.0110.00413.92
5.5.170.0040.00414.39
5.5.160.0040.01114.25
5.5.150.0040.00714.23
5.5.140.0070.00714.35
5.5.130.0000.01414.28
5.5.120.0070.00714.40
5.5.110.0030.01313.94
5.5.100.0060.00914.45
5.5.90.0030.01014.16
5.5.80.0030.01014.43
5.5.70.0100.00314.45
5.5.60.0060.00314.25
5.5.50.0060.00614.45
5.5.40.0030.01014.52
5.5.30.0030.01214.17
5.5.20.0000.00914.29
5.5.10.0070.00714.49
5.5.00.0070.00713.94
5.4.450.0160.02615.47
5.4.440.0090.03415.23
5.4.430.0320.03715.25
5.4.420.0370.04015.40
5.4.410.0080.02615.29
5.4.400.0480.03515.05
5.4.390.0080.03015.09
5.4.380.0100.03015.18
5.4.370.0140.02915.00
5.4.360.0100.03815.30
5.4.350.0150.02315.03
5.4.340.0070.02011.47
5.4.330.0070.00311.23
5.4.320.0040.02211.78
5.4.310.0050.02411.94
5.4.300.0040.02211.89
5.4.290.0020.02311.77
5.4.280.0070.01911.70
5.4.270.0040.02011.61
5.4.260.0050.02511.63
5.4.250.0020.02211.74
5.4.240.0050.02311.66
5.4.230.0060.02111.77
5.4.220.0020.02411.79
5.4.210.0070.02011.62
5.4.200.0070.02111.58
5.4.190.0060.02111.73
5.4.180.0030.02211.79
5.4.170.0050.02311.76
5.4.160.0050.02211.87
5.4.150.0060.02211.86
5.4.140.0070.02011.54
5.4.130.0040.02211.63
5.4.120.0060.02111.64
5.4.110.0070.02011.63
5.4.100.0070.01911.61
5.4.90.0050.02411.71
5.4.80.0060.02111.47
5.4.70.0050.02111.41
5.4.60.0050.02311.47
5.4.50.0060.01811.50
5.4.40.0040.02011.59
5.4.30.0020.02411.39
5.4.20.0050.02111.55
5.4.10.0030.02211.54
5.4.00.0050.02211.32
5.3.290.0050.03912.80
5.3.280.0050.03912.71
5.3.270.0070.03812.73
5.3.260.0070.03712.72
5.3.250.0090.03312.72
5.3.240.0060.03712.72
5.3.230.0050.03912.71
5.3.220.0060.03812.68
5.3.210.0050.04112.68
5.3.200.0050.03912.68
5.3.190.0060.04312.68
5.3.180.0060.03812.67
5.3.170.0080.03512.67
5.3.160.0060.03712.67
5.3.150.0080.03412.67
5.3.140.0090.03212.66
5.3.130.0020.04212.66
5.3.120.0050.04012.66
5.3.110.0070.03912.66
5.3.100.0060.03812.13
5.3.90.0050.04312.11
5.3.80.0080.03612.10
5.3.70.0070.03512.10
5.3.60.0070.03512.09
5.3.50.0020.03912.03
5.3.40.0040.03812.04
5.3.30.0060.03411.99
5.3.20.0010.03911.77
5.3.10.0050.03511.74
5.3.00.0050.03911.72
5.2.170.0040.0319.23
5.2.160.0050.0299.23
5.2.150.0080.0289.23
5.2.140.0040.0339.23
5.2.130.0080.0279.19
5.2.120.0090.0259.18
5.2.110.0060.0329.20
5.2.100.0050.0299.19
5.2.90.0060.0279.19
5.2.80.0040.0329.18
5.2.70.0060.0299.18
5.2.60.0040.0329.14
5.2.50.0020.0329.11
5.2.40.0060.0339.08
5.2.30.0030.0309.06
5.2.20.0020.0359.04
5.2.10.0020.0318.95
5.2.00.0060.0358.82
5.1.60.0030.0278.10
5.1.50.0020.0278.09
5.1.40.0020.0278.08
5.1.30.0040.0298.43
5.1.20.0040.0268.45
5.1.10.0030.0268.18
5.1.00.0040.0258.17
5.0.50.0050.0196.66
5.0.40.0020.0206.51
5.0.30.0040.0306.33
5.0.20.0040.0236.29
5.0.10.0050.0206.27
5.0.00.0040.0316.26
4.4.90.0040.0144.78
4.4.80.0050.0144.75
4.4.70.0010.0174.75
4.4.60.0020.0234.75
4.4.50.0030.0154.77
4.4.40.0020.0264.71
4.4.30.0030.0144.76
4.4.20.0020.0194.85
4.4.10.0050.0234.85
4.4.00.0040.0284.76
4.3.110.0030.0154.67
4.3.100.0040.0144.66
4.3.90.0020.0154.63
4.3.80.0070.0254.58
4.3.70.0040.0134.63
4.3.60.0010.0164.63
4.3.50.0010.0174.63
4.3.40.0050.0214.54
4.3.30.0020.0163.30
4.3.20.0040.0143.28
4.3.10.0020.0153.24
4.3.00.0100.0236.99

preferences:
48.12 ms | 400 KiB | 5 Q