#26759 [Sus->Bgs]: php documentation examples contain slow code

From: Date: Thu, 01 Jan 2004 22:43:25 +0000
Subject: #26759 [Sus->Bgs]: php documentation examples contain slow code
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969357820@lists.php.net to get a copy of this message
ID: 26759 Updated by: derick@php.net Reported By: kennyt@php.net -Status: Suspended +Status: Bogus Bug Type: Documentation problem PHP Version: Irrelevant Assigned To: kennyt New Comment: leave it at bogus Previous Comments: ------------------------------------------------------------------------ [2004-01-01 14:24:28] vrana@php.net If there are slow examples in the documentation, point to them. Bad algorithms make scripts slow, not using double quotes where can single quotes be. ------------------------------------------------------------------------ [2004-01-01 13:37:43] et@php.net If you write less readable code in PHP because you are counting CPU cycles which most of the time don't even add up to a noticeable amount of time, you are doing something wrong IMHO. ------------------------------------------------------------------------ [2004-01-01 13:26:57] amaranth at phphacking dot com I agree that the code examples in the manual teach bad habits. People use them and don't realize there is a better solution, so they write everything with this slower code. Once a script gets large enough these do add up but by then its too late because so many lines would have to be changed. If the manual showed better examples or at least told people about the faster solutions it would fix a lot of headaches. ------------------------------------------------------------------------ [2004-01-01 05:55:31] derick@php.net Don't smoke too much in the new year please. ------------------------------------------------------------------------ [2004-01-01 04:51:12] vrana@php.net Double quotes and concatenation in output don't cause significant lost in performance. foreach too, furthermore it's better readable than while. Just my opinion. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/26759 -- Edit this bug report at http://bugs.php.net/?id=26759&edit=1

« previous php.doc (#969357820) next »