Posted by Wayne on 02/06/06 09:56
On Sun, 05 Feb 2006 21:54:03 GMT, Colin McKinnon
<colin.thisisnotmysurname@ntlworld.deletemeunlessURaBot.com> wrote:
>> Supported types that are not scalar are:
>> * the 2 compound types array and object
>> * the 2 special types NULL and resource.
>>
>
>*bzzt* wrong
>
>PHP references are scalar - but in most instances dereferencing is
>transparent and higher precedence than casting.
References don't really factor into this discussion.
>I believe that resources and NULL are also scalars but not castable.
Maybe you should test your beliefs...
if (!is_scalar(null)) echo 'I believe you are wrong!';
I was a bit surprised that null was not a scalar -- seems logical that
it would be, but I guess the designers of PHP were trying to lump them
in with objects.
Navigation:
[Reply to this message]
|