[PHP-DEV] Re: ifsetor(), goto, 5.x, my two cents

2005-06-09 Thread Taco van den Broek
It will be difficult to define the check for such a coalesce function that everybody agrees on. Personnally I like the !empty test, but would want it to check on != 0 too. Most probably my favourite check would be something like: !empty($foo) || (string)$foo !== '' Someone else might want thi

[PHP-DEV] Re: static/object method

2004-06-24 Thread Taco van den Broek
Hans Lellelid wrote: Hi all, I have a pattern I'm trying to implement in PHP5 using a class that could be called statically or non-statically. Perhaps "pattern" gives this too much legitimacy :) I can't figure out how to do this & wanted to ask if a) it's possible at all and b) if there's been

[PHP-DEV] Re: output buffering callback limitation

2004-06-10 Thread Taco van den Broek
Okin okin wrote: Hi, I'm having trouble with output buffering limitation and the output_callback function of ob_start. look at this script : function ob_perso_handler($buffer) { ob_start(); echo 'foo'; $buffer .= ob_get_contents(); ob_end_clean(); r

[PHP-DEV] Confusing pointers in PHP 4 and 5

2004-06-08 Thread Taco van den Broek
While venus is crossing the sun I'm trying to model a tree using two arrays; one containing the structure of the tree and the other containing the data of the nodes. The second array also contains pointers to 'subtrees' of the first array. Anyway, I discovered a strange behavior when I dumped th