Re: [PHP-DEV] Re: Named arguments revisited

2006-01-13 Thread Brad Fisher
Hartmut Holzgraefe wrote: Brad Fisher wrote: Thus no need to rework internal parameter passing API at all. Perhaps I'm missing something? you missed that the parameter name information is just not available for internal functions, the api works by parameter positions only right now,

Re: [PHP-DEV] Re: Named arguments revisited

2006-01-13 Thread Brad Fisher
Hartmut Holzgraefe wrote: Ron Korving wrote: Let me summarize it for you then. Advantages of named parameters over associative arrays: - cleaner syntax - support for type hints - difference between required and optional parameters - generating documentation (whether with something like phpDoc

Re: [PHP-DEV] Exceptions and Errors

2004-04-15 Thread Brad Fisher
Lukas Smith wrote: > > Our original idea was to handle this with an if statement like so: > > if (version_compare(phpversion(), "5.0.0") == -1) { > > // assign factoried method to this for PHP 4 > > // $this =& ::factory(); // $this =& ::singleton(); eval('$this =& ::singleton();'); > >

Re: [PHP-DEV] php5 class initialization

2004-03-23 Thread Brad Fisher
Rasmus Lerdorf wrote: > I could see people doing: > > class foo { > function foo() { >...constructor stuff... > } > function __construct() { >$this->foo(); > } > } I actually prefer it the other way around... foo would call __construct in PHP4, and __construct

Re: [PHP-DEV] Calling methods of parent/ancestor classes in PHP5

2004-02-18 Thread Brad Fisher
Ferdinand Beyer wrote: > On 18 Feb 2004 at 11:02, Brad Fisher wrote: > > > For one because PHP doesn't allow method overloading. If I have > a method > > A::foo($a), and I want to change the prototype in B to B::foo($x, > $y), then ...snip... > > (lik

Re: [PHP-DEV] Calling methods of parent/ancestor classes in PHP5

2004-02-18 Thread Brad Fisher
Ferdinand Beyer wrote: > On 17 Feb 2004 at 14:01, Brad Fisher wrote: > > > class D { > > function bar() { > > $c = new C; > > // I'd like to call the A::foo method of C here... > > //In PHP4, I could do something like: > > Why s

[PHP-DEV] Calling methods of parent/ancestor classes in PHP5

2004-02-17 Thread Brad Fisher
oo(); $this = &$othis; } else { ... PHP 5 code with eval here ... } } The only way to make the above example work is to eval the PHP4 version (or perhaps include it?), thus incurring a performance penalty yet again. Any suggestions how this could be more efficient? Personally

Re: [PHP-DEV] B3, pear segfault, and msgs about deprecated

2003-12-18 Thread Brad Fisher
Personally, I both like and dislike this behavior. I like it for debugging purposes, since it allows me full control over whether I ignore error_reporting level or perhaps just log disabled levels instead of displaying them, etc. On the other hand, there is a minor performance issue, but if you w

Re: [PHP-DEV] Re: Fwd: Re: #25494 [Com]: array_merge allowing "false" as argument (silent when non-array is passed)

2003-09-23 Thread Brad Fisher
Jay Smith wrote: > The function is called array_merge(), not null_merge() or string_merge(). > The change was to make it act more like other array functions, like > array_intersect() or array_sum(), which also check parameters for arrays. > > What's the consensus? Keep the change or revert? Perso