note 95739 added to function.str-pad

From: Date: Tue, 19 Jan 2010 12:24:56 +0000
Subject: note 95739 added to function.str-pad
Groups: php.notes 
Request: Send a blank email to php-notes+get-165106@lists.php.net to get a copy of this message
Shelby writes: "Are more concise, semantically coherent, and perhaps also more efficient because do not create an intermediate discarded string, than the clever..." Surely this is troll, right? You've taken a piece of inline code which takes perhaps a couple of seconds to understand the first time you see it but is from then on completely understandable to anyone who's ever seen something similar before and you've abstracted it so that _no-one_ except the author knows what it does without trawling through the code to find the function definition. Your suggestion that it's more efficient is insane - one temporary string as opposed to two or three function calls? ---- Server IP: 92.48.74.199 Probable Submitter: 82.108.154.19 ---- Manual Page -- http://www.php.net/manual/en/function.str-pad.php Edit -- https://master.php.net/note/edit/95739 Del: integrated -- https://master.php.net/note/delete/95739/integrated Del: useless -- https://master.php.net/note/delete/95739/useless Del: bad code -- https://master.php.net/note/delete/95739/bad+code Del: spam -- https://master.php.net/note/delete/95739/spam Del: non-english -- https://master.php.net/note/delete/95739/non-english Del: in docs -- https://master.php.net/note/delete/95739/in+docs Del: other reasons-- https://master.php.net/note/delete/95739 Reject -- https://master.php.net/note/reject/95739 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#165106) next »