3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cars = array( 'type' => array( 'brand' => array( 'car' => 'Honda', ), ), ); $parents = array('type', 'brand', 'car'); function GetCar($cars, $parents) { foreach($parents as $key) { $cars = $cars[$key]; #echo $key."<br>"; } return $cars; } var_dump(GetCar($cars, $parents)); // OUTPUT: string(5) "Honda" echo GetCar($cars, $parents); // OUTPUT: Honda

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.0130.00716.86
8.5.00.0120.01120.10
8.4.150.0030.00014.05
8.4.140.0150.01117.50
8.4.130.0040.00518.95
8.4.120.0130.00723.98
8.4.110.0100.00817.95
8.4.100.0130.00717.77
8.4.90.0110.01020.94
8.4.80.0030.00518.98
8.4.70.0080.01122.45
8.4.60.0050.00420.59
8.4.50.0130.00618.76
8.4.40.0100.01019.21
8.4.30.0180.00019.57
8.4.20.0170.00320.41
8.4.10.0070.01319.38
8.3.280.0120.00818.43
8.3.270.0110.00816.38
8.3.260.0140.00616.32
8.3.250.0120.00618.72
8.3.240.0100.01016.74
8.3.230.0070.00316.42
8.3.220.0100.00819.07
8.3.210.0090.00616.73
8.3.200.0030.00516.41
8.3.190.0120.00516.84
8.3.180.0080.00118.81
8.3.170.0090.00917.18
8.3.160.0100.01018.48
8.3.150.0110.00420.74
8.3.140.0030.00517.36
8.3.130.0080.00016.83
8.3.120.0070.01119.09
8.3.110.0070.00720.94
8.3.100.0100.00716.38
8.3.90.0090.00918.22
8.3.80.0070.00417.97
8.3.70.0130.01018.30
8.3.60.0100.01016.63
8.3.50.0110.00617.31
8.3.40.0140.00318.67
8.3.30.0110.00318.75
8.3.20.0040.00420.38
8.3.10.0080.00023.65
8.3.00.0040.00422.44
8.2.290.0040.00516.74
8.2.280.0120.00818.47
8.2.270.0130.00616.86
8.2.260.0080.00017.07
8.2.250.0080.00816.57
8.2.240.0060.00317.20
8.2.230.0080.00022.58
8.2.220.0030.00624.06
8.2.210.0110.00426.77
8.2.200.0030.00616.63
8.2.190.0110.00416.58
8.2.180.0040.01116.63
8.2.170.0040.01122.96
8.2.160.0100.00720.87
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00819.48
8.2.110.0060.00321.11
8.2.100.0090.00417.84
8.2.90.0000.00817.75
8.2.80.0080.00017.97
8.2.70.0000.00817.79
8.2.60.0060.00318.16
8.2.50.0000.00918.10
8.2.40.0040.00419.48
8.2.30.0040.00419.31
8.2.20.0000.00818.00
8.2.10.0000.00719.32
8.2.00.0050.00318.08
8.1.330.0100.00916.02
8.1.320.0110.00718.05
8.1.310.0080.00516.89
8.1.300.0070.01116.20
8.1.290.0060.00318.88
8.1.280.0070.00725.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0050.00522.42
8.1.230.0040.00820.97
8.1.220.0050.00317.76
8.1.210.0030.00518.77
8.1.200.0060.00317.35
8.1.190.0050.00317.13
8.1.180.0040.00418.10
8.1.170.0040.00418.46
8.1.160.0040.00418.81
8.1.150.0040.00418.81
8.1.140.0000.00722.21
8.1.130.0030.00322.02
8.1.120.0050.00217.38
8.1.110.0000.00717.36
8.1.100.0030.00617.49
8.1.90.0060.00417.44
8.1.80.0040.00317.32
8.1.70.0030.00317.30
8.1.60.0070.00417.48
8.1.50.0040.00417.54
8.1.40.0040.00417.57
8.1.30.0040.00417.52
8.1.20.0000.00817.67
8.1.10.0040.00417.54
8.1.00.0080.00017.52
8.0.300.0030.00620.03
8.0.290.0000.00716.63
8.0.280.0070.00018.46
8.0.270.0040.00416.88
8.0.260.0060.00018.39
8.0.250.0000.00816.93
8.0.240.0000.00716.97
8.0.230.0040.00417.00
8.0.220.0030.00716.91
8.0.210.0000.00716.89
8.0.200.0060.00316.85
8.0.190.0040.00417.02
8.0.180.0040.00416.88
8.0.170.0050.00316.91
8.0.160.0050.00316.95
8.0.150.0040.00416.89
8.0.140.0030.00516.83
8.0.130.0030.00313.28
8.0.120.0040.00416.86
8.0.110.0000.00716.88
8.0.100.0030.00616.76
8.0.90.0040.00416.91
8.0.80.0070.00716.86
8.0.70.0080.00016.95
8.0.60.0040.00416.90
8.0.50.0000.00716.71
8.0.30.0060.01116.95
8.0.20.0070.01317.20
8.0.10.0000.00717.09
8.0.00.0110.01116.66
7.4.330.0050.00016.74
7.4.320.0000.00616.37
7.4.300.0060.00016.61
7.4.290.0030.00316.52
7.4.280.0070.00016.57
7.4.270.0050.00316.50
7.4.260.0000.00816.51
7.4.250.0000.00716.62
7.4.240.0040.00416.62
7.4.230.0030.00316.48
7.4.220.0000.00816.39
7.4.210.0100.00616.62
7.4.200.0000.00716.69
7.4.160.0100.00816.48
7.4.140.0040.01217.86
7.4.130.0060.01316.50
7.4.120.0110.00916.55
7.4.110.0070.01516.58
7.4.100.0060.01416.47
7.4.90.0100.00616.57
7.4.80.0060.01519.39
7.4.70.0120.00616.66
7.4.60.0100.00616.61
7.4.50.0030.01016.36
7.4.40.0100.00716.52
7.4.00.0070.00914.92
7.3.330.0050.00013.13
7.3.320.0000.00513.24
7.3.310.0000.00716.29
7.3.300.0030.00316.38
7.3.290.0000.00716.17
7.3.280.0120.00816.29
7.3.260.0090.01016.48
7.3.240.0080.01016.40
7.3.230.0170.00716.33
7.3.210.0180.00016.53
7.3.200.0140.00916.54
7.3.190.0000.01516.63
7.3.180.0090.01116.45
7.3.170.0110.00716.45
7.3.160.0060.01516.57
7.3.120.0130.00315.11
7.3.110.0100.00315.06
7.3.100.0150.00014.90
7.3.90.0050.00514.89
7.3.80.0000.01514.76
7.3.70.0070.00714.94
7.3.60.0140.00014.93
7.3.50.0030.00815.04
7.3.40.0030.00614.83
7.3.30.0050.01114.68
7.3.20.2510.00815.64
7.3.10.0670.00815.72
7.3.00.0700.00615.62
7.2.330.0050.01516.55
7.2.320.0090.00716.74
7.2.310.0100.00616.63
7.2.300.0100.00716.85
7.2.290.0170.00316.70
7.2.250.0110.00715.12
7.2.240.0080.00815.21
7.2.230.0000.01415.25
7.2.220.0040.00814.88
7.2.210.0030.00614.78
7.2.200.0040.01115.30
7.2.190.0040.01114.89
7.2.180.0100.00315.13
7.2.170.0040.00715.05
7.2.160.0100.01014.75
7.2.150.1760.00714.84
7.2.140.1440.00315.26
7.2.130.1370.00014.64
7.2.120.1400.01314.82
7.2.110.1010.01614.77
7.2.100.1590.00714.90
7.2.90.1590.00314.79
7.2.80.1700.00714.68
7.2.70.1310.00614.82
7.2.60.1800.01014.72
7.2.50.1690.01014.85
7.2.40.1780.01014.57
7.2.30.1770.00314.67
7.2.20.1570.01314.86
7.2.10.2170.01314.95
7.2.00.1410.01315.05
7.1.330.0070.00715.79
7.1.320.0030.00615.92
7.1.310.0060.00615.75
7.1.300.0060.00315.84
7.1.290.0040.00815.84
7.1.280.0070.00315.77
7.1.270.0780.00714.71
7.1.260.0640.00714.80
7.1.250.1280.00413.41

preferences:
167.61 ms | 403 KiB | 5 Q