[PHP] Re: Please save me from insanity - PHP4 / OO

2004-12-05 Thread Greg Beaver
Ben wrote: class Ob { var $prop; } class Test { function setMe($ob) { $ob-prop = $this; } } $ob = new Ob(); $test = new Test(); $test-setMe($ob); if ($ob-prop) error_log(PHP is OK); else error_log(PHP is a fucking MARE); What is my problem here? Please help! You've run into the

[PHP] Re: Please save me from insanity - PHP4 / OO

2004-12-05 Thread Ben
Thanks a lot for your responses guys. Unfortunately it still isn't working for me. I've tried both : $ob-prop = $this and $ob-prop = $this (just in case) Neither produce a PHP is OK. I'm using version 4.2.2 btw. (If ONLY I was on 5) Thanks again, Ben Greg Beaver wrote: Ben wrote:

[PHP] Re: Please save me from insanity - PHP4 / OO

2004-12-05 Thread Manuel Lemos
Hello, On 12/05/2004 03:46 PM, Ben wrote: $ob-prop = $this; It should be $ob-prop = $this; under PHP 4/Zend Engine 1. -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products

[PHP] Re: Please save me from insanity - PHP4 / OO

2004-12-05 Thread Greg Beaver
Ben wrote: Thanks a lot for your responses guys. Unfortunately it still isn't working for me. I've tried both : $ob-prop = $this and$ob-prop = $this (just in case) Neither produce a PHP is OK. I'm using version 4.2.2 btw. (If ONLY I was on 5) Thanks again, Ben Greg wrote: class Test {

[PHP] Re: Please save me from insanity - PHP4 / OO

2004-12-05 Thread Greg Beaver
Ben wrote: class Ob { var $prop; } class Test { function setMe($ob) { $ob-prop = $this; } } $ob = new Ob(); $test = new Test(); $test-setMe($ob); if ($ob-prop) error_log(PHP is OK); You should use if (is_a($ob-prop, 'test')) Greg -- PHP General Mailing List

[PHP] Re: Please save me from insanity - PHP4 / OO

2004-12-05 Thread Ben
Thanks a lot Greg - those pesky s! Code now all working... Greg Beaver wrote: Ben wrote: class Ob { var $prop; } class Test { function setMe($ob) { $ob-prop = $this; } } $ob = new Ob(); $test = new Test(); $test-setMe($ob); if ($ob-prop) error_log(PHP is OK); You should use if