php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75099 deprecated features is working in terminal
Submitted: 2017-08-20 07:49 UTC Modified: 2017-08-20 08:00 UTC
From: login at gsdb dot net Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 7.0.22 OS: ubuntu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: login at gsdb dot net
New email:
PHP Version: OS:

 

 [2017-08-20 07:49 UTC] login at gsdb dot net
Description:
------------
When I run test.php via browser, it outputs:

Deprecated: Non-static method foo::bar() should not be called statically in /home/.../test.php on line 8
I am not static!

//-------------------------------------

When I run test.php via terminal, it outputs:
I am not static!

Test script:
---------------
<?php
class foo {
    function bar() {
        echo 'I am not static!';
    }
}

foo::bar();

Expected result:
----------------
It should output "Deprecated: Non-static method foo::bar()[...]" in terminal as well.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-08-20 07:51 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2017-08-20 07:51 UTC] requinix@php.net
Check your error_reporting, display_errors, and/or error_log settings.
 [2017-08-20 07:55 UTC] login at gsdb dot net
error_reporting = E_ALL
display_errors = On
error_log = /var/log/php/php.log
 [2017-08-20 07:56 UTC] requinix@php.net
There's your answer.
 [2017-08-20 07:58 UTC] login at gsdb dot net
error_reporting is E_ALL, so every error should be reported, right?
 [2017-08-20 08:03 UTC] login at gsdb dot net
Thanks!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 14:01:29 2024 UTC