3v4l.org

run code in 300+ PHP versions simultaneously
<?php $simpsons = array(); $simpsons[0] = array("name"=>"Abe","parent"=>-1); $simpsons[1] = array("name"=>"Homer","parent"=>0); // Homer's parent is Abe $simpsons[2] = array("name"=>"Bart","parent"=>1); // Bart's parent is Homer $simpsons[3] = array("name"=>"Lisa","parent"=>1); // Lisa's parent is Homer $simpsons[4] = array("name"=>"Maggie","parent"=>1); // Maggie's parent is Homer function get_children($simpsons, $parent) { foreach ($simpsons as $index=>$onesimpson) { if ($onesimpson["parent"]==$parent) { echo "$onesimpson[name] is a child of ".$simpsons[$parent]["name"].".<br />\n"; get_children($simpsons, $index); } } } get_children($simpsons, 0); ?>

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.0110.00716.63
8.3.50.0110.00821.98
8.3.40.0120.00318.88
8.3.30.0060.00919.18
8.3.20.0040.00420.24
8.3.10.0080.00023.65
8.3.00.0090.00317.50
8.2.180.0120.00618.23
8.2.170.0070.00722.96
8.2.160.0100.00320.35
8.2.150.0070.00024.18
8.2.140.0050.00324.66
8.2.130.0060.00326.16
8.2.120.0000.00822.08
8.2.110.0070.00321.02
8.2.100.0070.00617.76
8.2.90.0020.00519.20
8.2.80.0050.00318.16
8.2.70.0030.00617.61
8.2.60.0050.00318.02
8.2.50.0080.00318.07
8.2.40.0040.00418.22
8.2.30.0040.00418.13
8.2.20.0000.00717.76
8.2.10.0080.00019.81
8.2.00.0000.00917.66
8.1.280.0100.00325.92
8.1.270.0050.00323.75
8.1.260.0080.00026.35
8.1.250.0030.00628.09
8.1.240.0050.00521.98
8.1.230.0090.00322.75
8.1.220.0040.00417.78
8.1.210.0050.00520.67
8.1.200.0030.00617.48
8.1.190.0040.00417.28
8.1.180.0030.00618.10
8.1.170.0060.00318.47
8.1.160.0070.00021.93
8.1.150.0040.00418.61
8.1.140.0040.00417.38
8.1.130.0040.00417.83
8.1.120.0070.00017.47
8.1.110.0080.00017.37
8.1.100.0030.00517.53
8.1.90.0000.00817.52
8.1.80.0040.00417.35
8.1.70.0030.00317.39
8.1.60.0060.00317.54
8.1.50.0000.00817.43
8.1.40.0040.00417.54
8.1.30.0030.00517.59
8.1.20.0040.00417.70
8.1.10.0040.00417.54
8.1.00.0040.00417.39
8.0.300.0070.00020.03
8.0.290.0040.00417.30
8.0.280.0000.00718.53
8.0.270.0030.00317.27
8.0.260.0040.00417.18
8.0.250.0000.00716.98
8.0.240.0040.00416.91
8.0.230.0080.00016.87
8.0.220.0060.00016.79
8.0.210.0030.00316.84
8.0.200.0000.00716.97
8.0.190.0070.00016.98
8.0.180.0040.00416.83
8.0.170.0050.00216.82
8.0.160.0040.00416.86
8.0.150.0000.00816.80
8.0.140.0000.00716.77
8.0.130.0000.00513.38
8.0.120.0080.00016.77
8.0.110.0000.00816.86
8.0.100.0060.00316.70
8.0.90.0030.00516.88
8.0.80.0070.01016.89
8.0.70.0060.00316.77
8.0.60.0040.00416.90
8.0.50.0050.00216.74
8.0.30.0070.01217.06
8.0.20.0080.01317.40
8.0.10.0040.00416.97
8.0.00.0110.00716.81
7.4.330.0000.00615.02
7.4.320.0060.00016.57
7.4.300.0060.00016.53
7.4.290.0060.00316.55
7.4.280.0040.00516.52
7.4.270.0030.00316.67
7.4.260.0030.00616.49
7.4.250.0070.00016.52
7.4.240.0020.00516.52
7.4.230.0030.00316.36
7.4.220.0190.00016.65
7.4.210.0070.00816.62
7.4.200.0030.00316.68
7.4.190.0000.00716.71
7.4.160.0160.00616.52
7.4.150.0110.00717.40
7.4.140.0090.00817.86
7.4.130.0080.00916.66
7.4.120.0100.00716.61
7.4.110.0090.00916.49
7.4.100.0120.01316.35
7.4.90.0060.01216.56
7.4.80.0100.01319.39
7.4.70.0060.01016.64
7.4.60.0080.00816.63
7.4.50.0000.00416.68
7.4.40.0090.00622.77
7.4.30.0130.00316.34
7.4.00.0030.01414.84
7.3.330.0000.00513.30
7.3.320.0000.00513.37
7.3.310.0000.00716.43
7.3.300.0070.00016.25
7.3.290.0090.00616.40
7.3.280.0070.00916.41
7.3.270.0140.00317.40
7.3.260.0130.00416.60
7.3.250.0080.01216.49
7.3.240.0040.01116.55
7.3.230.0070.01016.39
7.3.210.0030.01516.64
7.3.200.0090.00919.39
7.3.190.0080.01516.57
7.3.180.0040.01216.31
7.3.170.0130.01016.49
7.3.160.0060.01016.45
7.3.120.0100.00714.85
7.2.330.0070.01016.47
7.2.320.0100.00716.66
7.2.310.0090.01216.86
7.2.300.0130.00316.69
7.2.290.0100.00716.53
7.2.110.0130.00816.36
7.2.100.0050.01116.61
7.2.90.0140.00616.79
7.2.80.0180.00416.43
7.2.70.0400.00516.76
7.2.60.0120.00616.91
7.2.50.0130.00516.85
7.2.40.0360.00717.04
7.2.30.0340.01017.03
7.2.20.0130.00816.88
7.2.10.0100.00716.97
7.2.00.0110.00416.96
7.1.230.0140.00615.95
7.1.220.0250.00715.71
7.1.210.0080.01115.68
7.1.200.0090.00415.66
7.1.190.0170.00415.49
7.1.180.0070.01015.77
7.1.170.0120.00815.54
7.1.160.0100.01015.86
7.1.150.0070.01015.89
7.1.140.0150.00415.51
7.1.130.0100.00715.71
7.1.120.0070.01115.86
7.1.110.0110.00616.00
7.1.100.0110.00415.92
7.1.90.0080.00815.85
7.1.80.0240.00915.99
7.1.70.0050.00816.26
7.1.60.0170.00617.54
7.1.50.0140.00616.44
7.1.40.0150.00915.77
7.1.30.0110.00815.96
7.1.20.0080.01315.84
7.1.10.0080.00815.61
7.1.00.0050.04219.12
7.0.310.0190.00415.25
7.0.300.0100.00615.46
7.0.290.0100.00615.43
7.0.280.0140.00515.32
7.0.270.0170.00015.34
7.0.260.0150.00015.25
7.0.250.0120.00915.50
7.0.240.0150.00515.50
7.0.230.0050.00915.59
7.0.220.0100.01115.61
7.0.210.0170.00015.64
7.0.200.0050.00816.16
7.0.190.0140.00315.43
7.0.180.0140.00315.45
7.0.170.0100.00315.47
7.0.160.0500.01015.64
7.0.150.0110.00415.50
7.0.140.0110.04018.72
7.0.130.0120.00315.54
7.0.120.0110.00415.41
7.0.110.0640.00615.48
7.0.100.0090.04517.79
7.0.90.0130.03717.74
7.0.80.0080.04317.76
7.0.70.0180.02717.70
7.0.60.0130.04317.68
7.0.50.0130.04117.94
7.0.40.0110.03816.74
7.0.30.0080.04516.74
7.0.20.0090.04416.78
7.0.10.0160.03316.76
7.0.00.0120.03616.83
5.6.380.0080.01214.57
5.6.370.0100.01014.67
5.6.360.0140.00314.63
5.6.350.0060.00914.45
5.6.340.0110.00514.39
5.6.330.0060.00914.61
5.6.320.0090.00614.68
5.6.310.0100.00314.36
5.6.300.0120.00314.48
5.6.290.0160.00014.52
5.6.280.0100.03517.68
5.6.270.0070.01014.68
5.6.260.0150.00014.43
5.6.250.0120.03617.34
5.6.240.0100.02817.59
5.6.230.0070.04417.58
5.6.220.0090.04017.69
5.6.210.0070.04317.45
5.6.200.0120.04517.83
5.6.190.0110.04417.88
5.6.180.0120.04317.64
5.6.170.0100.04517.65
5.6.160.0150.03317.69
5.6.150.0050.02717.79
5.6.140.0090.03817.73
5.6.130.0110.03817.75
5.6.120.0090.04817.69
5.6.110.0120.04117.71
5.6.100.0080.04517.77
5.6.90.0130.04117.72
5.6.80.0100.02217.44
5.6.70.0110.03717.35
5.6.60.0100.03817.41
5.6.50.0070.03117.33
5.6.40.0100.03817.34
5.6.30.0130.03717.47
5.6.20.0100.04217.46
5.6.10.0060.04317.44
5.6.00.0100.03817.32
5.5.380.0100.04616.65
5.5.370.0090.04316.61
5.5.360.0130.03716.60
5.5.350.0090.02716.58
5.5.340.0060.02816.84
5.5.330.0130.02516.85
5.5.320.0060.04316.77
5.5.310.0120.03716.82
5.5.300.0080.02516.84
5.5.290.0100.02516.77
5.5.280.0070.03816.83
5.5.270.0080.03016.78
5.5.260.0090.04016.82
5.5.250.0070.03316.71
5.5.240.0070.02316.45
5.5.230.0070.04416.52
5.5.220.0090.02216.50
5.5.210.0090.04016.52
5.5.200.0070.04316.52
5.5.190.0060.04616.39
5.5.180.0120.04216.51
5.5.170.0140.00314.20
5.5.160.0150.03516.49
5.5.150.0150.01816.48
5.5.140.0080.03816.43
5.5.130.0090.03916.52
5.5.120.0110.03516.51
5.5.110.0110.03516.39
5.5.100.0050.02516.46
5.5.90.0060.04116.45
5.5.80.0110.03516.43
5.5.70.0080.04116.47
5.5.60.0130.03816.43
5.5.50.0060.03716.48
5.5.40.0140.04016.40
5.5.30.0070.04316.36
5.5.20.0080.03716.46
5.5.10.0040.04016.42
5.5.00.0030.04516.41
5.4.450.0080.04016.12
5.4.440.0030.04516.10
5.4.430.0120.03916.20
5.4.420.0060.04716.07
5.4.410.0040.04616.09
5.4.400.0110.03815.99
5.4.390.0050.04615.96
5.4.380.0080.04015.84
5.4.370.0060.04115.97
5.4.360.0090.03716.00
5.4.350.0120.02715.96
5.4.340.0110.03715.87
5.4.330.0080.00012.79
5.4.320.0070.04315.83
5.4.310.0050.04515.83
5.4.300.0080.03816.01
5.4.290.0050.04715.84
5.4.280.0120.03215.90
5.4.270.0100.04015.97
5.4.260.0060.03615.91
5.4.250.0030.02515.98
5.4.240.0070.03915.96
5.4.230.0070.02915.91
5.4.220.0140.03815.96
5.4.210.0160.03515.98
5.4.200.0140.03715.91
5.4.190.0090.03115.90
5.4.180.0100.02915.96
5.4.170.0080.04115.84
5.4.160.0050.03815.91
5.4.150.0110.03615.96
5.4.140.0100.02714.60
5.4.130.0070.04214.60
5.4.120.0100.03014.56
5.4.110.0100.03814.57
5.4.100.0030.04314.63
5.4.90.0110.03114.53
5.4.80.0100.03614.61
5.4.70.0100.03014.60
5.4.60.0080.03614.58
5.4.50.0040.02814.58
5.4.40.0080.03014.62
5.4.30.0070.04014.63
5.4.20.0100.03614.59
5.4.10.0060.04314.61
5.4.00.0130.03214.35
5.3.290.0050.03913.72
5.3.280.0090.03813.65
5.3.270.0100.04013.68
5.3.260.0070.02613.69
5.3.250.0090.04013.69
5.3.240.0080.04113.70
5.3.230.0110.03013.68
5.3.220.0140.02213.71
5.3.210.0070.03713.71
5.3.200.0080.02113.71
5.3.190.0050.04213.71
5.3.180.0040.04113.64
5.3.170.0130.02813.72
5.3.160.0060.02513.67
5.3.150.0080.04013.69
5.3.140.0040.04113.72
5.3.130.0090.03613.72
5.3.120.0050.04313.70
5.3.110.0140.03513.72
5.3.100.0090.03213.38
5.3.90.0090.03513.41
5.3.80.0070.02813.35
5.3.70.0080.03713.35
5.3.60.0070.02313.36
5.3.50.0080.02213.44
5.3.40.0070.03713.43
5.3.30.0060.02013.29
5.3.20.0050.02213.30
5.3.10.0040.02013.16
5.3.00.0060.02013.27
5.2.170.0080.01312.17
5.2.160.0090.01312.17
5.2.150.0020.02112.17
5.2.140.0030.01912.17
5.2.130.0020.01912.17
5.2.120.0050.01412.17
5.2.110.0040.01712.17
5.2.100.0050.01512.17
5.2.90.0060.01612.17
5.2.80.0030.01712.17
5.2.70.0050.02012.17
5.2.60.0080.01512.17
5.2.50.0070.01412.17
5.2.40.0030.01612.17
5.2.30.0050.01512.17
5.2.20.0070.01312.17
5.2.10.0050.01612.17
5.2.00.0030.01612.17
5.1.60.0070.00812.17
5.1.50.0070.01012.17
5.1.40.0030.01612.17
5.1.30.0090.01212.17
5.1.20.0100.01312.17
5.1.10.0030.03312.17
5.1.00.0050.01512.17
5.0.50.0030.01112.17
5.0.40.0030.01312.17
5.0.30.0010.01712.17
5.0.20.0000.01412.17
5.0.10.0030.01712.17
5.0.00.0020.01812.17
4.4.90.0040.01212.17
4.4.80.0050.00712.17
4.4.70.0020.01012.17
4.4.60.0000.01112.17
4.4.50.0030.01012.17
4.4.40.0000.01412.17
4.4.30.0050.01312.17
4.4.20.0030.01212.17
4.4.10.0030.01012.17
4.4.00.0030.02212.17
4.3.110.0050.00712.17
4.3.100.0020.01112.17
4.3.90.0020.00912.17
4.3.80.0020.01712.17
4.3.70.0040.00912.17
4.3.60.0020.01012.17
4.3.50.0020.00912.17
4.3.40.0000.01412.17
4.3.30.0010.01212.17
4.3.20.0020.00812.17
4.3.10.0020.00912.17
4.3.00.0040.00812.17

preferences:
44.78 ms | 401 KiB | 5 Q