xref: /PHP-5.4/tests/classes/static_mix_2.phpt (revision ffd6f29e)
1--TEST--
2ZE2 You cannot overload a non static method with a static method
3--SKIPIF--
4<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
5--FILE--
6<?php
7
8class pass {
9	function show() {
10		echo "Call to function pass::show()\n";
11	}
12}
13
14class fail extends pass {
15	static function show() {
16		echo "Call to function fail::show()\n";
17	}
18}
19
20$t = new pass();
21$t->show();
22fail::show();
23
24echo "Done\n"; // shouldn't be displayed
25?>
26--EXPECTF--
27Fatal error: Cannot make non static method pass::show() static in class fail in %s on line %d