3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace HHVM\UserDocumentation\Inconsistencies\Intro\Examples\AIC; $x = [0, 1]; next($x); // internal array cursor points at 1 next($x); // internal array cursor points after last element $y = $x; $y[] = 2; // Triggers copy-on-write var_dump(current($x)); // bool(false) var_dump(current($y)); // int(2) on HHVM, int(0) on PHP

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.0100.00716.38
8.3.50.0120.00621.91
8.3.40.0090.00618.51
8.3.30.0070.00718.54
8.3.20.0040.00420.34
8.3.10.0070.00021.85
8.3.00.0040.00419.25
8.2.180.0150.00618.16
8.2.170.0100.01018.82
8.2.160.0030.01022.96
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0030.00719.36
8.2.120.0090.00026.35
8.2.110.0050.00520.54
8.2.100.0110.00018.05
8.2.90.0080.00019.23
8.2.80.0080.00017.97
8.2.70.0080.00017.63
8.2.60.0080.00018.03
8.2.50.0040.00418.07
8.2.40.0040.00419.25
8.2.30.0040.00420.69
8.2.20.0080.00317.68
8.2.10.0040.00417.94
8.2.00.0000.00718.05
8.1.280.0030.01225.92
8.1.270.0030.00623.62
8.1.260.0050.00228.09
8.1.250.0070.00028.09
8.1.240.0090.00023.97
8.1.230.0080.00317.66
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0000.00917.36
8.1.190.0040.00417.23
8.1.180.0000.00918.10
8.1.170.0030.00618.68
8.1.160.0040.00422.00
8.1.150.0040.00418.85
8.1.140.0050.00319.46
8.1.130.0000.00717.39
8.1.120.0070.00017.42
8.1.110.0030.00317.35
8.1.100.0080.00017.30
8.1.90.0000.00817.39
8.1.80.0040.00317.28
8.1.70.0030.00317.36
8.1.60.0050.00217.52
8.1.50.0030.00617.31
8.1.40.0060.00317.37
8.1.30.0040.00417.57
8.1.20.0080.00017.48
8.1.10.0040.00417.45
8.1.00.0090.00317.41
8.0.300.0090.00018.77
8.0.290.0050.00316.58
8.0.280.0040.00418.37
8.0.270.0000.00716.81
8.0.260.0030.00316.70
8.0.250.0070.00016.86
8.0.240.0000.00716.89
8.0.230.0040.00416.73
8.0.220.0030.00316.85
8.0.210.0040.00416.75
8.0.200.0000.00616.89
8.0.190.0000.00816.82
8.0.180.0080.00016.85
8.0.170.0000.00816.78
8.0.160.0040.00416.79
8.0.150.0040.00416.72
8.0.140.0030.00316.74
8.0.130.0060.00013.34
8.0.120.0030.00516.72
8.0.110.0030.00516.77
8.0.100.0020.00516.83
8.0.90.0040.00416.71
8.0.80.0070.01516.76
8.0.70.0070.00016.65
8.0.60.0040.00416.89
8.0.50.0070.00016.61
8.0.30.0050.01516.92
8.0.20.0080.01017.40
8.0.10.0080.00016.85
8.0.00.0050.01616.75
7.4.330.0000.00516.82
7.4.320.0000.00716.45
7.4.300.0030.00316.54
7.4.290.0040.00416.45
7.4.280.0040.00416.51
7.4.270.0000.00716.59
7.4.260.0030.00416.45
7.4.250.0040.00416.48
7.4.240.0050.00216.46
7.4.230.0040.00416.34
7.4.220.0120.01516.55
7.4.210.0030.01016.46
7.4.200.0070.00016.65
7.4.160.0120.00616.64
7.4.150.0060.01217.40
7.4.140.0120.01017.86
7.4.130.0130.00516.51
7.4.120.0090.00816.25
7.4.110.0130.00316.58
7.4.100.0140.00716.53
7.4.90.0060.01216.31
7.4.80.0150.00619.39
7.4.70.0070.01416.41
7.4.60.0070.01016.43
7.4.50.0030.01416.19
7.4.40.0160.00416.43
7.4.30.0090.01216.45
7.4.00.0120.00315.07
7.3.330.0050.00313.02
7.3.320.0000.00613.18
7.3.310.0000.00716.23
7.3.300.0070.00016.31
7.3.290.0090.00716.27
7.3.280.0080.01116.25
7.3.270.0320.01917.40
7.3.260.0100.00716.29
7.3.250.0090.00816.51
7.3.240.0090.00816.20
7.3.230.0060.00916.39
7.3.210.0130.00316.20
7.3.200.0070.01416.48
7.3.190.0090.01316.47
7.3.180.0100.00616.71
7.3.170.0040.01216.62
7.3.160.0110.00616.54
7.3.20.0580.00314.63
7.3.10.0400.00514.67
7.3.00.0440.00514.69
7.2.330.0090.01516.43
7.2.320.0120.00616.72
7.2.310.0060.01116.84
7.2.300.0110.00716.69
7.2.290.0140.01216.28
7.2.150.0100.01014.79
7.2.140.0440.00314.66
7.2.130.0450.00214.98
7.2.120.0460.00614.99
7.2.110.0540.00814.65
7.2.100.0560.00614.67
7.2.90.0310.00514.80
7.2.80.0400.00914.78
7.2.70.0430.00615.40
7.2.60.0320.00815.63
7.2.50.0390.01215.40
7.2.40.0450.00815.31
7.2.30.0220.01015.93
7.2.20.0290.01216.23
7.2.10.0350.00916.21
7.2.00.0250.01216.18
7.1.250.0480.00713.84
7.1.240.0800.01113.72
7.1.230.0550.00913.86
7.1.220.0760.00613.83
7.1.210.0380.00813.83
7.1.200.0460.00614.20
7.1.190.0520.00913.75
7.1.180.0530.01013.72
7.1.170.0450.00814.04
7.1.160.0400.00714.29
7.1.150.0340.00814.78
7.1.140.0250.01115.07
7.1.130.0330.01015.14
7.1.120.0310.00715.10
7.1.110.0320.00914.87
7.1.100.0460.00714.89
7.1.90.0320.01014.72
7.1.80.0250.01014.86
7.1.70.0270.00814.63
7.1.60.0330.01226.58
7.1.50.0370.01126.50
7.1.40.0310.01326.38
7.1.30.0340.01126.37
7.1.20.0890.01126.47
7.1.10.0260.01114.39
7.1.00.0450.00814.37
7.0.330.0480.00713.59
7.0.320.0510.00913.53
7.0.310.0610.00813.47
7.0.300.0450.00914.02
7.0.290.0390.00914.05
7.0.280.0630.00713.54
7.0.270.0300.00814.83
7.0.260.0350.00814.80
7.0.250.0350.00914.46
7.0.240.0350.00614.56
7.0.230.0280.00914.58
7.0.220.0260.01014.73
7.0.210.0260.00814.30
7.0.200.0290.00714.24
7.0.190.0510.00614.33
7.0.180.0210.00914.21
7.0.170.0300.00714.22
7.0.160.0250.00814.17
7.0.150.0270.00814.22
7.0.140.0260.01014.14
7.0.130.0220.01114.18
7.0.120.0290.00814.29
7.0.110.0250.01414.23
7.0.100.0270.00914.18
7.0.90.0310.00614.15
7.0.80.0250.01014.29
7.0.70.0320.00914.14
7.0.60.0250.00714.11
7.0.50.0270.00714.23
7.0.40.0210.00914.31
7.0.30.0220.00814.28
7.0.20.0220.00914.22
7.0.10.0230.01014.25
7.0.00.0290.00614.28
5.6.380.0120.01214.14
5.6.370.0160.00414.08
5.6.360.0150.00914.43
5.6.350.0150.01114.16
5.6.340.0090.01014.06
5.6.330.0120.01214.49
5.6.320.0140.00914.23
5.6.310.0100.01214.38
5.6.300.0150.02516.47
5.6.290.0140.02516.51
5.6.280.0170.02316.50
5.6.270.0120.03116.42
5.6.260.0150.02516.50
5.6.250.0130.02916.45
5.6.240.0130.03316.47
5.6.230.0180.02716.46
5.6.220.0140.03116.42
5.6.210.0140.02816.44
5.6.200.0190.02416.42
5.6.190.0150.02716.47
5.6.180.0140.03216.41
5.6.170.0110.02816.44
5.6.160.0170.02816.35
5.6.150.0130.03116.42
5.6.140.0150.02816.42
5.6.130.0130.03016.38
5.6.120.0150.02816.53
5.6.110.0160.02216.46
5.6.100.0120.02816.39
5.6.90.0140.02516.39
5.6.80.0150.02216.12
5.6.70.0130.02916.17
5.6.60.0140.02416.07
5.6.50.0130.02916.23
5.6.40.0120.03316.20
5.6.30.0140.02516.26
5.6.20.0100.02816.29
5.6.10.0130.02316.26
5.6.00.0110.02616.17
5.5.380.0140.02313.17
5.5.370.0130.02513.17
5.5.360.0130.02313.14
5.5.350.0120.02613.22
5.5.340.0150.02613.40
5.5.330.0100.02413.39
5.5.320.0140.02313.26
5.5.310.0150.02813.38
5.5.300.0130.02513.35
5.5.290.0130.02813.35
5.5.280.0150.02313.41
5.5.270.0120.02513.26
5.5.260.0090.02513.21
5.5.250.0100.02513.24
5.5.240.0090.02913.05
5.5.230.0090.02213.13
5.5.220.0100.02413.04
5.5.210.0100.02613.07
5.5.200.0150.02213.01
5.5.190.0140.02213.07
5.5.180.0080.02313.07
5.5.170.0140.00412.00
5.5.160.0090.02513.04
5.5.150.0110.02213.15
5.5.140.0120.02013.06
5.5.130.0120.02013.03
5.5.120.0100.02613.17
5.5.110.0120.02313.04
5.5.100.0130.02813.03
5.5.90.0100.02612.99
5.5.80.0130.02212.99
5.5.70.0130.02713.02
5.5.60.0130.02313.05
5.5.50.0110.02313.00
5.5.40.0080.02313.03
5.5.30.0120.02113.02
5.5.20.0070.02512.97
5.5.10.0110.02412.99
5.5.00.0110.02312.97
5.4.450.0130.03214.31
5.4.440.0100.02914.29
5.4.430.0120.02414.43
5.4.420.0120.02714.31
5.4.410.0100.02714.24
5.4.400.0090.02814.14
5.4.390.0110.02514.15
5.4.380.0140.02914.15
5.4.370.0090.03214.21
5.4.360.0110.02914.16
5.4.350.0090.02414.16
5.4.340.0120.02514.20
5.4.330.0120.00711.10
5.4.320.0110.02714.20
5.4.310.0110.02414.26
5.4.300.0090.02614.18
5.4.290.0110.02714.16
5.4.280.0130.02514.13
5.4.270.0120.02514.12
5.4.260.0140.02714.19
5.4.250.0110.02614.12
5.4.240.0110.03014.10
5.4.230.0110.02814.07
5.4.220.0130.02714.09
5.4.210.0110.02714.14
5.4.200.0120.02514.08
5.4.190.0100.02514.14
5.4.180.0120.02814.17
5.4.170.0140.02614.16
5.4.160.0090.02614.14
5.4.150.0110.03114.11
5.4.140.0140.02213.04
5.4.130.0120.02113.11
5.4.120.0150.02413.11
5.4.110.0120.02913.16
5.4.100.0110.02613.26
5.4.90.0130.02413.18
5.4.80.0130.02213.17
5.4.70.0110.02313.07
5.4.60.0110.02413.15
5.4.50.0130.03013.16
5.4.40.0090.02613.18
5.4.30.0130.02513.21
5.4.20.0120.02813.15
5.4.10.0160.02613.13
5.4.00.0080.02612.86
5.3.290.0140.02411.94
5.3.280.0080.02711.97
5.3.270.0130.02611.99
5.3.260.0140.02611.95
5.3.250.0120.02211.89
5.3.240.0120.02511.83
5.3.230.0100.02611.93
5.3.220.0100.03011.88
5.3.210.0140.02811.87
5.3.200.0130.02311.88
5.3.190.0090.02411.90
5.3.180.0140.02911.98
5.3.170.0100.02612.09
5.3.160.0100.02512.07
5.3.150.0140.02612.00
5.3.140.0150.02211.95
5.3.130.0130.02711.89
5.3.120.0080.03012.00
5.3.110.0120.02711.96
5.3.100.0090.02711.73
5.3.90.0110.02711.78
5.3.80.0120.02811.72
5.3.70.0100.02411.68
5.3.60.0100.02711.77
5.3.50.0120.02811.70
5.3.40.0090.02911.64
5.3.30.0100.02311.62
5.3.20.0130.02611.60
5.3.10.0080.02711.37
5.3.00.0070.03411.38
5.2.170.0090.02210.03
5.2.160.0090.02410.06
5.2.150.0080.02310.11
5.2.140.0080.02410.05
5.2.130.0110.02210.04
5.2.120.0090.0209.95
5.2.110.0120.01610.12
5.2.100.0090.02110.03
5.2.90.0130.0169.95
5.2.80.0100.02010.07
5.2.70.0080.0229.96
5.2.60.0100.0199.92
5.2.50.0060.0209.98
5.2.40.0080.0199.99
5.2.30.0070.0239.98
5.2.20.0090.0179.86
5.2.10.0100.0189.90
5.2.00.0090.0219.81
5.1.60.0050.0199.31
5.1.50.0080.0179.28
5.1.40.0090.0169.34
5.1.30.0070.0199.54
5.1.20.0090.0189.50
5.1.10.0060.0189.41
5.1.00.0090.0149.34
5.0.50.0050.0158.76
5.0.40.0070.0148.77
5.0.30.0040.0198.76
5.0.20.0070.0118.76
5.0.10.0060.0138.76
5.0.00.0050.0218.76
4.4.90.0050.0108.76
4.4.80.0060.0098.76
4.4.70.0060.0118.76
4.4.60.0030.0128.76
4.4.50.0050.0108.76
4.4.40.0060.0178.76
4.4.30.0050.0118.76
4.4.20.0060.0128.76
4.4.10.0050.0108.76
4.4.00.0040.0168.76
4.3.110.0050.0128.76
4.3.100.0050.0118.76
4.3.90.0030.0128.76
4.3.80.0050.0158.76
4.3.70.0060.0118.76
4.3.60.0070.0108.76
4.3.50.0040.0118.76
4.3.40.0040.0168.76
4.3.30.0050.0128.76
4.3.20.0050.0128.76
4.3.10.0040.0118.76
4.3.00.0050.0118.76

preferences:
62.56 ms | 401 KiB | 5 Q