3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new SimpleXMLElement( '<person> <child role="son"> <child role="daughter"/> </child> <child role="daughter"> <child role="son"> <child role="son"/> </child> </child> </person>'); foreach ($xml->children() as $second_gen) { echo ' The person begot a ' . $second_gen['role']; foreach ($second_gen->children() as $third_gen) { echo ' who begot a ' . $third_gen['role'] . ';'; foreach ($third_gen->children() as $fourth_gen) { echo ' and that ' . $third_gen['role'] . ' begot a ' . $fourth_gen['role']; } } }

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.0040.01118.56
8.3.50.0110.00822.18
8.3.40.0090.00918.71
8.3.30.0070.00719.39
8.3.20.0070.00020.59
8.3.10.0040.00422.35
8.3.00.0040.00422.65
8.2.180.0120.00916.50
8.2.170.0140.00722.96
8.2.160.0120.00321.10
8.2.150.0060.00324.18
8.2.140.0000.00824.66
8.2.130.0110.00426.16
8.2.120.0090.00019.73
8.2.110.0060.00319.64
8.2.100.0050.00817.88
8.2.90.0040.00419.42
8.2.80.0000.00818.00
8.2.70.0030.00518.00
8.2.60.0000.00818.28
8.2.50.0000.00818.10
8.2.40.0030.00620.73
8.2.30.0070.00018.29
8.2.20.0040.00418.04
8.2.10.0040.00417.96
8.2.00.0090.00317.86
8.1.280.0110.00425.92
8.1.270.0030.00622.19
8.1.260.0080.00026.35
8.1.250.0030.00528.09
8.1.240.0050.00522.39
8.1.230.0080.00418.07
8.1.220.0060.00317.89
8.1.210.0040.00418.77
8.1.200.0000.00917.48
8.1.190.0080.00017.48
8.1.180.0050.00318.10
8.1.170.0030.00518.68
8.1.160.0030.00622.19
8.1.150.0000.00918.83
8.1.140.0030.00517.54
8.1.130.0070.00017.98
8.1.120.0030.00517.74
8.1.110.0040.00417.54
8.1.100.0000.00817.68
8.1.90.0000.00717.75
8.1.80.0050.00317.55
8.1.70.0000.00717.58
8.1.60.0030.00617.84
8.1.50.0040.00417.66
8.1.40.0040.00417.59
8.1.30.0080.00017.90
8.1.20.0030.00517.94
8.1.10.0040.00417.71
8.1.00.0030.00617.84
8.0.300.0000.00820.19
8.0.290.0000.00816.88
8.0.280.0000.00718.66
8.0.270.0040.00417.41
8.0.260.0040.00416.98
8.0.250.0070.00017.24
8.0.240.0070.00317.06
8.0.230.0030.00317.14
8.0.220.0040.00417.06
8.0.210.0070.00017.16
8.0.200.0040.00417.00
8.0.190.0040.00417.11
8.0.180.0040.00417.04
8.0.170.0060.00317.19
8.0.160.0050.00217.11
8.0.150.0070.00017.07
8.0.140.0070.00017.14
8.0.130.0060.00013.59
8.0.120.0000.00816.95
8.0.110.0040.00417.14
8.0.100.0000.00717.12
8.0.90.0080.00017.02
8.0.80.0080.00817.05
8.0.70.0040.00417.02
8.0.60.0000.00816.98
8.0.50.0000.00817.11
8.0.30.0120.00917.25
8.0.20.0090.01017.40
8.0.10.0000.00817.03
8.0.00.0080.00916.95
7.4.330.0060.00015.34
7.4.320.0070.00016.65
7.4.300.0000.00616.84
7.4.290.0000.00816.79
7.4.280.0060.00316.72
7.4.270.0030.00316.77
7.4.260.0030.00616.89
7.4.250.0040.00416.85
7.4.240.0050.00216.57
7.4.230.0070.00016.72
7.4.220.0100.01316.91
7.4.210.0080.00816.70
7.4.200.0040.00416.71
7.4.190.0000.00816.84
7.4.160.0090.00916.69
7.4.150.0070.01017.40
7.4.140.0100.01217.86
7.4.130.0090.00816.67
7.4.120.0110.00616.70
7.4.110.0060.01216.69
7.4.100.0110.01116.78
7.4.90.0100.00716.70
7.4.80.0100.01319.39
7.4.70.0140.00416.68
7.4.60.0070.01016.57
7.4.50.0050.00316.56
7.4.40.0040.01122.77
7.4.30.0100.00616.50
7.4.00.0070.01015.00
7.3.330.0030.00313.39
7.3.320.0000.00513.38
7.3.310.0030.00316.50
7.3.300.0000.00716.49
7.3.290.0100.00316.36
7.3.280.0100.00916.42
7.3.270.0150.00317.40
7.3.260.0110.00616.66
7.3.250.0110.00716.55
7.3.240.0140.00316.36
7.3.230.0130.00316.73
7.3.210.0070.01016.68
7.3.200.0130.00319.39
7.3.190.0120.00416.70
7.3.180.0000.01616.71
7.3.170.0160.00616.57
7.3.160.0040.01116.53
7.3.120.0070.01115.03
7.2.330.0140.00316.64
7.2.320.0110.01416.99
7.2.310.0150.00917.00
7.2.300.0160.00316.85
7.2.290.0080.00816.91
7.2.00.0030.00919.75
7.1.70.0000.01117.39
7.1.60.0070.01417.38
7.1.50.0000.01117.16
7.1.40.0090.00617.04
7.1.30.0000.01317.04
7.1.20.0000.01317.04
7.1.10.0030.00617.04
7.1.00.0050.00217.04
7.0.200.0000.01117.04
7.0.190.0040.00417.04
7.0.180.0030.01317.04
7.0.170.0000.01117.04
7.0.160.0050.00317.04
7.0.150.0040.00417.04
7.0.140.0080.00017.04
7.0.130.0030.00617.04
7.0.120.0000.00817.04
7.0.110.0050.00317.04
7.0.100.0000.00717.04
7.0.90.0050.00817.04
7.0.80.0000.00817.04
7.0.70.0060.00817.04
7.0.60.0100.00617.04
7.0.50.0040.00417.04
7.0.40.0000.01717.04
7.0.30.0070.00717.04
7.0.20.0050.00517.04
7.0.10.0000.01517.04
7.0.00.0040.01217.04
5.6.300.0060.04520.91
5.6.290.0070.03720.90
5.6.280.0060.07121.07
5.6.270.0000.04920.98
5.6.260.0030.04421.11
5.6.250.0000.07721.04
5.6.240.0030.05021.00
5.6.230.0070.05020.96
5.6.220.0000.04321.01
5.6.210.0030.08121.11
5.6.200.0130.07321.07
5.6.190.0030.04120.96
5.6.180.0070.05420.76
5.6.170.0000.04521.16
5.6.160.0070.06520.87
5.6.150.0000.04520.92
5.6.140.0000.05620.80
5.6.130.0030.08220.93
5.6.120.0000.04921.04
5.6.110.0000.04821.08
5.6.100.0030.04120.92
5.6.90.0100.06121.13
5.6.80.0060.04520.16
5.6.70.0000.07020.30
5.6.60.0030.04320.30
5.6.50.0030.04920.32
5.6.40.0130.03520.32
5.6.30.0000.05820.39
5.6.20.0060.03820.16
5.6.10.0070.04720.26
5.6.00.0060.03520.56
5.5.380.0060.03917.53
5.5.370.0000.06317.65
5.5.360.0030.07317.55
5.5.350.0030.04117.46
5.5.340.0030.04318.07
5.5.330.0000.04318.20
5.5.320.0030.04818.16
5.5.310.0100.06418.16
5.5.300.0030.08518.07
5.5.290.0130.06717.86
5.5.280.0100.05418.11
5.5.270.0070.04318.09
5.5.260.0100.05718.09
5.5.250.0030.06617.91
5.5.240.0060.03517.39
5.5.230.0000.05317.21
5.5.220.0030.04217.54
5.5.210.0030.04317.34
5.5.200.0030.04017.46
5.5.190.0030.03917.45
5.5.180.0000.04217.54
5.5.160.0000.04417.54
5.5.150.0030.03917.28
5.5.140.0030.04017.24
5.5.130.0100.03217.45
5.5.120.0030.03817.23
5.5.110.0000.04317.45
5.5.100.0030.04117.13
5.5.90.0070.03717.41
5.5.80.0030.03717.36
5.5.70.0040.03917.15
5.5.60.0030.03717.40
5.5.50.0030.03617.07
5.5.40.0000.04517.34
5.5.30.0030.04817.30
5.5.20.0070.03817.38
5.5.10.0030.03717.14
5.5.00.0040.05017.43
5.4.450.0030.04519.57
5.4.440.0000.04719.53
5.4.430.0030.04619.59
5.4.420.0000.04219.53
5.4.410.0030.05319.32
5.4.400.0100.07119.12
5.4.390.0000.07718.98
5.4.380.0030.03718.99
5.4.370.0070.04919.23
5.4.360.0070.03418.99
5.4.350.0000.04119.23
5.4.340.0000.04319.28
5.4.320.0000.05019.21
5.4.310.0000.04219.27
5.4.300.0000.04119.26
5.4.290.0100.04318.98
5.4.280.0000.04618.98
5.4.270.0000.04219.14
5.4.260.0000.04118.98
5.4.250.0030.04519.11
5.4.240.0070.05418.95
5.4.230.0000.04119.12
5.4.220.0100.03119.17
5.4.210.0030.06019.27
5.4.200.0000.03918.98
5.4.190.0070.04019.23
5.4.180.0030.03819.09
5.4.170.0000.03919.21
5.4.160.0070.03418.94
5.4.150.0000.04219.11
5.4.140.0000.04316.45
5.4.130.0030.03616.55
5.4.120.0000.04516.67
5.4.110.0070.03716.65
5.4.100.0240.02016.78
5.4.90.0030.03716.69
5.4.80.0030.03616.47
5.4.70.0070.03716.46
5.4.60.0070.03416.71
5.4.50.0030.03816.84
5.4.40.0030.03416.46
5.4.30.0000.03716.82
5.4.20.0000.04116.90
5.4.10.0000.03916.67
5.4.00.0030.03316.04
5.3.290.0100.03215.54
5.3.280.0000.03715.54
5.3.270.0060.03815.54
5.3.260.0070.03515.54
5.3.250.0000.04115.54
5.3.240.0030.03615.54
5.3.230.0030.04015.54
5.3.220.0030.03615.54
5.3.210.0030.03615.54
5.3.200.0000.04115.54
5.3.190.0030.03715.54
5.3.180.0170.03715.54
5.3.170.0030.03615.54
5.3.160.0030.03615.54
5.3.150.0000.03815.54
5.3.140.0040.03615.54
5.3.130.0110.02915.54
5.3.120.0070.04315.54
5.3.110.0000.04615.54
5.3.100.0000.03715.54
5.3.90.0000.03915.54
5.3.80.0030.04815.54
5.3.70.0030.03615.54
5.3.60.0070.03315.54
5.3.50.0030.03515.54
5.3.40.0000.03715.54
5.3.30.0000.04715.54
5.3.20.0170.03715.54
5.3.10.0040.03215.54
5.3.00.0030.06015.54
5.2.170.0000.03615.54
5.2.160.0030.02915.54
5.2.150.0000.03315.54
5.2.140.0000.03015.54
5.2.130.0000.03315.54
5.2.120.0030.03115.54
5.2.110.0030.02615.54
5.2.100.0030.06315.54
5.2.90.0030.04015.54
5.2.80.0000.04715.54
5.2.70.0070.02915.54
5.2.60.0000.03115.54
5.2.50.0000.04015.54
5.2.40.0030.04715.54
5.2.30.0000.06915.54
5.2.20.0000.05415.54
5.2.10.0070.05315.54
5.2.00.0000.03115.54
5.1.60.0030.03515.54
5.1.50.0100.02315.54
5.1.40.0000.03415.54
5.1.30.0070.02115.54
5.1.20.0030.05915.54
5.1.10.0030.02515.54
5.1.00.0060.04215.54
5.0.50.0000.02815.54
5.0.40.0000.02215.54
5.0.30.0060.03115.54
5.0.20.0000.02115.54
5.0.10.0000.02215.54
5.0.00.0070.02715.54
4.4.90.0000.02015.54
4.4.80.0030.02815.54
4.4.70.0030.02915.54
4.4.60.0000.02315.54
4.4.50.0030.01315.54
4.4.40.0000.02615.54
4.4.30.0030.01315.54
4.4.20.0040.01515.54
4.4.10.0000.01715.54
4.4.00.0000.02815.54
4.3.110.0030.01315.54
4.3.100.0030.01315.54
4.3.90.0070.01315.54
4.3.80.0000.02815.54
4.3.70.0030.01315.54
4.3.60.0040.01415.54
4.3.50.0070.01015.54
4.3.40.0040.02815.54
4.3.30.0030.02115.54
4.3.20.0000.02715.54
4.3.10.0000.01715.54
4.3.00.0030.01315.54

preferences:
48.14 ms | 401 KiB | 5 Q