note 100798 deleted from language.types.integer by danbrown
| From: | danbrown@php.net | Date: | Mon, 08 Nov 2010 14:06:52 +0000 |
| Subject: | note 100798 deleted from language.types.integer by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-173847@lists.php.net to get a copy of this message | ||
Note Submitter: malachitemiller at gmail dot com
----
why not just this?
<?php $number_of_digits = (int)strlen((string) $num); ?>
the one problem is if the num has a decimal point in it, that will be counted as part of the length.