note 104098 deleted from function.ctype-digit by hholzgra
| From: | hholzgra@php.net | Date: | Thu, 02 Aug 2012 15:58:20 +0000 |
| Subject: | note 104098 deleted from function.ctype-digit by hholzgra | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-189886@lists.php.net to get a copy of this message | ||
Note Submitter: portalpress dot org at gmail dot com
----
To my surprise after one million iterations:
It took 0.5646638 seconds to false if(('abc'*1 . '')==='abc')
It took 0.5725240 seconds to true if(('123'*1 . '')==='123')
It took 0.3741021 seconds to false if((('abc'*1) . '')==='abc')
It took 0.4357590 seconds to true if((('123'*1) . '')==='123')
It took 0.3529291 seconds to false ctype_digit('abc')
It took 0.3391420 seconds to true ctype_digit('123')
The function ctype_digit() is faster then an inline if().
But this test also shows the value of ((first*1) . second).