Created
August 22, 2013 22:28
-
-
Save phpfiddle/6313597 to your computer and use it in GitHub Desktop.
testing array_diff_key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$original = array('esfid'=> 'kldjfsdkfjd'); | |
$new = array( | |
'esfid' => '001GOdemoESFID0', | |
'opst' => 'won', | |
'opsfid' => '006c0000002fZvb', | |
'product' => 'ePm-d30a1', | |
'quantity' => '4', | |
'ename' => 'test', | |
'itemid' => '00kc0000007SdmU', | |
); | |
if ( $new && array_diff_key( $original, $new ) ) //@TODO: verify this - aren't keys flexible?? | |
{ | |
echo 'they are diff!'; | |
} | |
else | |
{ | |
echo 'they are not diff!!'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment