note 24327 modified in language.oop by jmcastagnetto

From: Date: Tue, 13 Aug 2002 23:13:53 +0000
Subject: note 24327 modified in language.oop by jmcastagnetto
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-34969@lists.php.net to get a copy of this message
[Editor's note: There are no real "private" variables/methods in PHP 3 or PHP 4, some functions treat variables/methods whose names start with and underscore as if they were private, but they are still accessible. This is schedule to change when the Zend 2 engine gets released, don't hold your breath just yet ;-)] Don't know if it's undocumented, or if I just can't find it, but... yes, you can make private functions/variables! Just prepend the variable name with an underscore, ie. var $_myPrivateVar or function _myPrivateFunction --was-- Don't know if it's undocumented, or if I just can't find it, but... yes, you can make private functions/variables! Just prepend the variable name with an underscore, ie. var $_myPrivateVar or function _myPrivateFunction http://www.php.net/manual/en/language.oop.php

« previous php.notes (#34969) next »