|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-01-12 06:44 UTC] sniper@php.net
[2004-01-12 06:56 UTC] jonas at datatal dot se
[2004-01-12 07:58 UTC] alan_k@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 13:00:02 2025 UTC |
Description: ------------ It is possible to call a class function directly dispite that it doesnt have the static keyword. Reproduce code: --------------- <?php class Test { function MyFunction() { echo 'Hello'; } } Test::MyFunction(); ?> Expected result: ---------------- Should only be possible if the function have been defined with the static keyword. <?php class Test { static function MyFunction() { echo 'Hello'; } } Test::MyFunction(); ?> Actual result: -------------- The code works (it shouldnt).