Re: variable type - conversion/checking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I suppose one could try something like this:

if (is_string($val) && $val === (string)(int)$val) ....

If $val is an integer masquerading as a string, it should be identical to
the original string when cast back to a string, shouldn't it? (I can't try
it right now.)

Andrew

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux