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

From: Date: Thu, 02 Feb 2017 12:34:20 +0000
Subject: Doc->Bug #74032 [Opn->Fbk]: 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-207118@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 Updated by: requinix@php.net Reported by: roma dot chikunov at gmail dot com Summary: The code should throw a DEPRECATED message and it doesn't -Status: Open +Status: Feedback -Type: Documentation Problem +Type: Bug -Package: Documentation problem +Package: Scripting Engine problem Operating System: Xubuntu PHP Version: 7.0.15 Block user comment: N Private report: N New Comment: Works for me. https://3v4l.org/p0K0l Do you have display_errors on? Maybe you're logging errors to a file? Previous Comments: ------------------------------------------------------------------------ [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 (#207118) next »