blob: e6518775ff5fee977f5ad0ea338a91bb0eddf59c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
--TEST--
ZE2 The child class can re-use the parent class name for a function member
--FILE--
<?php
class base {
function base() {
echo __CLASS__."::".__FUNCTION__."\n";
}
}
class derived extends base {
function base() {
echo __CLASS__."::".__FUNCTION__."\n";
}
}
$obj = new derived();
$obj->base();
?>
--EXPECTF--
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; base has a deprecated constructor in %s on line %d
base::base
derived::base
|