8 ms·
I just saw some lines from GAE for PHP and saw very inconsistent and not quite code. All modules use require_once... well, well... And other many issues... B
by dancecodes 13y ago
I just saw some lines from GAE for PHP and saw very inconsistent and not quite code.
All modules use require_once... well, well...
And other many issues...
But looks as massive code. Maybe translated automatic.
- mortehu 13y ago> All modules use require_once... well, well... Why on earth is that a problem?
- itafroma 13y agoIt's not necessarily a problem, but it's a smell. Modern object-oriented PHP development is done with autoloaders[1]: having to require_once every class file is unnecessary and brittle. It is odd that GAE doesn't provide its own autoloader for its provided classes, and I'd expect that to be addressed in the future. [1]: http://php.net/manual/en/language.oop5.autoload.php http://php.net/manual/en/language.oop5.autoload.php
- dancecodes 13y agoyes its smell
- dancecodes 13y agoyou mean spl_autoload http://us.php.net/manual/en/function.spl-autoload.php http://us.php.net/manual/en/function.spl-autoload.php
- dancecodes 13y agomore refine answer: just use spl_autoload_register
- dancecodes 13y agowithout autoload its seems useless and as monster. Its seems as broken by design.
- furiousant 13y agoWe don't use autoload because it's slow and doesn't work with APC. Not rocket science. http://stackoverflow.com/questions/4788452/does-autoload-really-kill-performance-when-using-apclatest-versions-up-to-date http://stackoverflow.com/questions/4788452/does-autoload-rea...
- dancecodes 13y ago??? this is not argument - spl_autoload very fast its allow only one call to load module - all developers use spl_autoload APC its legacy and crappy as opcache. I think its smell from Zend. They stop (in old time) because their close ware Zend Studio must sell. And other get pain from that legacy. Im sorry. check here for start: http://talks.php.net/show/w2e09 http://talks.php.net/show/w2e09
- dancecodes 13y agofixes: more refine answer: just use spl_autoload_register
- dancecodes 13y agoneeds for speed can be satisfied