php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47267 Every class method can be called as static
Submitted: 2009-02-02 03:44 UTC Modified: 2009-02-02 14:10 UTC
From: piero dot recchia at gmail dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.2.8 OS: Ubuntu 8.10
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: piero dot recchia at gmail dot com
New email:
PHP Version: OS:

 

 [2009-02-02 03:44 UTC] piero dot recchia at gmail dot com
Description:
------------
Every class method can be called as static:
A wrote a class without static method, but i can call any method as static method.

Reproduce code:
---------------
<?php
class Test {

    public function nonStatic() {
        echo 'Hola Non-Static';
    }
}

Test::nonStatic();
?>

Expected result:
----------------
a error message or exception

Actual result:
--------------
Hola Non-Static

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-02 14:10 UTC] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 27 13:00:02 2025 UTC