|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-10-10 15:24 UTC] jeanseb at au-fil-du dot net
[2011-11-15 18:08 UTC] felipe@php.net
-Package: *Programming Data Structures
+Package: Scripting Engine problem
[2016-02-19 12:28 UTC] nikic@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: nikic
[2016-02-19 12:28 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 09 21:00:01 2025 UTC |
Description: ------------ If i define my own error handler with the use of the set_error_handler and the create_function functions, then the 'errors' class inside the create_function triggers the autoload function by errors that user defined error handlers can handle. It's OK! But when i make an E_STRICT error for example by defining the 'connect' function in class 'a' (which already exists in the built in mysqli class), then it won't call the autoload function, it gives me a fatal error for not finding the 'errors' class. What i expected: a) If this type of E_STRICT error cann't be handled by my own error handler, then PHP's default error handler should have been used. b) If this type of E_STRICT error can be handled by my own error handler, then the __autoload function should have been called as a last chance for opening the 'errors' class. Test script: --------------- index.php: <?php set_error_handler(create_function('', 'errors::php_error();')); function __autoload($class_name) { die('autoload called'); } include('mysql.php'); ?> mysql.php: <?php class a extends mysqli { function connect() {} } ?> Expected result: ---------------- autoload called Actual result: -------------- Fatal error: Class 'errors' not found in mysql.php on line 7