Re: variable type - conversion/checking
| From: | tamouse mailing lists | Date: | Sat, 16 Mar 2013 06:27:11 +0000 |
| Subject: | Re: variable type - conversion/checking | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-320604@lists.php.net to get a copy of this message | ||
On Fri, Mar 15, 2013 at 8:34 PM, Ashley Sheridan
<ash@ashleysheridan.co.uk> wrote:
>>> >>>>> On Thu, Mar 14, 2013 at 7:02 PM,
>>georg<georg.chambert@telia.com**>
>>> >>>>>>> I have tried to find a way to check if a character string
>>> >>>>>>> is
>>> >>>>>>> possible to
>>> >>>>>>> test whether it is convertible to an intger !
> The op wasn't about casting a string to an int but detecting if a string was just a string
> representation of an int. Hence using a regex to determine that. Regular expressions are not just
> about giving feedback to the user.
Seemed to me that was exactly what it was about.
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk