NYCPHP Meetup

NYPHP.org

[nycphp-talk] Re: PHP 5 Objects and fsockopen

Sol sol2ray at yahoo.fr
Thu Sep 2 12:38:09 EDT 2004


>From what I understand, you use __set, __get or __call
to overload the behavior of existing properties and
functions, but not create them on the fly.
I think that's what overload means.(correct me if I'm
wrong, French is my first language).

If your intention is to create properties on the fly,
you shouldn't use __set and __get.
You can just do something like this:
$obj->x = 'something';
where $x was not proviously declared.
It works fine event under E_STRICT.


--- Joseph Crawford <codebowl at gmail.com> wrote:

> Sol,
> 
> that is because when you use $this->VAR  and it is
> not declared __get
> and __set should take care of that, it does for my
> other variable
> timeout.  I dont think the fsockopen function likes
> me doing that ;)
> 
> it works if i declare them 
> 
> Joe Crawford Jr.
> _______________________________________________
> New York PHP Talk
> Supporting AMP Technology (Apache/MySQL/PHP)
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.newyorkphp.org
> 


=====
Sol Touré
PHPBTREE
http://phpbtree.com


		
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush



More information about the talk mailing list