The sample you provided is invalid PHP and has several problems:
public scoreTest() { ... }
is not a function declaration - you need to declare a function with the keyword "function".
The syntax should be sooner:
public function scoreTest() { ... }
Secondly, wrapping the bigTest () and smallTest () functions in a public function () {} does not make them private - you should use a private keyword for both of them separately:
class test () { public function newTest(){ $this->bigTest(); $this->smallTest(); } private function bigTest(){
It is also an agreement to capitalize class names in class declarations ("Test").
Hope this helps.
pjbeardsley Nov 12 '09 at 20:48 2009-11-12 20:48
source share