3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('first','second','third','fourth'); /* foreach($a as &$v ){} foreach($a as $v){} */ // print_r($a); $temp = array(); $items = array( array('id'=>1,'pid'=>0,'name'=>'cate','level'=>1)); foreach($items as $value){ $temp[]= &$value; } $n = array(); foreach($a as $v){ $n[] = &$v; } // print_r($n);

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.0150.00016.50
8.3.50.0120.00316.74
8.3.40.0070.00718.67
8.3.30.0110.00418.63
8.3.20.0040.00720.15
8.3.10.0060.00320.48
8.3.00.0050.00323.61
8.2.180.0030.01416.38
8.2.170.0090.00622.96
8.2.160.0120.00619.33
8.2.150.0070.00724.18
8.2.140.0030.00524.66
8.2.130.0000.00822.21
8.2.120.0110.00326.35
8.2.110.0080.00020.43
8.2.100.0080.00418.03
8.2.90.0030.00619.40
8.2.80.0080.00017.97
8.2.70.0000.00917.75
8.2.60.0040.00417.91
8.2.50.0000.00818.12
8.2.40.0000.00820.60
8.2.30.0060.00319.34
8.2.20.0070.00018.12
8.2.10.0030.00517.99
8.2.00.0040.00417.67
8.1.280.0070.00725.92
8.1.270.0080.00023.99
8.1.260.0030.00528.09
8.1.250.0040.00428.09
8.1.240.0090.00022.36
8.1.230.0000.01117.77
8.1.220.0090.00017.74
8.1.210.0050.00318.77
8.1.200.0080.00017.11
8.1.190.0080.00017.22
8.1.180.0060.00318.10
8.1.170.0040.00418.65
8.1.160.0070.00022.12
8.1.150.0000.00718.78
8.1.140.0040.00419.44
8.1.130.0030.00317.68
8.1.120.0000.00817.44
8.1.110.0050.00317.45
8.1.100.0000.00717.40
8.1.90.0040.00417.35
8.1.80.0000.00717.44
8.1.70.0070.00017.44
8.1.60.0040.00417.60
8.1.50.0050.00317.54
8.1.40.0000.01117.49
8.1.30.0000.00817.54
8.1.20.0030.00617.62
8.1.10.0040.00417.35
8.1.00.0040.00417.35
8.0.300.0000.00818.77
8.0.290.0040.00416.63
8.0.280.0000.00718.43
8.0.270.0000.00717.34
8.0.260.0000.00617.41
8.0.250.0030.00316.86
8.0.240.0000.00716.91
8.0.230.0000.00716.93
8.0.220.0050.00216.91
8.0.210.0060.00316.90
8.0.200.0000.00716.83
8.0.190.0000.00816.98
8.0.180.0040.00416.81
8.0.170.0080.00016.91
8.0.160.0040.00416.88
8.0.150.0080.00016.74
8.0.140.0070.00016.75
8.0.130.0030.00613.39
8.0.120.0000.00716.87
8.0.110.0050.00516.95
8.0.100.0000.00716.75
8.0.90.0000.00716.91
8.0.80.0090.01216.78
8.0.70.0050.00516.82
8.0.60.0030.00516.84
8.0.50.0000.00716.67
8.0.30.0090.00816.90
8.0.20.0110.01017.40
8.0.10.0070.00016.82
8.0.00.0070.01016.75
7.4.330.0060.00015.08
7.4.320.0000.00716.49
7.4.300.0060.00016.57
7.4.290.0030.00316.48
7.4.280.0000.00716.50
7.4.270.0000.00716.51
7.4.260.0040.00216.61
7.4.250.0050.00216.50
7.4.240.0000.00816.48
7.4.230.0000.00816.48
7.4.220.0110.00916.66
7.4.210.0120.00316.55
7.4.200.0000.00716.44
7.4.160.0020.01516.51
7.4.150.0140.00917.40
7.4.140.0070.01317.86
7.4.130.0090.00816.48
7.4.120.0110.01116.52
7.4.110.0100.00616.38
7.4.100.0160.00516.66
7.4.90.0070.01116.63
7.4.80.0030.01419.39
7.4.70.0090.00916.51
7.4.60.0090.00916.43
7.4.50.0080.00316.42
7.4.40.0160.00616.41
7.4.30.0070.01016.48
7.4.00.0000.00914.98
7.3.330.0030.00313.30
7.3.320.0030.00313.08
7.3.310.0000.00816.27
7.3.300.0050.00216.18
7.3.290.0080.00816.34
7.3.280.0100.00816.37
7.3.270.0100.00717.40
7.3.260.0110.00616.46
7.3.250.0100.00916.42
7.3.240.0050.01216.34
7.3.230.0100.00716.43
7.3.210.0000.01716.39
7.3.200.0060.01116.42
7.3.190.0120.00316.21
7.3.180.0110.00516.36
7.3.170.0130.00316.28
7.3.160.0120.01216.31
7.2.330.0070.01016.52
7.2.320.0070.01016.73
7.2.310.0120.00416.32
7.2.300.0100.00716.61
7.2.290.0080.00816.56
7.2.00.0000.01219.29
7.1.200.0030.01015.90
7.1.70.0070.00017.00
7.1.60.0040.00717.23
7.1.00.0000.08022.30
7.0.200.0120.00614.87
7.0.110.0270.08320.20
7.0.100.0270.05720.37
7.0.90.0400.07020.31
7.0.80.0270.05320.34
7.0.70.0330.06020.30
7.0.60.0170.06320.18
7.0.50.0330.06020.32
7.0.40.0430.04720.30
7.0.30.0330.06020.28
7.0.20.0230.07020.24
7.0.10.0300.05320.17
7.0.00.0330.04720.30
5.6.260.0100.07021.11
5.6.250.0100.07320.95
5.6.240.0100.06021.04
5.6.230.0070.06321.05
5.6.220.0100.05321.05
5.6.210.0130.05020.91
5.6.200.0100.06321.01
5.6.190.0230.04721.04
5.6.180.0070.06320.99
5.6.170.0200.05020.94
5.6.160.0000.06320.75
5.6.150.0070.06321.08
5.6.140.0030.06321.08
5.6.130.0130.05020.80
5.6.120.0100.06320.81
5.6.110.0270.06020.91
5.6.100.0100.06020.93
5.6.90.0200.04321.04
5.6.80.0070.05320.41
5.6.70.0070.05720.12
5.6.60.0030.06020.29
5.6.50.0100.05020.38
5.6.40.0030.05720.36
5.6.30.0000.06320.36
5.6.20.0130.05020.14
5.6.10.0100.05020.28
5.6.00.0070.05720.44

preferences:
57.29 ms | 400 KiB | 5 Q