File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / bug64988.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 01:32:17 2013 UTC (10 years, 11 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17, HEAD
5.4.17

--TEST--
Bug #64988 (Class loading order affects E_STRICT warning)
--FILE--
<?php
abstract class Base1 {
	public function insert(array $data){
		return array_reverse($data);
	}
}

class Noisy1 extends Base1 {
	public function insert(array $data, $option1 = Null) {
		if (!empty($option1)) {
			$data['option1'] = $option1;
		}
		return parent::insert($data);
	}
}
class Smooth1 extends Noisy1 {
	public function insert(array $data) {
		return parent::insert($data, count($data));
	}
}

$o = new Smooth1();
echo "okey";
?>
--EXPECTF--
Strict Standards: Declaration of Smooth1::insert() should be compatible with Noisy1::insert(array $data, $option1 = NULL) in %sbug64988.php on line 20
okey

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>