#20792 [Opn->Csd]: callback_func() for failed new() or failed function calls
ID: 20792
Updated by: derick@php.net
Reported By: markhers@REMOVE.green-ant.com
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: All (Mainly Linux/Mac OS X)
PHP Version: 4.3.0RC2
New Comment:
Zend Engine 2 will support this, see:
http://cvs.php.net/co.php/ZendEngine2/ZEND_CHANGES?login=2&r=1.43
(it's
not documented yet there though and I couldn't find any docs in it this
quickly).
Previous Comments:
------------------------------------------------------------------------
[2002-12-03 09:38:14] markhers@REMOVE.green-ant.com
At work, I have had my programmers code their work into the following
naming conventions which basically read:
class.{classname}.phps
function.{functionname}.phps
Each file contains the code solely for that particular function or
class, and then we have a system which autoloads all of these files at
startup as if they were a framework.
However, as I look at our performance, which is not optimal considering
the number of files we are loading per request when we only need a
fraction of the code loaded, it seems like it would be a huge boon to
have two new callbacks added to PHP:
class_callback_func()
function_callback_func()
Granted, each of these callbacks would have a price attached to them,
but it would allow programmers to, and possibly positively influence
them to, develop a 30 MB codebase, and then go wild worrying about your
core logic instead of include()s/require()s/auto_prepends, while PHP
automagically loads the proper support files to facilitate their
programming.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20792&edit=1
Thread (2 messages)