php-src/Zend/tests/022.phpt
2008-03-01 13:53:32 +00:00

25 lines
324 B
PHP

--TEST--
Implementating abstracting methods and optional parameters
--FILE--
<?php
abstract class Base
{
abstract function someMethod($param);
}
class Ext extends Base
{
function someMethod($param = "default")
{
echo $param, "\n";
}
}
$a = new Ext();
$a->someMethod("foo");
$a->someMethod();
--EXPECT--
foo
default