From: Operating system: Linux PHP version: 5.3.3 Package: Arrays related Bug Type: Feature/Change Request Bug description:Cannot substract Arrays
Description: ------------ Add is supported but substract Arrays not Test script: --------------- <?php $foo = array('a' => 1, 'b' => 2); $bar = array('c' => 3, 'd' => 4); $foobar = $foo + $bar; print_r($foobar); $foo = $foobar - $bar; print_r($foo); ?> Expected result: ---------------- Array ( [a] => 1 [b] => 2 [c] => 3 [d] => 4 ) Array ( [a] => 1 [b] => 2 ) Actual result: -------------- Array ( [a] => 1 [b] => 2 [c] => 3 [d] => 4 ) Fatal error: Unsupported operand types in array.php on line 9 -- Edit bug report at http://bugs.php.net/bug.php?id=53170&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53170&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53170&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53170&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53170&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53170&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=53170&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=53170&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=53170&r=needscript Try newer version: http://bugs.php.net/fix.php?id=53170&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=53170&r=support Expected behavior: http://bugs.php.net/fix.php?id=53170&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=53170&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=53170&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=53170&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53170&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=53170&r=dst IIS Stability: http://bugs.php.net/fix.php?id=53170&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=53170&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=53170&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=53170&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=53170&r=mysqlcfg