Why would this echo \"NULL\"? In my would it would be decoded to an empty array.
Is it something obvious I\'m missing?
print_r the $json_decoded value it gives the empty array back. :)
$json = json_encode(array());
$json_decoded = json_decode($json, true);
if ($json_decoded == null){
print_r($json_decoded);
} else
{
echo "NOT NULL";
}
outputs : Array ( ) This is because with == operator the empty array gets type juggled to null