PHPMine
<? if(PHP > $Expectations) echo $Results ?>
by Angel S. Moreno
UNDER SOME SERIOUS CONSTRUCTION LINKS MAY NOT WORK
Asked 2010-03-16 15:20:59 by jc_yurcastle
Anwered 2010-03-16 17:52:35 by Robin T
One. In this question that you asked :)
If you try to parse a string to an int this is what you get:
1. (int) "1234" => 1234
2. (int) "1234blah5678" => 1234
3. (int) "blah" => 0
4. (int) "blah1234" => 0
Anwered 2010-03-16 23:00:27 by CJ
Well it will depend how you look at it.. and depending if you consider different syntax as a different case.
eg:
$x = 123;
$number = (int) $x;
$number = ((is_numeric($x)? (int) $x:0);
Questions and answers provided by the Yahoo Answers Community.