note 39287 added to function.chop
| From: | thebitman at comcast dot net | Date: | Fri, 23 Jan 2004 06:39:31 +0000 |
| Subject: | note 39287 added to function.chop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-64054@lists.php.net to get a copy of this message | ||
Just doing an ego search, noticed this old thread. I think all of you have missed my point- I was
trying to emulate perl's chop() function, *NOT* perl's chomp() function. I just called it
chomp() in PHP as chop() is already taken.
Perl's chop() does two very important things (in my arrogant opinion):
-If given an array, it will chop() every element in the array
-It returns the character removed (leading to some while loops which certain people would murder you
for using, and certain other people would go out of their way to use)
I guess calling it chomp() was a bad idea.. pretend I said "perl_chop()" instead.
----
Manual Page -- http://www.php.net/manual/en/function.chop.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+39287
Delete -- http://master.php.net/manage/user-notes.php?action=delete+39287&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+39287&report=yes
Search -- http://master.php.net/manage/user-notes.php