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 (11 years, 8 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

    1: --TEST--
    2: Bug #64988 (Class loading order affects E_STRICT warning)
    3: --FILE--
    4: <?php
    5: abstract class Base1 {
    6: 	public function insert(array $data){
    7: 		return array_reverse($data);
    8: 	}
    9: }
   10: 
   11: class Noisy1 extends Base1 {
   12: 	public function insert(array $data, $option1 = Null) {
   13: 		if (!empty($option1)) {
   14: 			$data['option1'] = $option1;
   15: 		}
   16: 		return parent::insert($data);
   17: 	}
   18: }
   19: class Smooth1 extends Noisy1 {
   20: 	public function insert(array $data) {
   21: 		return parent::insert($data, count($data));
   22: 	}
   23: }
   24: 
   25: $o = new Smooth1();
   26: echo "okey";
   27: ?>
   28: --EXPECTF--
   29: Strict Standards: Declaration of Smooth1::insert() should be compatible with Noisy1::insert(array $data, $option1 = NULL) in %sbug64988.php on line 20
   30: okey

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