3v4l.org

run code in 300+ PHP versions simultaneously
<?php $object = new stdClass; $object->property1 = 'property 1'; $object->property2 = 'property 2'; $array = array( array('pear', 'apple'), array('banana', 'coconut'), 'orange', // This is not an array element $object ); $iterator = new RecursiveArrayIterator($array); foreach(new RecursiveIteratorIterator($iterator) as $value) { echo $value . PHP_EOL; }

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.0070.00716.50
8.3.50.0100.00723.01
8.3.40.0140.00018.79
8.3.30.0100.00319.06
8.3.20.0040.00420.35
8.3.10.0070.00023.60
8.3.00.0000.00819.38
8.2.180.0040.01816.38
8.2.170.0060.00918.96
8.2.160.0140.00022.96
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0100.00326.16
8.2.120.0060.00321.01
8.2.110.0060.00322.25
8.2.100.0120.00017.91
8.2.90.0000.00819.17
8.2.80.0080.00017.97
8.2.70.0050.00317.50
8.2.60.0040.00417.80
8.2.50.0030.00618.07
8.2.40.0040.00418.16
8.2.30.0070.00017.94
8.2.20.0040.00417.67
8.2.10.0000.00718.11
8.2.00.0080.00017.60
8.1.280.0100.01025.92
8.1.270.0080.00023.92
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0060.00323.79
8.1.230.0040.00819.01
8.1.220.0080.00017.74
8.1.210.0050.00318.77
8.1.200.0000.01317.25
8.1.190.0050.00317.23
8.1.180.0000.00918.10
8.1.170.0060.00318.51
8.1.160.0040.00421.95
8.1.150.0090.00018.98
8.1.140.0000.00717.36
8.1.130.0030.00317.84
8.1.120.0000.00717.46
8.1.110.0080.00017.44
8.1.100.0050.00317.46
8.1.90.0000.00717.45
8.1.80.0000.00817.41
8.1.70.0070.00017.39
8.1.60.0030.00517.54
8.1.50.0030.00617.43
8.1.40.0040.00417.52
8.1.30.0080.00017.65
8.1.20.0040.00417.68
8.1.10.0000.00717.55
8.1.00.0040.00417.36
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00718.47
8.0.270.0030.00517.17
8.0.260.0050.00317.25
8.0.250.0040.00416.99
8.0.240.0040.00416.82
8.0.230.0000.00716.94
8.0.220.0030.00316.88
8.0.210.0040.00416.87
8.0.200.0000.00716.97
8.0.190.0080.00016.97
8.0.180.0000.00816.90
8.0.170.0050.00316.94
8.0.160.0050.00316.93
8.0.150.0000.00716.78
8.0.140.0040.00716.89
8.0.130.0080.00013.31
8.0.120.0000.00716.95
8.0.110.0030.00516.93
8.0.100.0040.00416.76
8.0.90.0000.00816.79
8.0.80.0000.01516.95
8.0.70.0030.00516.84
8.0.60.0040.00416.84
8.0.50.0000.00716.83
8.0.30.0110.01116.99
8.0.20.0080.01117.40
8.0.10.0000.00816.82
8.0.00.0110.00616.73
7.4.330.0000.00515.00
7.4.320.0030.00316.61
7.4.300.0000.00716.51
7.4.290.0000.00616.36
7.4.280.0000.00716.59
7.4.270.0000.00716.61
7.4.260.0030.00716.48
7.4.250.0070.00016.55
7.4.240.0010.00616.50
7.4.230.0040.00416.67
7.4.220.0070.01116.37
7.4.210.0080.00816.45
7.4.200.0000.00716.59
7.4.160.0080.01516.50
7.4.150.0100.00717.40
7.4.140.0120.00517.86
7.4.130.0070.01016.56
7.4.120.0110.00916.64
7.4.110.0060.01016.44
7.4.100.0130.00316.55
7.4.90.0090.00916.50
7.4.80.0030.01819.39
7.4.70.0130.01016.45
7.4.60.0100.00716.59
7.4.50.0040.00416.55
7.4.40.0060.01016.51
7.4.30.0080.00816.47
7.4.00.0070.00614.87
7.3.330.0000.00513.19
7.3.320.0000.00613.00
7.3.310.0030.00516.11
7.3.300.0000.00616.23
7.3.290.0040.01116.30
7.3.280.0080.00716.26
7.3.270.0100.01317.40
7.3.260.0000.01716.22
7.3.250.0050.01316.44
7.3.240.0070.01016.42
7.3.230.0090.00616.39
7.3.210.0100.00716.28
7.3.200.0100.00619.39
7.3.190.0030.01316.43
7.3.180.0140.00316.57
7.3.170.0080.00716.50
7.3.160.0080.00816.27
7.3.120.0090.00614.81
7.3.110.0030.01515.01
7.3.100.0100.00714.84
7.3.90.0060.00914.70
7.3.80.0100.00714.93
7.3.70.0040.00414.63
7.3.60.0040.00414.77
7.3.50.0070.01014.48
7.3.40.0040.01214.69
7.3.30.0070.00714.74
7.3.20.0140.00316.40
7.3.10.0040.01416.77
7.3.00.0040.01116.68
7.2.330.0100.01016.75
7.2.320.0070.01016.60
7.2.310.0060.01216.59
7.2.300.0060.01016.70
7.2.290.0080.00816.55
7.2.250.0070.01414.93
7.2.240.0060.00915.00
7.2.230.0040.01514.75
7.2.220.0090.00915.15
7.2.210.0100.00715.05
7.2.200.0110.00015.23
7.2.190.0070.00315.21
7.2.180.0060.00615.07
7.2.170.0100.00314.86
7.2.60.0090.00616.99
7.2.00.0070.00719.63
7.1.330.0070.00715.90
7.1.320.0030.00515.64
7.1.310.0000.00915.85
7.1.300.0030.00615.69
7.1.290.0110.00415.85
7.1.280.0040.00815.68
7.1.270.0040.00415.35
7.1.260.0100.00315.69
7.1.200.0030.01015.57
7.1.100.0040.00817.82
7.1.70.0000.01417.13
7.1.60.0040.02119.40
7.1.50.0110.01416.89
7.1.00.0000.07722.30
7.0.200.0030.00716.79
7.0.140.0030.07321.96
7.0.60.0070.04019.79
7.0.50.0070.06017.81
7.0.40.0130.07019.98
7.0.30.0230.04320.17
7.0.20.0130.04320.21
7.0.10.0030.09320.13
7.0.00.0100.07320.30
5.6.280.0000.07720.98
5.6.210.0100.08320.64
5.6.200.0000.05318.15
5.6.190.0030.04720.32
5.6.180.0300.04020.49
5.6.170.0130.04720.48
5.6.160.0070.04720.51
5.6.150.0030.06018.15
5.6.140.0000.04718.21
5.6.130.0130.07018.18
5.6.120.0030.05720.98
5.6.110.0130.07020.97
5.6.100.0030.05720.98
5.6.90.0070.07720.95
5.6.80.0000.04720.35
5.5.350.0170.03320.42
5.5.340.0070.03718.01
5.5.330.0030.07720.23
5.5.320.0100.06320.30
5.5.310.0300.07720.20
5.5.300.0070.03718.01
5.5.290.0100.05717.89
5.5.280.0030.04320.80
5.5.270.0130.08020.67
5.5.260.0130.07020.88
5.5.250.0170.06320.68
5.5.240.0070.07020.35
5.4.450.0670.06319.32
5.4.440.0570.06319.24
5.4.430.0070.06019.52
5.4.420.0830.05319.10
5.4.410.0000.06018.72
5.4.400.0270.07318.78
5.4.390.0370.05318.68
5.4.380.0100.05718.59
5.4.370.0230.03718.49
5.4.360.0030.04018.56
5.4.350.0030.03911.98
5.4.340.0070.03711.97
5.4.320.0090.03312.45
5.4.310.0040.03912.45
5.4.300.0060.03512.45
5.4.290.0040.04012.46
5.4.280.0030.03912.35
5.4.270.0030.03812.35
5.4.260.0060.03612.35
5.4.250.0050.03712.35
5.4.240.0070.03512.35
5.4.230.0060.03712.34
5.4.220.0070.03412.34
5.4.210.0050.03512.34
5.4.200.0040.03912.34
5.4.190.0070.03412.34
5.4.180.0040.03712.34
5.4.170.0040.04212.35
5.4.160.0080.03412.34
5.4.150.0080.03412.34
5.4.140.0060.03612.02
5.4.130.0070.03312.02
5.4.120.0040.03511.97
5.4.110.0030.03711.96
5.4.100.0090.03111.97
5.4.90.0060.03811.97
5.4.80.0080.03411.97
5.4.70.0060.03411.96
5.4.60.0050.03511.96
5.4.50.0040.03611.96
5.4.40.0050.03511.95
5.4.30.0050.03511.95
5.4.20.0070.04311.95
5.4.10.0070.03311.95
5.4.00.0080.03211.44
5.3.290.0070.03712.80
5.3.280.0080.03412.71
5.3.270.0030.04112.72
5.3.260.0060.03912.72
5.3.250.0060.03812.72
5.3.240.0100.03512.72
5.3.230.0030.04012.71
5.3.220.0060.03612.68
5.3.210.0070.03812.68
5.3.200.0060.03712.68
5.3.190.0080.04112.68
5.3.180.0060.03512.67
5.3.170.0080.03812.67
5.3.160.0030.04112.67
5.3.150.0090.03612.67
5.3.140.0110.03112.66
5.3.130.0100.03712.66
5.3.120.0070.03812.66
5.3.110.0040.04112.66
5.3.100.0070.03612.12
5.3.90.0020.04112.08
5.3.80.0050.03712.07
5.3.70.0110.03212.07
5.3.60.0090.03412.07
5.3.50.0080.03412.00
5.3.40.0050.03812.00
5.3.30.0070.03311.95
5.3.20.0070.03511.73
5.3.10.0060.03611.69
5.3.00.0040.03911.68
5.2.170.0030.0349.18
5.2.160.0040.0309.18
5.2.150.0060.0299.18
5.2.140.0050.0309.17
5.2.130.0050.0289.14
5.2.120.0050.0309.14
5.2.110.0100.0319.14
5.2.100.0050.0289.14
5.2.90.0070.0279.14
5.2.80.0050.0329.14
5.2.70.0060.0299.14
5.2.60.0080.0329.09
5.2.50.0040.0369.06
5.2.40.0050.0299.04
5.2.30.0030.0319.01
5.2.20.0030.0309.00
5.2.10.0020.0308.92
5.2.00.0030.0308.78
5.1.60.0040.0248.07
5.1.50.0050.0248.07
5.1.40.0030.0258.05
5.1.30.0030.0318.39
5.1.20.0040.0288.42
5.1.10.0040.0268.14
5.1.00.0030.0278.14
5.0.50.0070.0176.62
5.0.40.0040.0196.48
5.0.30.0030.0316.29
5.0.20.0030.0206.26
5.0.10.0060.0186.24
5.0.00.0040.0306.23
4.4.90.0040.0144.78
4.4.80.0030.0204.75
4.4.70.0030.0194.75
4.4.60.0000.0184.75
4.4.50.0030.0144.77
4.4.40.0040.0244.70
4.4.30.0030.0154.76
4.4.20.0030.0164.84
4.4.10.0040.0144.84
4.4.00.0040.0264.76
4.3.110.0030.0214.67
4.3.100.0030.0144.66
4.3.90.0030.0144.63
4.3.80.0030.0264.59
4.3.70.0050.0134.63
4.3.60.0040.0194.63
4.3.50.0020.0164.63
4.3.40.0050.0304.54
4.3.30.0020.0163.28
4.3.20.0010.0173.26
4.3.10.0030.0143.22
4.3.00.0070.0237.13

preferences:
40.36 ms | 401 KiB | 5 Q