| 
	
 | 
 Posted by Jerry Stuckle on 09/18/07 22:46 
Steve wrote: 
> "Jerry Stuckle" <jstucklex@attglobal.net> wrote in message  
> news:Y9qdnVGULc4ua3LbnZ2dnUVZ_uvinZ2d@comcast.com... 
>> NoDude wrote: 
>>> Ahem... I have a feeling I'll get shot, stabbed and hung for this, 
>>> buuuuuut... There's really no need for require_once in __autoload, 
>>> because if you've reached the __autoload function, the class is 
>>> obviously not present (no sense making php check for it a second 
>>> time). Also, if you're including from the same directory, use './'. 
>>> $class_name.'.php', that way php won't look in the includes paths. 
>>> 
>> No, you're correct, there's no reason to use require_once if you use  
>> autoload. 
>> 
>> OTOH, while require_once means you need to add another statement to your  
>> code 
>  
> no, it means first that you change include to require...and then you tac on  
> '_once' to 'require'...that's only 5 character's difference...and on the  
> same line as the original.  
>  
>  
 
Not if you're depending on autoload.  No include statement to change. 
 
--  
================== 
Remove the "x" from my email address 
Jerry Stuckle 
JDS Computer Training Corp. 
jstucklex@attglobal.net 
==================
 
  
Navigation:
[Reply to this message] 
 |