php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #75757 Union all values of array using ++
Submitted: 2018-01-04 03:17 UTC Modified: 2018-01-04 04:00 UTC
From: john dot m dot german at outlook dot com Assigned:
Status: Suspended Package: Arrays related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2018-01-04 03:17 UTC] john dot m dot german at outlook dot com
Description:
------------
When trying to union two arrays, be able to union all values.  So, basically
array_merge_recursive, but using ++.

Test script:
---------------
$a = array("a" => "apple", "b" => "banana");
$b = array("a" => "pear", "b" => "strawberry", "c" => "cherry");

$c = $a ++ $b; // Union all of $a and $b.

UNION ALL OUTPUT:
$c = array("a" => array("apple", "pear"), "b" => array("banana", "strawberry"), "c" => "cherry");


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-01-04 04:00 UTC] requinix@php.net
-Status: Open +Status: Suspended
 [2018-01-04 04:00 UTC] requinix@php.net
Thank you for your interest in PHP and for submitting a feature
request. Please be aware that due to the magnitude of change this
request requires, it would be necessary to discuss it on PHP
Internals list (internals@lists.php.net) as an RFC. Please read
the guide about creating RFCs here:
<https://wiki.php.net/rfc/howto>. If you haven't had experience
with writing RFCs before, it is advised to seek guidance on the
Internals list (<http://php.net/mailing-lists.php>) and/or solicit
help from one of the experienced developers.

Please do not consider this comment as a negative view on the
merits of your proposal – every proposal which requires changes of
certain magnitude, even the very successful and widely supported
ones, must be done through the RFC process. This helps make the
process predictable, transparent and accessible to all developers.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC