RE: [PHP] extended class question

2004-09-13 Thread Ed Lazor
> Because test's var1 is private. > > test->var1 isn't accessible by class testing, so the assignment you're > doing in testing's constructor is assigning "Pizza Delivery" to > testing->var1 instead. > > When you call $test2->get_var1() you're calling the parent's get_var1() > method, which print

Re: [PHP] extended class question

2004-09-13 Thread Rick Fletcher
Ed Lazor wrote: How come the output to this script is "World Trade Center" instead of "Pizza Delivery"? Thanks, Ed class test { private $var1; function __construct() { $this->var1 = "World Tra

Re: [PHP] extended class question

2004-09-13 Thread Curt Zirzow
* Thus wrote Ed Lazor: > How come the output to this script is "World Trade Center" instead of "Pizza > Delivery"? > > Thanks, > > Ed > > > > > class test { > private $var1; defines 'test' class to only have access. >