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 the 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.70.0180.00018.30
8.3.60.0140.00016.50
8.3.50.0160.00522.11
8.3.40.0070.00718.68
8.3.30.0140.00018.68
8.3.20.0070.00019.97
8.3.10.0050.00221.85
8.3.00.0080.00019.10
8.2.190.0110.01416.58
8.2.180.0110.00716.63
8.2.170.0130.00622.96
8.2.160.0100.00322.16
8.2.150.0000.00825.66
8.2.140.0050.00324.66
8.2.130.0060.00317.63
8.2.120.0040.00426.35
8.2.110.0090.00020.52
8.2.100.0060.00617.93
8.2.90.0020.00519.23
8.2.80.0050.00317.97
8.2.70.0000.00817.50
8.2.60.0000.00917.92
8.2.50.0030.00618.07
8.2.40.0040.00419.26
8.2.30.0040.00420.60
8.2.20.0100.00017.66
8.2.10.0000.00817.96
8.2.00.0030.00517.93
8.1.280.0170.00025.92
8.1.270.0060.00323.88
8.1.260.0040.00428.09
8.1.250.0000.00728.09
8.1.240.0030.00619.20
8.1.230.0040.00717.65
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.10
8.1.190.0040.00417.13
8.1.180.0040.00418.10
8.1.170.0040.00418.66
8.1.160.0070.00021.82
8.1.150.0040.00418.71
8.1.140.0030.00619.50
8.1.130.0040.00417.67
8.1.120.0020.00517.31
8.1.110.0050.00317.45
8.1.100.0000.00717.39
8.1.90.0000.00717.40
8.1.80.0080.00017.41
8.1.70.0000.00717.34
8.1.60.0080.00017.52
8.1.50.0090.00017.36
8.1.40.0080.00417.30
8.1.30.0000.00917.42
8.1.20.0060.00317.55
8.1.10.0000.00717.43
8.1.00.0040.00717.43
8.0.300.0080.00018.77
8.0.290.0060.00316.63
8.0.280.0000.00818.39
8.0.270.0030.00317.20
8.0.260.0000.00717.19
8.0.250.0070.00016.88
8.0.240.0030.00616.86
8.0.230.0050.00216.83
8.0.220.0040.00316.88
8.0.210.0000.00816.84
8.0.200.0030.00316.86
8.0.190.0040.00416.88
8.0.180.0000.00716.74
8.0.170.0060.00316.87
8.0.160.0040.00416.88
8.0.150.0030.00316.78
8.0.140.0070.00016.77
8.0.130.0050.00013.25
8.0.120.0000.00816.80
8.0.110.0070.00016.91
8.0.100.0050.00316.86
8.0.90.0000.00716.80
8.0.80.0030.01316.80
8.0.70.0030.00516.79
8.0.60.0000.00716.86
8.0.50.0000.00816.71
8.0.30.0080.01117.09
8.0.20.0170.00817.40
8.0.10.0000.00816.96
8.0.00.0100.00716.63
7.4.330.0020.00216.83
7.4.320.0050.00216.56
7.4.300.0000.00616.52
7.4.290.0040.00416.37
7.4.280.0050.00216.35
7.4.270.0070.00016.46
7.4.260.0000.00816.30
7.4.250.0050.00216.31
7.4.240.0030.00416.49
7.4.230.0030.00316.35
7.4.220.0180.00916.48
7.4.210.0030.01216.48
7.4.200.0030.00316.38
7.4.160.0120.00416.33
7.4.150.0340.02017.40
7.4.140.0050.01517.86
7.4.130.0070.01016.42
7.4.120.0110.00616.52
7.4.110.0100.01016.54
7.4.100.0110.00916.25
7.4.90.0100.01016.37
7.4.80.0080.00819.39
7.4.70.0070.01016.52
7.4.60.0090.00616.43
7.4.50.0070.00716.32
7.4.40.0000.01616.46
7.4.30.0100.00616.42
7.4.00.0060.00614.60
7.3.330.0050.00013.02
7.3.320.0030.00313.02
7.3.310.0000.00716.12
7.3.300.0040.00416.24
7.3.290.0080.00816.29
7.3.280.0100.01016.30
7.3.270.0100.00717.40
7.3.260.0100.00716.56
7.3.250.0090.01116.44
7.3.240.0100.01316.48
7.3.230.0090.01216.39
7.3.210.0100.00716.55
7.3.200.0190.01016.33
7.3.190.0080.01116.50
7.3.180.0000.01516.51
7.3.170.0120.00416.52
7.3.160.0030.01416.53
7.3.10.0000.00816.55
7.3.00.0060.00616.41
7.2.330.0150.00616.65
7.2.320.0110.00716.43
7.2.310.0040.01116.71
7.2.300.0060.01316.56
7.2.290.0110.01116.27
7.2.130.0030.00716.56
7.2.120.0090.00316.67
7.2.110.0000.00916.57
7.2.100.0030.00816.94
7.2.90.0110.00016.54
7.2.80.0080.00316.52
7.2.70.0060.00616.79
7.2.60.0060.00416.81
7.2.50.0090.00616.56
7.2.40.0050.00616.89
7.2.30.0090.00616.54
7.2.20.0040.01116.92
7.2.10.0030.00616.80
7.2.00.0010.00818.17
7.1.250.0080.00315.79
7.1.200.0120.00415.42
7.1.100.0040.00717.93
7.1.70.0000.00817.25
7.1.60.0120.01219.48
7.1.50.0070.01616.88
7.1.00.0100.07022.40
7.0.200.0070.00714.68
7.0.100.0100.08019.96
7.0.90.0100.08019.97
7.0.80.0070.06719.89
7.0.70.0330.08319.87
7.0.60.0330.05019.96
7.0.50.0370.07020.37
7.0.40.0070.07720.07
7.0.30.0130.07020.09
7.0.20.0070.04320.13
7.0.10.0030.08720.18
7.0.00.0130.07320.17
5.6.280.0000.03320.89
5.6.250.0030.06720.66
5.6.240.0070.08720.64
5.6.230.0030.08320.54
5.6.220.0000.05320.73
5.6.210.0130.04720.66
5.6.200.0130.06320.94
5.6.190.0130.05721.05
5.6.180.0070.07321.09
5.6.170.0100.06320.95
5.6.160.0070.08721.04
5.6.150.0100.06021.07
5.6.140.0030.07021.16
5.6.130.0130.08021.13
5.6.120.0100.06020.96
5.6.110.0070.07021.04
5.6.100.0170.07320.99
5.6.90.0070.08320.91
5.6.80.0170.07020.46
5.6.70.0070.05020.33
5.6.60.0000.05320.41
5.6.50.0100.06320.39
5.6.40.0030.04320.42
5.6.30.0100.07320.44
5.6.20.0100.04020.48
5.6.10.0100.08020.49
5.6.00.0130.07720.39
5.5.380.0030.08320.55
5.5.370.0070.07720.51
5.5.360.0030.07720.33
5.5.350.0200.07020.47
5.5.340.0070.08020.78
5.5.330.0030.09020.71
5.5.320.0100.07720.88
5.5.310.0000.06320.83
5.5.300.0070.05720.90
5.5.290.0030.05320.80
5.5.280.0070.04020.91
5.5.270.0100.04320.77
5.5.260.0070.05020.63
5.5.250.0100.08320.57
5.5.240.0100.07320.18
5.5.230.0030.06320.27
5.5.220.0070.06720.14
5.5.210.0100.07320.15
5.5.200.0030.07720.27
5.5.190.0070.07719.95
5.5.180.0030.04320.14
5.5.160.0000.08320.17
5.5.150.0070.07320.18
5.5.140.0130.04720.15
5.5.130.0030.04720.09
5.5.120.0070.08320.12
5.5.110.0100.06720.10
5.5.100.0130.04720.01
5.5.90.0030.08020.16
5.5.80.0030.07720.11
5.5.70.0100.07019.97
5.5.60.0030.06320.14
5.5.50.0030.07719.93
5.5.40.0170.05720.05
5.5.30.0130.07320.09
5.5.20.0100.07320.03
5.5.10.0100.06319.97
5.5.00.0000.06320.06

preferences:
22.64 ms | 401 KiB | 5 Q