note 104860 added to function.array-diff-assoc
| From: | news_yodpeirs at thoftware dot de | Date: | Tue, 12 Jul 2011 11:25:05 +0000 |
| Subject: | note 104860 added to function.array-diff-assoc | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-181434@lists.php.net to get a copy of this message | ||
A quite simple (yet not very efficient) way to compare the first level of arrays which have values
that are not strings:
array_map('unserialize',array_diff_assoc(array_map('serialize',$arr1),array_map('serialize',$arr2)))
Might be useful for debugging (that's what I use it for).
----
Server IP: 85.214.154.209
Probable Submitter: 80.153.162.95 (proxied: 127.0.0.1)
----
Manual Page -- http://www.php.net/manual/en/function.array-diff-assoc.php
Edit -- https://master.php.net/note/edit/104860
Del: integrated -- https://master.php.net/note/delete/104860/integrated
Del: useless -- https://master.php.net/note/delete/104860/useless
Del: bad code -- https://master.php.net/note/delete/104860/bad+code
Del: spam -- https://master.php.net/note/delete/104860/spam
Del: non-english -- https://master.php.net/note/delete/104860/non-english
Del: in docs -- https://master.php.net/note/delete/104860/in+docs
Del: other reasons-- https://master.php.net/note/delete/104860
Reject -- https://master.php.net/note/reject/104860
Search -- https://master.php.net/manage/user-notes.php