RE: [PEAR-DEV] Embedded example code

From: Date: Thu, 28 Mar 2002 20:53:26 +0000
Subject: RE: [PEAR-DEV] Embedded example code
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-5132@lists.php.net to get a copy of this message
> First, shouldn't it be My_Class::__example(); with 2 underscores? This > could create problems, and all magic functions for PHP classes currently > follow the 2 underscore rule. Doesn't really matter. Doesn't even have to be a method at all. > Second, what would the point be? Usually, I look for actual documentation > outside the source code before digging through and finding it. > If anything, > we simply create a bunch of echo's in the function, and $class->example(). Keeping example code together with the class, without unnecessary external files. > Maybe I am missing the point, but it also leads to other > potential problems, > like leaving the class in the document root. Rather, I would like to see > Oject Overloading in PHP (actually, an installed by default overload() > function that is complete and not still in development.) Indeed, as I mentioned. However PEAR stuff shouldn't be in the document root in production servers. > Frankly, its a nice thought, but not practical. How did you come to that conclusion? Personally I have the PEAR dir structure in my document root on my dev box, so it's actually no less practical, and removes the need for external example files. -- Richard Heyes "If you have any trouble sounding condescending, find a Unix user to show you how it's done." - Scott Adams

« previous php.pear.dev (#5132) next »