On Sun, 16 Oct 2005, Sebastian Bergmann wrote:

> Andi Gutmans schrieb:
> > I'm talking about the following function decleration:
> > 
> > function testNull(MyClass $obj = 1) {
> > }
> 
>  The following should work, too, to allow optional, type-hinted Array
>  parameters:
> 
>    function someMethod(Array $array = array()) {
>    }

That seems to work fine already:

[EMAIL PROTECTED]:/dat/dev/php/php-6.0dev$ cat /tmp/test.php
<?php
class P { }
class T {
    function f(array $p = array()) {
        var_dump($p);
    }
}

$o=new T();
$o->f();
?>
[EMAIL PROTECTED]:/dat/dev/php/php-6.0dev$ sapi/cli/php 
-derror_reporting=8191 /tmp/test.php
array(0) {
}

regards,
Derick
-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to