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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 10:01:33 2025 UTC