3v4l.org

run code in 300+ PHP versions simultaneously
<?php function printAll($a, &$output, $prefix = '') { if (!is_array($a) && !is_object($a)) { $prefix = rtrim($prefix, '/'); $output[] = $prefix . ' => ' . $a. "\n"; return; } foreach($a as $k => $v) { $tmp = $prefix; $tmp .= $k . "/"; printAll($v, $output, $tmp); } } $json_str = '{ "one": { "two": 3, "four": [ 5,6,7] }, "eight": { "nine": { "ten":11 } } }'; $object = json_decode($json_str); $res = array(); printAll($object, $res); var_dump($res);

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.120.0030.00725.66
8.4.110.0100.01122.45
8.4.100.0150.00717.74
8.4.90.0060.00522.38
8.4.80.0090.00919.24
8.4.70.0140.00618.05
8.4.60.0100.01018.64
8.4.50.0070.00420.44
8.4.40.0070.01317.71
8.4.30.0140.00717.58
8.4.20.0060.00919.63
8.4.10.0030.00917.56
8.3.250.0090.00718.84
8.3.240.0090.00317.11
8.3.230.0060.00816.63
8.3.220.0120.00617.23
8.3.210.0120.00716.63
8.3.200.0050.00416.64
8.3.190.0100.00917.25
8.3.180.0120.00716.54
8.3.170.0070.00317.13
8.3.160.0100.00918.32
8.3.150.0140.00417.11
8.3.140.0090.00918.22
8.3.130.0060.00318.33
8.3.120.0050.00318.80
8.3.110.0060.00320.94
8.3.100.0060.00324.06
8.3.90.0040.00416.64
8.3.80.0060.00318.68
8.3.70.0090.01316.50
8.3.60.0100.00718.43
8.3.50.0080.00517.23
8.3.40.0120.00618.71
8.3.30.0090.00618.67
8.3.20.0080.00021.90
8.3.10.0080.00023.70
8.3.00.0060.00321.33
8.2.290.0060.00320.36
8.2.280.0040.00418.37
8.2.270.0060.00317.11
8.2.260.0040.00418.88
8.2.250.0070.01016.88
8.2.240.0160.00020.84
8.2.230.0040.00422.58
8.2.220.0030.00637.54
8.2.210.0040.01526.77
8.2.200.0030.00618.12
8.2.190.0070.00716.58
8.2.180.0120.00318.41
8.2.170.0090.00619.14
8.2.160.0070.00722.96
8.2.150.0050.00324.18
8.2.140.0030.00624.66
8.2.130.0050.00226.16
8.2.120.0040.00420.72
8.2.110.0130.00722.32
8.2.100.0040.00717.84
8.2.90.0000.00918.16
8.2.80.0050.00317.97
8.2.70.0040.00417.93
8.2.60.0050.00318.22
8.2.50.0040.00418.22
8.2.40.0040.00422.19
8.2.30.0040.00419.52
8.2.20.0040.00418.27
8.2.10.0000.00817.76
8.2.00.0040.00418.00
8.1.330.0110.00822.15
8.1.320.0030.00615.95
8.1.310.0070.00718.50
8.1.300.0150.00417.94
8.1.290.0090.00018.88
8.1.280.0090.00625.92
8.1.270.0000.00723.91
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0060.00322.25
8.1.230.0040.00719.10
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0040.00417.10
8.1.180.0040.00418.10
8.1.170.0000.00818.64
8.1.160.0040.00418.82
8.1.150.0040.00420.32
8.1.140.0070.00017.58
8.1.130.0000.00718.97
8.1.120.0080.00317.52
8.1.110.0050.00217.48
8.1.100.0100.00017.48
8.1.90.0030.00617.43
8.1.80.0000.00817.51
8.1.70.0080.00017.49
8.1.60.0080.00017.57
8.1.50.0000.00717.50
8.1.40.0030.00517.59
8.1.30.0040.00717.66
8.1.20.0080.00017.61
8.1.10.0040.00417.53
8.1.00.0030.00517.45
8.0.300.0000.00719.70
8.0.290.0030.00516.75
8.0.280.0000.00718.45
8.0.270.0070.00017.38
8.0.260.0000.00816.83
8.0.250.0040.00416.98
8.0.240.0000.00716.98
8.0.230.0040.00416.93
8.0.220.0040.00416.84
8.0.210.0000.00716.86
8.0.200.0030.00516.88
8.0.190.0040.00417.01
8.0.180.0000.00716.92
8.0.170.0030.00616.89
8.0.160.0070.00016.90
8.0.150.0000.00716.85
8.0.140.0040.00416.92
8.0.130.0050.00013.34
8.0.120.0030.00616.84
8.0.110.0040.00417.01
8.0.100.0040.00416.72
8.0.90.0000.00816.78
8.0.80.0100.01316.82
8.0.70.0030.00416.74
8.0.60.0000.00717.00
8.0.50.0040.00416.90
8.0.30.0120.00817.20
8.0.20.0060.01217.40
8.0.10.0040.00416.93
8.0.00.0120.00716.74
7.4.330.0000.00515.55
7.4.320.0060.00016.60
7.4.300.0030.00316.66
7.4.290.0040.00416.65
7.4.280.0050.00216.47
7.4.270.0000.00816.62
7.4.260.0000.00716.49
7.4.250.0070.00016.59
7.4.240.0070.00016.64
7.4.230.0070.00016.59
7.4.220.0040.00416.64
7.4.210.0090.01016.52
7.4.200.0050.00216.64
7.4.160.0080.00916.59
7.4.140.0140.00917.86
7.4.130.0140.00316.52
7.4.120.0090.00816.45
7.4.110.0130.00416.66
7.4.100.0070.01016.51
7.4.90.0100.01316.37
7.4.80.0180.00719.39
7.4.70.0120.01216.52
7.4.60.0150.00716.49
7.4.50.0100.00616.43
7.4.40.0060.01116.54
7.4.00.0090.00615.24
7.3.330.0060.00013.37
7.3.320.0030.00313.23
7.3.310.0050.00216.27
7.3.300.0070.00016.24
7.3.290.0030.00316.25
7.3.280.0100.01016.35
7.3.260.0090.00916.57
7.3.250.0100.00916.56
7.3.240.0110.00716.41
7.3.230.0070.01316.36
7.3.210.0100.00716.22
7.3.200.0160.00016.51
7.3.190.0080.00816.45
7.3.180.0030.01316.34
7.3.170.0030.01216.33
7.3.160.0080.01116.43
7.2.330.0060.01416.70
7.2.320.0110.00716.51
7.2.310.0080.00816.38
7.2.300.0060.01316.60
7.2.290.0090.01216.68
7.2.60.0170.00916.91
7.2.30.0190.01417.96
7.2.20.3370.01818.11
7.2.10.0180.01218.13
7.2.00.0180.01118.21
7.1.200.0000.00815.80
7.1.150.0110.01316.60
7.1.140.0140.01116.83
7.1.130.0130.01116.48
7.1.120.0160.00917.06
7.1.110.0140.01016.28
7.1.100.0140.00916.34
7.1.90.0140.01016.23
7.1.80.0130.00715.95
7.1.70.0100.01015.53
7.1.60.0250.01533.20
7.1.50.0370.01732.94
7.1.40.0480.01032.62
7.1.30.0260.01932.90
7.1.20.0270.01132.70
7.1.10.0070.01114.76
7.1.00.0080.01114.79

preferences:
28.22 ms | 403 KiB | 5 Q