3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 'lvl1-A' => [ 'lvl2' => [ 'lvl3' => 'done' ], ], 'lvl1-B' => 'done', ]; function traverse( \Traversable $it ): void { while ( $it->valid() ) { $it->hasChildren() ? print "{$it->key()} => \n" and traverse( $it->getChildren() ) : print "{$it->key()} => {$it->current()}\n"; $it->next(); } } $it = new \RecursiveArrayIterator( $arr ); $it->rewind(); traverse( $it ); print 'Done.';

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.5.10.0040.00418.51
8.5.00.0090.01220.07
8.4.160.0100.01123.88
8.4.150.0020.00014.05
8.4.140.0120.01017.56
8.4.130.0080.00817.85
8.4.120.0080.01220.62
8.4.110.0090.01122.29
8.4.100.0120.00917.71
8.4.90.0100.01020.32
8.4.80.0110.00917.68
8.4.70.0110.00817.67
8.4.60.0040.00419.47
8.4.50.0120.00818.50
8.4.40.0070.01317.55
8.4.30.0120.00918.75
8.4.20.0080.00017.93
8.4.10.0030.00619.12
8.3.290.0110.00920.73
8.3.280.0140.00618.36
8.3.270.0110.00816.56
8.3.260.0100.00916.64
8.3.250.0120.00819.15
8.3.240.0060.01220.66
8.3.230.0120.00816.66
8.3.220.0060.00419.11
8.3.210.0110.00816.70
8.3.200.0090.00616.73
8.3.190.0120.00617.17
8.3.180.0080.00616.88
8.3.170.0090.00919.00
8.3.160.0150.00317.21
8.3.150.0100.00018.76
8.3.140.0040.00416.40
8.3.130.0040.00416.85
8.3.120.0060.00618.82
8.3.110.0060.00320.94
8.3.100.0050.00930.80
8.3.90.0200.00732.15
8.3.80.0240.00528.45
8.3.70.0180.00627.83
8.3.60.0180.00227.92
8.3.50.0110.01228.86
8.3.40.0210.00529.74
8.3.30.0220.00728.08
8.3.20.0140.00828.26
8.3.10.0160.00631.10
8.3.00.0190.00531.85
8.2.300.0080.01122.17
8.2.290.0110.00818.61
8.2.280.0130.00516.69
8.2.270.0090.00922.25
8.2.260.0060.00316.60
8.2.250.0090.00316.85
8.2.240.0060.00317.41
8.2.230.0030.00522.58
8.2.220.0130.00437.54
8.2.210.0170.00732.15
8.2.200.0140.00628.21
8.2.190.0180.00727.96
8.2.180.0190.01231.73
8.2.170.0260.00528.28
8.2.160.0220.00730.25
8.2.150.0200.00531.60
8.2.140.0230.00331.10
8.2.130.0250.00031.85
8.2.120.0230.00229.25
8.2.110.0170.01028.96
8.2.100.0230.00427.63
8.2.90.0170.00827.64
8.2.80.0210.00428.16
8.2.70.0190.00427.66
8.2.60.0210.00427.78
8.2.50.0130.01227.82
8.2.40.0140.00928.42
8.2.30.0180.00628.39
8.2.20.0160.00627.83
8.2.10.0200.00328.42
8.2.00.0220.00428.37
8.1.330.0110.00821.97
8.1.320.0090.01116.19
8.1.310.0130.00316.36
8.1.300.0040.00416.30
8.1.290.0210.00834.19
8.1.280.0130.00831.73
8.1.270.0120.00330.74
8.1.260.0090.00531.94
8.1.250.0240.00332.81
8.1.240.0170.00630.72
8.1.230.0160.00730.14
8.1.220.0110.00728.09
8.1.210.0070.01128.27
8.1.200.0080.00527.38
8.1.190.0040.00927.31
8.1.180.0120.00127.82
8.1.170.0110.00228.04
8.1.160.0090.00328.23
8.1.150.0140.00428.17
8.1.140.0110.00528.18
8.1.130.0150.00828.90
8.1.120.0250.00227.49
8.1.110.0150.01027.50
8.1.100.0130.01227.49
8.1.90.0150.00627.44
8.1.80.0220.00227.51
8.1.70.0080.00827.45
8.1.60.0100.00427.58
8.1.50.0190.00627.49
8.1.40.0190.00427.55
8.1.30.0200.00527.57
8.1.20.0190.00627.58
8.1.10.0170.00627.55
8.1.00.0180.00727.49
8.0.300.0150.01028.78
8.0.290.0210.00527.08
8.0.280.0170.00627.96
8.0.270.0240.00127.73
8.0.260.0170.00628.82
8.0.250.0170.00627.27
8.0.240.0180.00527.30
8.0.230.0210.00327.25
8.0.220.0100.00427.21
8.0.210.0080.01127.21
8.0.200.0100.00327.25
8.0.190.0150.00527.29
8.0.180.0080.01227.22
8.0.170.0150.00927.21
8.0.160.0130.00727.25
8.0.150.0170.00627.19
8.0.140.0260.00427.22
8.0.130.0220.00025.46
8.0.120.0120.01127.17
8.0.110.0130.01127.16
8.0.100.0140.01027.25
8.0.90.0180.00527.29
8.0.80.0190.00623.81
8.0.70.0170.00627.27
8.0.60.0160.00727.24
8.0.50.0150.00827.18
8.0.30.0210.00827.29
8.0.20.0180.01023.91
8.0.10.0130.00527.23
8.0.00.0140.01127.15
7.4.330.0170.00226.54
7.4.320.0120.00827.04
7.4.300.0170.00727.07
7.4.290.0190.00427.04
7.4.280.0140.00826.99
7.4.270.0200.00327.04
7.4.260.0120.00925.41
7.4.250.0130.00927.07
7.4.240.0150.00727.09
7.4.230.0190.00427.04
7.4.220.0110.00623.55
7.4.210.0160.00721.74
7.4.200.0180.00427.07
7.4.190.0300.00637.54
7.4.180.0290.00637.54
7.4.160.0320.00737.54
7.4.150.0450.00437.54
7.4.140.0280.00537.54
7.4.130.0140.00623.54
7.4.120.0150.01126.95
7.4.110.0160.01026.93
7.4.100.0140.01326.88
7.4.90.0170.01526.93
7.4.80.0140.00926.96
7.4.70.0240.00026.99
7.4.60.0130.00827.03
7.4.50.0210.00927.08
7.4.40.0220.00726.90
7.4.30.0150.01426.97
7.4.20.0130.01626.98
7.4.10.0130.01027.04
7.4.00.0160.00426.86
7.3.330.0140.00326.87
7.3.320.0050.00725.28
7.3.310.0180.00326.89
7.3.300.0140.00526.89
7.3.290.0150.00421.62
7.3.280.0250.01137.54
7.3.270.0280.00337.54
7.3.260.0100.00926.92
7.3.250.0160.00037.54
7.3.240.0110.00826.94
7.3.230.0130.00526.88
7.3.220.0170.01026.97
7.3.210.0190.01026.99
7.3.200.0180.01026.97
7.3.190.0200.00826.97
7.3.180.0200.00926.91
7.3.170.0220.00726.89
7.3.160.0220.00726.93
7.3.150.0260.00526.99
7.3.140.0210.00926.88
7.3.130.0160.01226.87
7.3.120.0210.00927.03
7.3.110.0170.01226.91
7.3.100.0190.00626.93
7.3.90.0130.00626.91
7.3.80.0200.00826.97
7.3.70.0220.00626.92
7.3.60.0210.00326.92
7.3.50.0100.00826.87
7.3.40.0110.00626.96
7.3.30.0150.00726.93
7.3.20.0130.00726.90
7.3.10.0160.00226.91
7.3.00.0080.01126.97
7.2.340.0140.00626.90
7.2.330.0140.00727.02
7.2.320.0170.00827.15
7.2.310.0130.00827.02
7.2.300.0090.00927.02
7.2.290.0110.00727.08
7.2.280.0190.00127.14
7.2.270.0190.00926.99
7.2.260.0160.01027.09
7.2.250.0140.00927.11
7.2.240.0220.00427.15
7.2.230.0180.00727.04
7.2.220.0190.00527.12
7.2.210.0160.00727.05
7.2.200.0140.00926.96
7.2.190.0120.01127.03
7.2.180.0230.00627.03
7.2.170.0230.00927.07
7.2.160.0160.01127.16
7.2.150.0160.00927.11
7.2.140.0150.01027.04
7.2.130.0150.00427.10
7.2.120.0200.01127.05
7.2.110.0210.01027.10
7.2.100.0220.00927.06
7.2.90.0130.01827.09
7.2.80.0210.01127.14
7.2.70.0250.00726.99
7.2.60.0210.01427.09
7.2.50.0390.00327.00
7.2.40.0200.01227.08
7.2.30.0240.00727.03
7.2.20.0460.00627.20
7.2.10.0230.00727.05
7.2.00.0210.01027.08

preferences:
120.05 ms | 403 KiB | 5 Q