There is such a php-file with the class:
class.php:
class classTest { private $password; private function showName($foo) { $password= "QWERTY"; $bar = $password. " == " . $foo; return $bar; } private function hideName($foo1) { $password= "QWERTY"; $bar1 = $foo1 . " !!!! " . $password; return $bar1; } } He does any nonsense, but it doesn’t matter.
The point is that the $ password variable is used in both functions and its contents are identical.
Tell me, HOW to designate it ONCE somewhere in the class in such a way that it is visible only in the functions of this class, but not visible in the php-file, in which this file with the class is included?
I can not understand where in what cases public is put, where is private ... I broke my head, I just want to show a working and correct example to at least understand how it should work.
classTestclass, the$passwordvariable will not be visible. It happens in C # and in Java ... - Egor Randomize