Bug #74032 [Fbk->Opn]: The code should throw a DEPRECATED message and it doesn't

From: Date: Thu, 02 Feb 2017 12:46:32 +0000
Subject: Bug #74032 [Fbk->Opn]: The code should throw a DEPRECATED message and it doesn't
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207120@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74032&edit=1 ID: 74032 User updated by: roma dot chikunov at gmail dot com Reported by: roma dot chikunov at gmail dot com Summary: The code should throw a DEPRECATED message and it doesn't -Status: Feedback +Status: Open Type: Bug Package: Scripting Engine problem Operating System: Xubuntu PHP Version: 7.0.15 Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2017-02-02 12:34:19] requinix@php.net Works for me. https://3v4l.org/p0K0l Do you have display_errors on? Maybe you're logging errors to a file? ------------------------------------------------------------------------ [2017-02-02 12:23:36] 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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74032&edit=1

« previous php.bugs (#207120) next »