Jared Williams wrote: > Don't think that's what he said... More like... > > assert(is_object($foo) || is_array($foo)); // ensure strictly conforming > $json = json_encode($foo);
Which is, for all intents and purposes, the same thing. (Since you can't pass json_encode(34) for strict JSON). PHP has always erred on the side of "Just do it", and punting the "Do the right thing" to the consumer. Maybe passing an E_STRICT error would be the right combo of 1 and 2? Cheers, Edward -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php