mirror of
https://github.com/php/php-src.git
synced 2024-12-01 05:43:38 +08:00
24 lines
364 B
PHP
24 lines
364 B
PHP
--TEST--
|
|
default argument value in interface implementation
|
|
--SKIPIF--
|
|
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
interface test {
|
|
public function bar();
|
|
}
|
|
|
|
class foo implements test {
|
|
|
|
public function bar($arg = 2) {
|
|
var_dump($arg);
|
|
}
|
|
}
|
|
|
|
$foo = new foo;
|
|
$foo->bar();
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(2)
|