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
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:
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
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 {
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
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
6 matches
Mail list logo