You are here: Re: WTF? String = Integer in PHP? Strlen() in integers WORKS? HELP! « PHP Programming Language « IT news, forums, messages
Re: WTF? String = Integer in PHP? Strlen() in integers WORKS? HELP!

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация