3v4l.org

run code in 300+ PHP versions simultaneously
<?php $list = array( 'ind' => array( 'messagetype' => 'Alert', 'visibility' => 'Public', 'info' => array( 0 => array( 'urgency' => 'Urgent', 'params' => array( 0 => array( 'Name' => 'display', 'value' => '3; top', ), 1 => array( 'Name' => 'level', 'value' => '1; blue', ), ), 'area' => array( 'ard' => 'Bob', 'code' => array( 0 => array( 'Name' => 'Badge', 'value' => 'GSSD154', ), ), ), ), 1 => array( 'messagetype' => 'Information', 'visibility' => 'Private', 'info' => array( 0 => array( 'urgency' => 'Minor', 'params' => array( 0 => array( 'Name' => 'display', 'value' => '1; left', ), 1 => array( 'Name' => 'level', 'value' => '1; red', ), ), 'area' => array( 'ard' => 'Bob', 'code' => array( 0 => array( 'Name' => 'Badge', 'value' => 'GBECS23', ), ), ), ), ), ), ), ), ); function replaceKeys(&$arr) { foreach ($arr as &$v) { if ( !is_array($v) ) continue; $keys = array_keys($v); $count = count($keys); if ( $count < 2 || $keys !== array_flip($keys) || array_keys(array_merge(...$v)) !== ['Name', 'value'] ) { replaceKeys($v); continue; } foreach ($v as $k => &$item) { $item = array_combine(["Name$k", "value$k"], $item); } } } replaceKeys($list); print_r($list);

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.0050.00520.40
8.4.110.0120.00818.99
8.4.100.0120.00717.59
8.4.90.0100.00920.40
8.4.80.0090.00518.72
8.4.70.0080.00918.72
8.4.60.0140.01018.86
8.4.50.0090.01018.43
8.4.40.0070.01418.48
8.4.30.0000.00918.66
8.4.20.0120.00420.57
8.4.10.0100.01019.74
8.3.250.0130.00618.85
8.3.240.0110.00718.47
8.3.230.0150.00416.59
8.3.220.0120.00818.69
8.3.210.0080.00718.64
8.3.200.0040.00516.53
8.3.190.0080.00817.04
8.3.180.0090.01219.04
8.3.170.0070.00317.13
8.3.160.0060.00317.32
8.3.150.0080.01118.91
8.3.140.0090.00916.50
8.3.130.0150.00318.58
8.3.120.0050.00518.91
8.3.110.0070.01020.94
8.3.100.0070.00024.06
8.3.90.0080.00026.77
8.3.80.0110.00016.48
8.3.70.0040.01116.75
8.3.60.0100.00718.18
8.3.50.0100.01024.40
8.3.40.0070.00720.42
8.3.30.0070.00718.71
8.3.20.0070.00021.90
8.3.10.0050.00321.92
8.3.00.0080.00020.61
8.2.290.0130.00616.75
8.2.280.0100.00920.37
8.2.270.0160.00317.25
8.2.260.0040.00417.06
8.2.250.0110.00818.29
8.2.240.0060.00318.99
8.2.230.0030.00722.58
8.2.220.0100.00037.54
8.2.210.0070.00726.77
8.2.200.0050.00516.50
8.2.190.0070.01418.29
8.2.180.0140.00716.75
8.2.170.0070.01018.91
8.2.160.0000.01322.96
8.2.150.0050.00325.66
8.2.140.0070.00024.66
8.2.130.0050.00326.16
8.2.120.0040.00426.16
8.2.110.0000.01020.39
8.2.100.0100.00417.59
8.2.90.0030.00619.27
8.2.80.0030.00617.97
8.2.70.0060.00317.50
8.2.60.0030.00617.93
8.2.50.0080.00418.07
8.2.40.0060.00319.82
8.2.30.0040.00418.11
8.2.20.0000.00817.93
8.2.10.0050.00319.36
8.2.00.0000.00719.29
8.1.330.0120.00516.10
8.1.320.0110.00716.27
8.1.310.0050.00316.88
8.1.300.0060.00316.06
8.1.290.0060.00318.88
8.1.280.0070.00725.92
8.1.270.0070.01021.95
8.1.260.0100.00326.35
8.1.250.0040.00428.09
8.1.240.0090.00019.13
8.1.230.0080.00417.70
8.1.220.0050.00317.76
8.1.210.0050.00518.77
8.1.200.0080.00017.48
8.1.190.0030.00617.36
8.1.180.0080.00018.10
8.1.170.0000.00818.70
8.1.160.0040.00418.88
8.1.150.0050.00218.94
8.1.140.0000.00718.86
8.1.130.0070.00017.32
8.1.120.0070.00017.49
8.1.110.0040.00417.46
8.1.100.0030.00617.43
8.1.90.0030.00517.46
8.1.80.0000.00717.36
8.1.70.0000.01017.33
8.1.60.0000.00817.53
8.1.50.0070.00017.56
8.1.40.0000.00717.50
8.1.30.0040.00417.50
8.1.20.0000.00817.66
8.1.10.0080.00017.52
8.1.00.0000.00817.30
8.0.300.0000.00718.77
8.0.290.0060.00616.63
8.0.280.0030.00318.48
8.0.270.0080.00017.87
8.0.260.0000.00816.86
8.0.250.0070.00016.98
8.0.240.0000.00716.92
8.0.230.0000.00716.94
8.0.220.0030.00616.92
8.0.210.0110.00016.93
8.0.200.0000.00716.99
8.0.190.0080.00016.84
8.0.180.0020.00516.79
8.0.170.0040.00416.96
8.0.160.0050.00316.78
8.0.150.0000.00716.82
8.0.140.0070.00016.88
8.0.130.0030.00313.28
8.0.120.0070.00016.96
8.0.110.0000.00716.75
8.0.100.0000.00816.85
8.0.90.0060.00316.71
8.0.80.0080.01016.90
8.0.70.0040.00417.00
8.0.60.0000.00716.82
8.0.50.0040.00416.75
8.0.30.0120.00617.06
8.0.20.0120.00617.27
8.0.10.0000.00817.05
8.0.00.0140.00316.70
7.4.330.0000.00615.55
7.4.320.0030.00316.51
7.4.300.0030.00316.51
7.4.290.0070.00016.60
7.4.280.0040.00416.48
7.4.270.0080.00016.63
7.4.260.0040.00413.25
7.4.250.0000.00716.54
7.4.240.0060.00216.51
7.4.230.0000.00716.53
7.4.220.0030.00316.45
7.4.210.0070.00916.59
7.4.200.0000.00816.70
7.4.130.0100.00916.51
7.4.120.0090.00916.70
7.4.110.0030.01416.43
7.4.100.0070.01116.40
7.4.90.0030.01416.50
7.4.80.0070.01119.39
7.4.70.0000.02416.74
7.4.60.0120.00616.43
7.4.50.0030.01316.57
7.4.40.0110.01516.55
7.4.30.0070.01016.44
7.4.20.0030.01416.28
7.4.10.0040.01316.32
7.4.00.0120.00616.39
7.3.330.0000.00716.36
7.3.320.0000.00613.38
7.3.310.0000.00816.37
7.3.300.0050.00216.28
7.3.290.0050.01116.36
7.3.280.0000.01516.36
7.3.260.0190.00616.41
7.3.240.0120.00816.43
7.3.230.0070.01016.61
7.3.210.0120.00416.38
7.3.200.0120.00916.37
7.3.190.0130.00316.75
7.3.180.0110.00716.35
7.3.170.0030.01216.33
7.3.160.0040.01316.23
7.3.150.0080.00816.65
7.3.140.0040.01116.44
7.3.130.0100.00716.45
7.3.120.0130.00516.61
7.3.110.0140.00316.49
7.3.100.0030.01216.62
7.3.90.0050.01116.36
7.3.80.0070.01016.32
7.3.70.0080.00816.40
7.3.60.0070.01416.53
7.3.50.0090.01216.28
7.3.40.0090.00616.33
7.3.30.0030.01216.24
7.3.20.0100.00616.55
7.3.10.0110.00516.43
7.3.00.0060.01016.35
7.2.330.0100.00716.51
7.2.320.0060.01116.80
7.2.310.0080.00816.77
7.2.300.0060.01316.60
7.2.290.0090.01216.43
7.2.280.0060.00916.72
7.2.270.0070.01416.59
7.2.260.0070.01016.70
7.2.250.0090.00916.68
7.2.240.0090.00616.61
7.2.230.0100.00716.69
7.2.220.0030.01316.41
7.2.210.0100.00716.82
7.2.200.0070.01416.72
7.2.190.0070.01016.66
7.2.180.0070.01016.50
7.2.170.0160.00016.61
7.2.160.0100.01016.48
7.2.150.0120.00416.66
7.2.140.0060.01516.70
7.2.130.0110.00616.48
7.2.120.0100.00716.54
7.2.110.0120.01216.84
7.2.100.0280.01216.76
7.2.90.0100.01016.54
7.2.80.0150.00616.82
7.2.70.0110.00516.67
7.2.60.0120.00616.75
7.2.50.0100.00716.57
7.2.40.0070.01016.64
7.2.30.0070.01016.69
7.2.20.0080.00916.62
7.2.10.0100.01016.67
7.2.00.0100.01016.56

preferences:
28.76 ms | 403 KiB | 5 Q