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

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, so

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 = Your_Package_Name::factory(); // $this = Your_Package_Name::singleton(); eval('$this =

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 would be

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 should one want to do that? Why should PHP allow this? For one

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... (like C::A_foo) which then calls A::foo internally? I'd

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

2004-02-17 Thread Brad Fisher
incurring a performance penalty yet again. Any suggestions how this could be more efficient? Personally, I'd like to see syntax directly in the engine to support this: $c = new C; $c-A::foo(); Though the static version C::A::foo() looks a little wierd -Brad Fisher -- PHP Internals - PHP

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