summaryrefslogtreecommitdiff
path: root/tests/classes/static_mix_2.phpt
blob: 7f89ba3987482249ed1d9d0c71198d13fc1fc327 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--TEST--
ZE2 You cannot overload a non static method with a static method
--FILE--
<?php

class pass {
    function show() {
        echo "Call to function pass::show()\n";
    }
}

class fail extends pass {
    static function show() {
        echo "Call to function fail::show()\n";
    }
}

$t = new pass();
$t->show();
fail::show();

echo "Done\n"; // shouldn't be displayed
?>
--EXPECTF--
Fatal error: Cannot make non static method pass::show() static in class fail in %s on line 10