On Fri, Jan 04, 2008 at 01:06:26PM -0500, Robert Cummings wrote: > <?php > > echo 'Foo: '.(0 + '5five')."\n"; > echo 'Foo: '.((int)'5five')."\n"; > echo 'Foo: '.(intval( ' 5five' ))."\n"; > echo 'Foo: '.(sprintf( '%d', '5five' ))."\n"; > > ?> > > All produce 5.
But the string 'foobar' converts to a 0 (zero) -- not what is wanted. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php Chairman of UKUUG: http://www.ukuug.org/ #include <std_disclaimer.h> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php