xref: /PHP-8.1/Zend/tests/022.phpt (revision 7aacc705)
1--TEST--
2Implementing abstracting methods and optional parameters
3--FILE--
4<?php
5
6abstract class Base
7{
8    abstract function someMethod($param);
9}
10
11class Ext extends Base
12{
13    function someMethod($param = "default")
14    {
15        echo $param, "\n";
16    }
17}
18
19$a = new Ext();
20$a->someMethod("foo");
21$a->someMethod();
22?>
23--EXPECT--
24foo
25default
26