|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2017-02-02 12:23 UTC] roma dot chikunov at gmail dot com
Description: ------------ --- From manual page: http://www.php.net/migration70.deprecated --- In the manual page it is written that PHP 4 constructor is deprecated, therefore an error should be logged of PHP DEPRECATED, unfortunately it doesn't happen. The sample code is taken as is (except for the error_reporting method) from the documentation. Test script: --------------- <?php error_reporting(-1); class foo { function foo() { echo 'I am the constructor'; } } $obj = new foo(); ?> Expected result: ---------------- The expected result is for an error to be logged for using a deprecated constructor. Actual result: -------------- Works like a charm without any error \ warning PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 07:00:01 2025 UTC |
Thanks for the prompt response! I am logging to to the default apache error.log file. As far as I know, error_reporting(-1) should log everything. Just out of curiosity I have checked other deprecated stuff and it worked for me (specifically options in password_hash()), hence I don't think there's an issue with the logging. Anyhow, I have also added ini_set('display_errors', '1'); to the code and there's no difference.