Cannot register classes after MINIT
| From: | Jeff Brown | Date: | Sat, 18 Sep 2010 20:01:11 +0000 |
| Subject: | Cannot register classes after MINIT | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-49765@lists.php.net to get a copy of this message | ||
I have recently tried registering a class (via zend_register_class) inside of a PHP_FUNCTION, though
this may sound weird and an unecessary function I ask that you ignore this request.I have noticed
that registering goes fine but every time I declare a class after the call to my function,
e.g:create_class_function('class_name');class Test { }
My PHP process crashes, not declaring the Test classes causes no crash, I also noticed that If I
move my code to the MINIT part no crash occurs and all goes well as with other PHP extensions.
That got me wondering as to what was causing the crash and if it is indeed not possible to register
classes after module & request init (no matter the reason for the registration), if there is a
way after all I would like to know about it but I mostly wonder as to why this is not possible.
Thank you