mirror of
https://github.com/php/php-src.git
synced 2025-01-03 17:33:32 +08:00
23 lines
257 B
PHP
23 lines
257 B
PHP
--TEST--
|
|
default argument value in interface implementation
|
|
--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)
|