> -----Original Message-----
> From: Nathan Rixham [mailto:nrix...@gmail.com] 
> Sent: Friday, November 20, 2009 1:29 AM
> To: Daevid Vincent
> Cc: php-general@lists.php.net
> Subject: Re: need a find/replace command to fix my require_once
> 
> Daevid Vincent wrote:
> > I was reading this: 
> http://pear.php.net/manual/en/standards.including.php
> > and it states: 
> > 
> >     "Note: include_once and require_once are statements, 
> not functions.
> > Parentheses should not surround the subject filename." 
> > 
> > I never knew that. I've always (wrongly) used:
> >  
> >      require_once('/path/to/my/file');
> >  
> 
> if it ain't broken don't fix it - why not just ensure you do it the
> correct way (or preferred way) in the future.
> 
> sure the time could better be invested fixing a bug, writing a test or
> documenting something.

I considered this of course. But...

[a] Other coders will no doubt take a completed page as a template and modify, 
thereby causing MORE erroneous syntactical code.
[b] I can't think of any other language that uses parenthesis for an 'include' 
(C, Perl, Java, Ruby, etc.) with the exception of
maybe LOLcode.
[c] It does seem to be the PHP blessed way (PEAR or not) looking at their 
examples even.
[d] it was a good exercise in learning more about 'sed', 'find' and bash pipes. 
Not that I wrote it all, but deciphering what others
showed me really helped.
[e] because I'm a guy and a coder, and that's what we do. We do stuff 'just 
cause' and we 'refactor' useless shit for our own
satisfaction. ;-)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to