note 11119 deleted from function.chop by irc-html
| From: | irc-html@php.net | Date: | Wed, 16 Jan 2002 16:20:52 +0000 |
| Subject: | note 11119 deleted from function.chop by irc-html | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-24903@lists.php.net to get a copy of this message | ||
The equivalent of a perl chop() is:
substr("PHP", 0, -1); // returns "PH"
This is nice and concise. Using strlen() to calculate a positive length simply confuses the code.