[OWASP_PHPSEC] use of require_once

Abbas Naderi abiusx at owasp.org
Tue Jul 30 15:26:19 UTC 2013


We have had this discussion, going deeper is Java like. Even one namespace is not a good thing, but we're dealing with facade functions, so that's not an issue for now.

require_once is needed for loading classes and definitions. require is used for running php file, usually those that produce output not define things. There is not much overhead. PHP is an interpreted language, and performance is not really an issue here.
-A
______________________________________________________________
Notice: This message is digitally signed, its source and integrity are verifiable.
If you mail client does not support S/MIME verification, it will display a file (smime.p7s), which includes the X.509 certificate and the signature body.  Read more at Certified E-Mail with Comodo and Thunderbird in AbiusX.com

On Mordad 8, 1392, at 3:55 PM, Chris White <cwhite at remarinc.com> wrote:

> Finally! It is not as lonely in the PSR-x boat anymore. No need to recreate the wheel here, guys. Just utilize one of their sample loaders. You won’t even have to change namespaces or classnames. Although, I am in favor of going deeper than just \phpsec\. ;)
>  
> Chris White
> Network Administrator
> Remar, Inc.
> Work: 615-449-0231
> Cell: 615-948-1388
>  
> From: owasp_php_security_project-bounces at lists.owasp.org [mailto:owasp_php_security_project-bounces at lists.owasp.org] On Behalf Of Sven Rautenberg
> Sent: Tuesday, July 30, 2013 5:48 AM
> To: Minhaz A V; owasp_php_security_project at lists.owasp.org
> Subject: Re: [OWASP_PHPSEC] use of require_once
>  
> Yes. Just have a look at how "PSR-0" autoloading is done.
> 
> 
> 
> Minhaz A V <minhazav at gmail.com> schrieb:
> will it be changed to require  after autoloading is done?
>  
> 
> On Tue, Jul 30, 2013 at 3:30 PM, Minhaz A V <minhazav at gmail.com> wrote:
> Can I know how will autoloading be accomplished and what it exactly means?
>  
> 
> On Tue, Jul 30, 2013 at 3:26 PM, Sven Rautenberg <sven at rtbg.de> wrote:
> It's probably because of the current lack of autoloading, but I think this will be addressed.
> 
> 
> 
> Minhaz A V <minhazav at gmail.com> schrieb:
> while going through the codes I found the use of require_once at many places
> why isn't require  being used, when require_once  has computational overheads, it consumes more memory and is slower
>  
> reference: http://stackoverflow.com/questions/186338/why-is-require-once-so-bad-to-use
>  
>  
>  
> 
> OWASP_PHP_Security_Project mailing list
> OWASP_PHP_Security_Project at lists.owasp.org
> 
>  
> https://lists.owasp.org/mailman/listinfo/owasp_php_security_project
> 
> Regards,
> 
> Sven
>  
>  
> 
> Mit freundlichen Grüßen
> 
> Sven Rautenberg
> _______________________________________________
> OWASP_PHP_Security_Project mailing list
> OWASP_PHP_Security_Project at lists.owasp.org
> https://lists.owasp.org/mailman/listinfo/owasp_php_security_project

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.owasp.org/pipermail/owasp_php_security_project/attachments/20130730/63d2bc15/attachment.html>


More information about the OWASP_PHP_Security_Project mailing list