3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ ['Out Of Warranty', 'Total Orders', 'Total Qty', 'Canceled Orders'], ['Today<br/>(04-26-2020)', 1, 1, 0], ['Yesterday<br/>(04-25-2020)', 0, 0, 0], ['This Week<br/>(04-20-2020 - 04-26-2020)', 22, 39, 0], ['Last Week<br/>(04-13-2020 - 04-19-2020)', 7, 7, 0], ['This Month<br/>(04-01-2020 - 04-26-2020)', 29, 46, 0], ['This Year<br/>(01-01-2020 - 04-26-2020)', 30, 47, 0], ]; $array2 = [ ['Out Of Warranty', 'Total Orders', 'Total Qty', 'Canceled Orders'], ['Today<br/>(04-24-2020)', 10, 10, 0], ['Yesterday<br/>(04-23-2020)', 7, 7, 0], ['This Week<br/>(04-20-2020 - 04-24-2020)', 51, 51, 0], ['Last Week<br/>(04-13-2020 - 04-19-2020)', 31, 31, 0], ['This Month<br/>(04-01-2020 - 04-24-2020)', 93, 93, 0], ['This Year<br/>(01-01-2020 - 04-24-2020)', 1281, 1281, 1], ]; for ($i = 1, $size = count($array2); $i < $size; ++$i) { for ($col = 1; $col <= 3; ++$col) { $array1[$i][$col] += $array2[$i][$col]; } } var_export($array1);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 0 => 'Out Of Warranty', 1 => 'Total Orders', 2 => 'Total Qty', 3 => 'Canceled Orders', ), 1 => array ( 0 => 'Today<br/>(04-26-2020)', 1 => 11, 2 => 11, 3 => 0, ), 2 => array ( 0 => 'Yesterday<br/>(04-25-2020)', 1 => 7, 2 => 7, 3 => 0, ), 3 => array ( 0 => 'This Week<br/>(04-20-2020 - 04-26-2020)', 1 => 73, 2 => 90, 3 => 0, ), 4 => array ( 0 => 'Last Week<br/>(04-13-2020 - 04-19-2020)', 1 => 38, 2 => 38, 3 => 0, ), 5 => array ( 0 => 'This Month<br/>(04-01-2020 - 04-26-2020)', 1 => 122, 2 => 139, 3 => 0, ), 6 => array ( 0 => 'This Year<br/>(01-01-2020 - 04-26-2020)', 1 => 1311, 2 => 1328, 3 => 1, ), )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
61.61 ms | 403 KiB | 8 Q