|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-09-09 12:57 UTC] sjoerd@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 19:00:02 2025 UTC |
Description: ------------ <?php class xyz { public function getName($id) { return $id; } } xyz::getName(1); ?> ## in the above class i can access the class xyz method by "::", however i have not created the instance of the class. by the oop's law , we can access a method by this way,method defined as static method. its working fine in both case either create a object of the class or by "::" to access. can please describe me the things because its not following the oop's law. Regards Binay Kumar