3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('property1' => 'foo', 'property2' => array('foo1', 'foo2') ); $arrayobject = new ArrayObject($array); $iterator = $arrayobject->getIterator(); while($iterator->valid()) { if(is_array($iterator->current())){ $arrayobject_2 = new ArrayObject($iterator->current()); $it = $arrayobject_2->getIterator(); while($it->valid()) { echo $it->key() . ' => ' . $it->current() . "\n"; $it->next(); } } else echo $iterator->key() . ' => ' . $iterator->current() . "\n"; $iterator->next(); }

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.4.130.0090.01017.68
8.4.120.0130.00820.50
8.4.110.0120.00922.39
8.4.100.0130.00817.52
8.4.90.0140.00718.01
8.4.80.0160.00417.87
8.4.70.0090.01118.01
8.4.60.0150.00617.59
8.4.50.0110.00918.78
8.4.40.0060.01023.81
8.4.30.0160.00319.41
8.4.20.0100.01017.52
8.4.10.0090.00019.53
8.3.250.0100.00618.95
8.3.240.0120.00716.39
8.3.230.0070.00416.58
8.3.220.0050.00317.10
8.3.210.0100.00816.58
8.3.200.0080.01018.38
8.3.190.0070.01216.37
8.3.180.0070.00216.59
8.3.170.0150.00318.74
8.3.160.0070.00720.23
8.3.150.0090.00916.59
8.3.140.0150.00316.98
8.3.130.0050.00318.33
8.3.120.0060.00320.61
8.3.110.0100.00020.94
8.3.100.0200.00016.77
8.3.90.0060.00326.77
8.3.80.0050.00519.36
8.3.70.0090.00618.55
8.3.60.0070.01418.18
8.3.50.0120.00516.53
8.3.40.0120.00318.84
8.3.30.0110.01118.66
8.3.20.0040.00420.82
8.3.10.0060.00323.39
8.3.00.0040.00420.96
8.2.290.0040.00420.50
8.2.280.0090.00716.63
8.2.270.0150.00419.06
8.2.260.0070.01118.65
8.2.250.0100.00717.17
8.2.240.0030.00717.32
8.2.230.0000.00922.58
8.2.220.0080.00024.06
8.2.210.0080.00026.77
8.2.200.0040.00418.88
8.2.190.0110.00418.41
8.2.180.0070.01418.54
8.2.170.0120.00318.86
8.2.160.0070.00720.36
8.2.150.0000.00824.18
8.2.140.0000.00724.66
8.2.130.0080.00022.02
8.2.120.0040.00426.35
8.2.110.0070.00421.18
8.2.100.0120.00017.82
8.2.90.0030.00617.78
8.2.80.0090.00018.98
8.2.70.0030.00718.04
8.2.60.0030.00618.03
8.2.50.0060.00318.10
8.2.40.0050.00220.45
8.2.30.0000.00821.10
8.2.20.0040.00417.97
8.2.10.0080.00018.09
8.2.00.0050.00318.12
8.1.330.0080.01016.81
8.1.320.0090.00916.21
8.1.310.0050.00318.52
8.1.300.0040.00417.88
8.1.290.0040.00430.84
8.1.280.0140.00425.92
8.1.270.0040.00423.99
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0090.00022.15
8.1.230.0110.00020.92
8.1.220.0040.00417.78
8.1.210.0040.00418.77
8.1.200.0000.00817.23
8.1.190.0080.00017.00
8.1.180.0090.00018.10
8.1.170.0000.00818.71
8.1.160.0000.00718.89
8.1.150.0070.00020.70
8.1.140.0020.00519.64
8.1.130.0070.00018.84
8.1.120.0070.00017.45
8.1.110.0040.00417.38
8.1.100.0000.00817.34
8.1.90.0040.00417.50
8.1.80.0050.00217.46
8.1.70.0070.00017.44
8.1.60.0040.00417.60
8.1.50.0000.00817.48
8.1.40.0040.00717.47
8.1.30.0060.00317.61
8.1.20.0000.00817.65
8.1.10.0040.00417.54
8.1.00.0000.00717.47
8.0.300.0080.00020.04
8.0.290.0000.00816.75
8.0.280.0000.00718.35
8.0.270.0080.00016.86
8.0.260.0030.00316.80
8.0.250.0000.00716.98
8.0.240.0040.00416.83
8.0.230.0040.00316.99
8.0.220.0030.00316.89
8.0.210.0000.00716.84
8.0.200.0060.00016.97
8.0.190.0030.00516.85
8.0.180.0000.00716.89
8.0.170.0070.00016.96
8.0.160.0000.00816.79
8.0.150.0070.00016.86
8.0.140.0050.00216.93
8.0.130.0000.00613.25
8.0.120.0060.00316.77
8.0.110.0050.00216.81
8.0.100.0000.00816.73
8.0.90.0000.00716.76
8.0.80.0100.01016.94
8.0.70.0080.00016.79
8.0.60.0000.00816.81
8.0.50.0070.00016.92
8.0.30.0090.01317.21
8.0.20.0110.00717.41
8.0.10.0040.00416.83
8.0.00.0000.01816.64
7.4.330.0030.00315.55
7.4.320.0000.00616.61
7.4.300.0000.00616.55
7.4.290.0060.00316.54
7.4.280.0070.00016.54
7.4.270.0070.00016.62
7.4.260.0030.00313.29
7.4.250.0070.00016.57
7.4.240.0030.00516.52
7.4.230.0060.00016.52
7.4.220.0100.00716.49
7.4.210.0070.01016.47
7.4.200.0030.00316.63
7.4.160.0120.00516.58
7.4.150.0070.01117.40
7.4.140.0150.00717.86
7.4.130.0120.00616.49
7.4.120.0100.01016.44
7.4.110.0070.01116.55
7.4.100.0060.01116.47
7.4.90.0180.00316.36
7.4.80.0100.01019.39
7.4.70.0090.00616.30
7.4.60.0100.00716.43
7.4.50.0030.01116.48
7.4.40.0040.01216.34
7.4.30.0060.01216.40
7.4.00.0050.01015.06
7.3.330.0050.00012.94
7.3.320.0000.00512.92
7.3.310.0000.00716.05
7.3.300.0000.00716.25
7.3.290.0050.00216.19
7.3.280.0080.00916.20
7.3.270.0030.01317.40
7.3.260.0130.00916.48
7.3.250.0140.00416.41
7.3.240.0080.01316.38
7.3.230.0070.01016.45
7.3.210.0110.00716.44
7.3.200.0100.00616.49
7.3.190.0060.01116.46
7.3.180.0110.00816.53
7.3.170.0040.01116.26
7.3.160.0100.00716.49
7.3.120.0030.01314.70
7.3.110.0000.01114.74
7.3.100.0030.01614.52
7.3.90.0110.00414.74
7.3.80.0040.00814.72
7.3.70.0060.00314.84
7.3.60.0030.00614.83
7.3.50.0060.00614.87
7.3.40.0040.00814.81
7.3.30.0090.00414.64
7.3.20.0060.00316.25
7.3.10.0070.00716.75
7.3.00.0080.00816.64
7.2.330.0170.00716.58
7.2.320.0070.01016.56
7.2.310.0060.01616.70
7.2.300.0100.00616.51
7.2.290.0170.00016.45
7.2.250.0070.01115.13
7.2.240.0060.01014.82
7.2.230.0140.00015.12
7.2.220.0100.00615.21
7.2.210.0080.00415.31
7.2.200.0060.00914.91
7.2.190.0060.00615.04
7.2.180.0030.01015.18
7.2.170.0060.00614.74
7.2.160.0080.00815.06
7.2.150.0060.00916.92
7.2.140.0060.00616.81
7.2.130.0030.00916.66
7.2.120.0050.00516.76
7.2.110.0040.01116.73
7.2.100.0100.00716.95
7.2.90.0030.01016.92
7.2.80.0010.01216.78
7.2.70.0030.01016.86
7.2.60.0150.00616.52
7.2.50.0090.00616.88
7.2.40.0000.01317.06
7.2.30.0000.01316.86
7.2.20.0000.01516.75
7.2.10.0040.01116.96
7.2.00.0070.00717.99
7.1.330.0060.00615.82
7.1.320.0070.00715.64
7.1.310.0040.00815.75
7.1.300.0060.01015.45
7.1.290.0000.00815.79
7.1.280.0080.00315.93
7.1.270.0040.00415.56
7.1.260.0050.00815.50
7.1.250.0030.00915.40
7.1.240.0040.00815.58
7.1.230.0040.00815.79
7.1.220.0000.01015.81
7.1.210.0040.00715.63
7.1.200.0070.00515.63
7.1.190.0030.00615.41
7.1.180.0130.00015.85
7.1.170.0060.01215.80
7.1.160.0060.00815.57
7.1.150.0030.01015.80
7.1.140.0070.00715.59
7.1.130.0060.00315.89
7.1.120.0070.00715.51
7.1.110.0060.00615.69
7.1.100.0080.00416.74
7.1.90.0040.00415.91
7.1.80.0040.00415.57
7.1.70.0060.00616.33
7.1.60.0090.00824.48
7.1.50.1340.00724.31
7.1.40.0140.00624.16
7.1.30.0080.01124.28
7.1.20.0100.00824.18
7.1.10.0000.00915.33
7.1.00.0770.01215.23
7.0.330.0060.00315.37
7.0.320.0140.00015.31
7.0.310.0080.00015.34
7.0.300.0000.01315.41
7.0.290.0070.00715.46
7.0.280.0090.00615.33
7.0.270.0040.01115.29
7.0.260.0070.00415.31
7.0.250.0070.00415.12
7.0.240.0040.00815.16
7.0.230.0030.00915.52
7.0.220.0060.00915.20
7.0.210.0040.00815.32
7.0.200.0210.00815.13
7.0.190.1250.00715.13
7.0.180.1060.00714.94
7.0.170.0100.00515.05
7.0.160.1050.00515.04
7.0.150.0050.00714.96
7.0.140.0180.00814.96
7.0.130.0770.00715.12
7.0.120.0070.00515.17
7.0.110.0080.00315.07
7.0.100.0050.00814.92
7.0.90.0670.01114.94
7.0.80.0650.00815.04
7.0.70.0620.00715.00
7.0.60.0640.00514.80
7.0.50.0660.00615.01
7.0.40.0650.00713.90
7.0.30.0590.00714.04
7.0.20.0620.00714.01
7.0.10.0550.00714.22
7.0.00.0580.00614.01
5.6.400.0070.01014.59
5.6.390.0070.00414.60
5.6.380.0100.00014.48
5.6.370.0110.00014.57
5.6.360.0070.00714.30
5.6.350.0070.00313.85
5.6.340.0070.01014.52
5.6.330.0070.00414.14
5.6.320.0060.00914.66
5.6.310.0100.00014.49
5.6.300.0120.00313.86
5.6.290.0040.01414.27
5.6.280.0060.00914.09
5.6.270.0030.00714.44
5.6.260.0100.00713.99
5.6.250.0060.00313.96
5.6.240.0040.01114.18
5.6.230.0040.00714.37
5.6.220.0100.00714.13
5.6.210.0060.00914.49
5.6.200.0030.01014.13
5.6.190.0120.00014.58
5.6.180.0000.01014.32
5.6.170.0000.01214.34
5.6.160.0060.00714.11
5.6.150.0100.00714.36
5.6.140.0030.00914.12
5.6.130.0120.00614.39
5.6.120.0090.00014.34
5.6.110.0070.00314.41
5.6.100.0070.00714.40
5.6.90.0030.01014.15
5.6.80.0030.01014.52
5.6.70.0070.00714.18
5.6.60.0000.01214.40
5.6.50.0000.01113.86
5.6.40.0000.01614.29
5.6.30.0040.01114.15
5.6.20.0030.01314.38
5.6.10.0060.00614.06
5.6.00.0030.00614.27

preferences:
29.55 ms | 403 KiB | 5 Q