Doc #79402 [NEW]: Description fix suggestion

From: Date: Sun, 22 Mar 2020 00:40:32 +0000
Subject: Doc #79402 [NEW]: Description fix suggestion
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17440@lists.php.net to get a copy of this message
From: simongcc at gmail dot com Operating system: PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:Description fix suggestion Description: ------------ --- From manual page: https://php.net/language.operators.array --- It is only a problem in description. In the docs, it states that $a + $b is Union and it is Union of $a and $b. But it is not completely reflecting the characteristic of the Union in PHP. Since strictly speaking, an Union should be mutually inclusive of different things. In PHP, it is only an union of key regardless of value. So it should be written as Union of the key in $a and $b and based on $a or vice versa if it is $b + $a. (Because when there is/are key(s) exist(s) in the first variable, the same key(s) in the second variable will be ignored) Test script: --------------- $a = array('something' => 'interesting', 2); $b = array('another' => 'interesting thing', 0 => 3); $c = $a + $b; $d = $b + $a; print_r($c); print_r($d); -- Edit bug report at https://bugs.php.net/bug.php?id=79402&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79402&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79402&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79402&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79402&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79402&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79402&r=support Expected behavior: https://bugs.php.net/fix.php?id=79402&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79402&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79402&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79402&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79402&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79402&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79402&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79402&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79402&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79402&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79402&r=mysqlcfg

« previous php.doc.bugs (#17440) next »