3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Cookie implements ArrayAccess { public function offsetSet($offset, $value) { setcookie($offset, $value); } public function offsetGet($offset) { return $_COOKIE[$offset]; } } $cookie = new Cookie; // 读取Cookie print $cookie["username"]; // 写入Cookie $cookie["passwd"] = "123abc";

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.70.0100.00618.29
8.3.60.0070.00716.75
8.3.50.0110.00916.40
8.3.40.0070.00718.66
8.3.30.0030.01018.57
8.3.20.0040.00418.79
8.3.10.0080.00020.53
8.3.00.0040.00419.13
8.2.180.0140.00416.50
8.2.170.0060.01222.96
8.2.160.0100.00620.52
8.2.150.0060.01224.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0040.00419.36
8.2.110.0060.00320.88
8.2.100.0080.00417.88
8.2.90.0030.00619.14
8.2.80.0070.00317.79
8.2.70.0040.00417.63
8.2.60.0090.00317.67
8.2.50.0000.00818.07
8.2.40.0090.00017.91
8.2.30.0000.00817.92
8.2.20.0020.00517.57
8.2.10.0060.00317.80
8.2.00.0080.00017.60
8.1.280.0070.00725.92
8.1.270.0000.00724.66
8.1.260.0090.00026.35
8.1.250.0000.00828.09
8.1.240.0140.00722.50
8.1.230.0100.00020.86
8.1.220.0040.00417.74
8.1.210.0000.00818.91
8.1.200.0060.00317.22
8.1.190.0040.00417.40
8.1.180.0060.00318.10
8.1.170.0030.00518.75
8.1.160.0030.00618.70
8.1.150.0000.00918.63
8.1.140.0000.00717.34
8.1.130.0000.00717.81
8.1.120.0030.00517.46
8.1.110.0030.00317.27
8.1.100.0030.00517.29
8.1.90.0040.00417.39
8.1.80.0030.00517.31
8.1.70.0030.00317.29
8.1.60.0030.00617.51
8.1.50.0040.00417.28
8.1.40.0060.00317.43
8.1.30.0000.00817.61
8.1.20.0040.00417.45
8.1.10.0000.00717.38
8.1.00.0000.00717.37
8.0.300.0000.00719.91
8.0.290.0020.00516.63
8.0.280.0000.00718.40
8.0.270.0030.00317.18
8.0.260.0000.00716.72
8.0.250.0000.00716.97
8.0.240.0030.00316.88
8.0.230.0000.00716.94
8.0.220.0030.00516.80
8.0.210.0000.00816.91
8.0.200.0000.00716.93
8.0.190.0050.00316.88
8.0.180.0000.00716.74
8.0.170.0030.00616.91
8.0.160.0030.00316.85
8.0.150.0030.00616.71
8.0.140.0040.00416.72
8.0.130.0050.00013.36
8.0.120.0040.00416.78
8.0.110.0030.00316.75
8.0.100.0070.00016.82
8.0.90.0040.00416.95
8.0.80.0070.00716.88
8.0.70.0050.00316.71
8.0.60.0040.00416.73
8.0.50.0000.00816.87
8.0.30.0130.00617.02
8.0.20.0070.01017.11
8.0.10.0070.00017.06
8.0.00.0140.00616.61
7.4.330.0000.00512.90
7.4.320.0000.00616.52
7.4.300.0000.00616.61
7.4.290.0030.00316.45
7.4.280.0070.00016.51
7.4.270.0050.00316.46
7.4.260.0000.00513.06
7.4.250.0080.00016.52
7.4.240.0050.00316.41
7.4.230.0070.00016.32
7.4.220.0150.00316.45
7.4.210.0100.00716.51
7.4.200.0020.00516.51
7.4.190.0040.00416.46
7.4.160.0090.00616.61
7.4.150.0120.01216.38
7.4.140.0100.00716.41
7.4.130.0050.01216.34
7.4.120.0070.00916.38
7.4.110.0100.01416.40
7.4.100.0090.00916.38
7.4.90.0160.00616.54
7.4.80.0040.01216.43
7.4.70.0070.01116.43
7.4.60.0100.00516.27
7.4.50.0000.00916.55
7.4.40.0030.01016.34
7.4.30.0060.00916.57
7.4.10.0100.00715.00
7.4.00.0050.01215.03
7.3.330.0030.00313.23
7.3.320.0000.00613.21
7.3.310.0070.00016.29
7.3.300.0060.00016.30
7.3.290.0100.01016.21
7.3.280.0110.00716.23
7.3.270.0100.01016.25
7.3.260.0120.00716.45
7.3.250.0120.00516.30
7.3.240.0130.00316.36
7.3.230.0030.01516.28
7.3.210.0100.00716.40
7.3.200.0080.01019.39
7.3.190.0160.00616.46
7.3.180.0080.00816.39
7.3.170.0130.00716.43
7.3.160.0090.00616.50
7.3.130.0090.00614.78
7.3.120.0070.01114.82
7.3.110.0100.01014.80
7.3.100.0040.01214.59
7.3.90.0040.01114.72
7.3.80.0030.01014.63
7.3.70.0000.01414.61
7.3.60.0040.00714.55
7.3.50.0060.00314.52
7.3.40.0000.01314.76
7.3.30.0130.00014.44
7.3.20.0000.01116.51
7.3.10.0060.00616.76
7.3.00.0030.01216.65
7.2.330.0130.00316.38
7.2.320.0090.00816.54
7.2.310.0080.01116.48
7.2.300.0120.00916.44
7.2.290.0130.00316.59
7.2.260.0040.01514.89
7.2.250.0040.01414.89
7.2.240.0040.01414.91
7.2.230.0090.00314.87
7.2.220.0060.00615.07
7.2.210.0100.00614.99
7.2.200.0070.00714.75
7.2.190.0070.01114.92
7.2.180.0090.00614.84
7.2.170.0120.00314.73
7.2.160.0000.01314.97
7.2.150.0070.00416.52
7.2.140.0040.01116.91
7.2.130.0100.00716.73
7.2.120.0040.01116.75
7.2.110.0070.00716.88
7.2.100.0090.00016.73
7.2.90.0040.01416.75
7.2.80.0070.01016.76
7.2.70.0070.00716.46
7.2.60.0030.01016.57
7.2.50.0000.01616.63
7.2.40.0040.01516.73
7.2.30.0030.01016.68
7.2.20.0060.00916.60
7.2.10.0030.01216.56
7.2.00.0060.00918.01
7.1.330.0060.00615.62
7.1.320.0030.00615.73
7.1.310.0070.00315.77
7.1.300.0000.00815.67
7.1.290.0040.01215.69
7.1.280.0000.01515.55
7.1.270.0040.00715.54
7.1.260.0000.01115.93
7.1.250.0030.00515.89
7.1.240.0120.00315.27
7.1.230.0100.00315.44
7.1.220.0030.00715.73
7.1.210.0030.01015.75
7.1.200.0100.00315.63
7.1.190.0070.00315.65
7.1.180.0060.00315.44
7.1.170.0030.01315.78
7.1.160.0000.01315.63
7.1.150.0030.00715.82
7.1.140.0070.01015.42
7.1.130.0040.00715.74
7.1.120.0080.00615.68
7.1.110.0090.00315.43
7.1.100.0110.00716.64
7.1.90.0080.00415.76
7.1.80.0040.01115.45
7.1.70.0030.00716.19
7.1.60.0050.01517.55
7.1.50.0070.01016.23
7.1.40.0080.00815.71
7.1.30.0040.01015.79
7.1.20.0030.00715.74
7.1.10.0060.00615.68
7.1.00.0070.04018.98
7.0.330.0040.00715.26
7.0.320.0070.00315.32
7.0.310.0030.01015.47
7.0.300.0070.00415.13
7.0.290.0030.01015.03
7.0.280.0030.00715.17
7.0.270.0060.01115.19
7.0.260.0000.01415.32
7.0.250.0060.00915.42
7.0.240.0000.01515.45
7.0.230.0060.00915.11
7.0.220.0030.00915.39
7.0.210.0000.01015.36
7.0.200.0070.00714.86
7.0.190.0030.00715.40
7.0.180.0030.01315.35
7.0.170.0000.01015.21
7.0.160.0060.00315.36
7.0.150.0030.00915.12
7.0.140.0050.03918.61
7.0.130.0000.00815.18
7.0.120.0070.03218.60
7.0.110.0060.00315.13
7.0.100.0000.01215.36
7.0.90.0040.00715.16
7.0.80.0070.00715.20
7.0.70.0030.01315.17
7.0.60.0050.04517.68
7.0.50.0060.03116.57
7.0.40.0060.03716.69
7.0.30.0180.04316.95
7.0.20.0150.02716.65
7.0.10.0140.01716.69
7.0.00.0130.02816.63
5.6.400.0000.00914.18
5.6.390.0070.00714.28
5.6.380.0090.00314.48
5.6.370.0090.00614.10
5.6.360.0030.01314.39
5.6.350.0030.01314.15
5.6.340.0060.00914.30
5.6.330.0030.00713.93
5.6.320.0040.01114.26
5.6.310.0060.00613.85
5.6.300.0000.01014.19
5.6.290.0070.00714.15
5.6.280.0060.04017.60
5.6.270.0000.01014.49
5.6.260.0030.01014.37
5.6.250.0080.00613.95
5.6.240.0030.01014.06
5.6.230.0060.00814.43
5.6.220.0040.01114.26
5.6.210.0090.02717.31
5.6.200.0050.04616.19
5.6.190.0120.04517.46
5.6.180.0100.02817.39
5.6.170.0130.03317.27
5.6.160.0050.04717.21
5.6.150.0070.04216.12
5.6.140.0030.03916.15
5.6.130.0050.04716.18
5.6.120.0060.02317.62
5.6.110.0050.04717.63
5.6.100.0070.03317.55
5.6.90.0060.04717.64
5.6.80.0030.02517.16
5.6.70.0030.01313.96
5.6.60.0050.00514.03
5.6.50.0050.00913.98
5.6.40.0000.01814.34
5.6.30.0030.00914.20
5.6.20.0030.00714.33
5.6.10.0090.00614.16
5.6.00.0000.01114.02
5.5.380.0100.00314.23
5.5.370.0040.00713.86
5.5.360.0060.00614.20
5.5.350.0090.04217.16
5.5.340.0020.04716.07
5.5.330.0100.04317.17
5.5.320.0120.03417.29
5.5.310.0180.04817.36
5.5.300.0060.03215.85
5.5.290.0080.03815.94
5.5.280.0060.02617.54
5.5.270.0060.04817.56
5.5.260.0050.04517.45
5.5.250.0050.04217.36
5.5.240.0050.04317.27
5.5.230.0000.01513.89
5.5.220.0100.00313.83
5.5.210.0030.01013.85
5.5.200.0060.00913.69
5.5.190.0100.00613.96
5.5.180.0080.00414.02
5.5.170.0090.00613.81
5.5.160.0060.00914.06
5.5.150.0030.01314.11
5.5.140.0030.00914.05
5.5.130.0040.00713.77
5.5.120.0060.00913.85
5.5.110.0090.00613.86
5.5.100.0070.00713.85
5.5.90.0030.01114.18
5.5.80.0090.00614.00
5.5.70.0060.00613.73
5.5.60.0040.00814.16
5.5.50.0040.00713.94
5.5.40.0070.00713.78
5.5.30.0120.00013.87
5.5.20.0050.00314.05
5.5.10.0040.00814.02
5.5.00.0070.00413.71
5.4.450.0020.04815.91
5.4.440.0030.02716.02
5.4.430.0050.02415.84
5.4.420.0030.02515.97
5.4.410.0050.04115.91
5.4.400.0050.02915.86
5.4.390.0030.03315.75
5.4.380.0100.02315.86
5.4.370.0050.01915.81
5.4.360.0080.02115.87
5.4.350.0030.04415.81
5.4.340.0030.04315.86
5.4.330.0050.00512.48
5.4.320.0050.03315.67
5.4.310.0070.04015.78
5.4.300.0000.04715.84
5.4.290.0050.04115.86
5.4.280.0050.02715.86
5.4.270.0070.03815.67
5.4.260.0040.02415.74
5.4.250.0000.02915.71
5.4.240.0000.04515.81
5.4.230.0010.03815.75
5.4.220.0070.03415.81
5.4.210.0020.04615.84
5.4.200.0030.04115.82
5.4.190.0060.04015.66
5.4.180.0020.03815.74
5.4.170.0100.03715.84
5.4.160.0050.03715.81
5.4.150.0050.04215.79
5.4.140.0030.02014.41
5.4.130.0040.02014.49
5.4.120.0030.03014.49
5.4.110.0030.04214.38
5.4.100.0050.04014.44
5.4.90.0070.03814.45
5.4.80.0110.02114.38
5.4.70.0080.04014.45
5.4.60.0060.02214.52
5.4.50.0060.02814.38
5.4.40.0030.04014.42
5.4.30.0050.03314.49
5.4.20.0120.03514.47
5.4.10.0030.03214.49
5.4.00.0050.03714.11
5.3.290.0020.04313.65
5.3.280.0050.03813.54
5.3.270.0030.03513.56
5.3.260.0050.03513.54
5.3.250.0030.03613.54
5.3.240.0000.04613.56
5.3.230.0070.04213.57
5.3.220.0020.02913.54
5.3.210.0050.04213.56
5.3.200.0030.03113.60
5.3.190.0090.03613.60
5.3.180.0060.04113.56
5.3.170.0080.01713.46
5.3.160.0070.02213.60
5.3.150.0050.03813.54
5.3.140.0070.03713.59
5.3.130.0000.03713.53
5.3.120.0070.03713.53
5.3.110.0050.03113.54
5.3.100.0030.04313.26
5.3.90.0050.02713.29
5.3.80.0050.02513.27
5.3.70.0100.03213.30
5.3.60.0050.04013.24
5.3.50.0070.03913.22
5.3.40.0110.03113.20
5.3.30.0050.03313.20
5.3.20.0000.02413.11
5.3.10.0100.03713.14
5.3.00.0100.03713.02
5.2.170.0030.05311.23
5.2.160.0000.07011.20
5.2.150.0030.06711.04
5.2.140.0030.04311.18
5.2.130.0070.05711.13
5.2.120.0100.04711.00
5.2.110.0030.04711.14
5.2.100.0000.06711.12
5.2.90.0070.06311.27
5.2.80.0000.07011.11
5.2.70.0030.06311.17
5.2.60.0070.04011.00
5.2.50.0100.05010.97
5.2.40.0030.06011.05
5.2.30.0070.03710.93
5.2.20.0070.03311.11
5.2.10.0000.03010.75
5.2.00.0070.02710.61
5.1.60.0100.0479.96
5.1.50.0070.04010.07
5.1.40.0100.0339.89
5.1.30.0030.06010.39
5.1.20.0070.03310.39
5.1.10.0030.0239.98
5.1.00.0000.05010.04
5.0.50.0100.0408.59
5.0.40.0030.0408.51
5.0.30.0030.0578.51
5.0.20.0000.0338.51
5.0.10.0000.0308.51
5.0.00.0030.0678.51
4.4.90.0030.0338.51
4.4.80.0070.0308.51
4.4.70.0000.0178.51
4.4.60.0000.0408.51
4.4.50.0000.0178.51
4.4.40.0000.0578.51
4.4.30.0030.0378.51
4.4.20.0000.0178.51
4.4.10.0000.0378.51
4.4.00.0030.0478.51
4.3.110.0100.0308.51
4.3.100.0000.0238.51
4.3.90.0000.0278.51
4.3.80.0000.0538.51
4.3.70.0070.0238.51
4.3.60.0070.0338.51
4.3.50.0000.0308.51
4.3.40.0030.0408.51
4.3.30.0030.0278.51
4.3.20.0030.0338.51
4.3.10.0000.0338.51
4.3.00.0070.0208.51

preferences:
49.66 ms | 401 KiB | 5 Q