note 117791 added to function.chop

From: Date: Tue, 11 Aug 2015 09:46:35 +0000
Subject: note 117791 added to function.chop
Groups: php.notes 
Request: Send a blank email to php-notes+get-203304@lists.php.net to get a copy of this message
If you are searching for a function that does the same trick as chop in PERL, then you should just do the following code: <?php $str = substr($str, 0, -1); ?> The question is: why isn't chop() an alias of the code above, rather than something which will trap developpers? ---- Server IP: 72.52.91.14 Probable Submitter: 88.186.20.115 ---- Manual Page -- http://php.net/manual/en/function.chop.php Edit -- https://master.php.net/note/edit/117791 Del: integrated -- https://master.php.net/note/delete/117791/integrated Del: useless -- https://master.php.net/note/delete/117791/useless Del: bad code -- https://master.php.net/note/delete/117791/bad+code Del: spam -- https://master.php.net/note/delete/117791/spam Del: non-english -- https://master.php.net/note/delete/117791/non-english Del: in docs -- https://master.php.net/note/delete/117791/in+docs Del: other reasons-- https://master.php.net/note/delete/117791 Reject -- https://master.php.net/note/reject/117791 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#203304) next »