File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / spl / tests / bug62978.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 01:32:02 2013 UTC (11 years 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 #62987 (Assigning to ArrayObject[null][something] overrides all undefined variables)
--FILE--
<?php
$a = new ArrayObject();

$b = array();

$a[null]['hurr'] = 'durr';

var_dump($a['epic_magic']);
var_dump($b['epic_magic']);
var_dump($c['epic_magic']); // Undefined var!!

$d = array();
var_dump($a['epic_magic']); // more magic!
var_dump($d['epic_magic']);

$e = 'srsly?';
var_dump($a['epic_magic']); // srsly.
var_dump(isset($a['epic_magic']));

$fp = fopen(__FILE__, 'r');
var_dump($a[$fp]);

fclose($fp);
--EXPECTF--
Notice: Undefined index: epic_magic in %sbug62978.php on line %d
NULL

Notice: Undefined index: epic_magic in %sbug62978.php on line %d
NULL

Notice: Undefined variable: c in %sbug62978.php on line %d
NULL

Notice: Undefined index: epic_magic in %sbug62978.php on line %d
NULL

Notice: Undefined index: epic_magic in %sbug62978.php on line %d
NULL

Notice: Undefined index: epic_magic in %sbug62978.php on line %d
NULL
bool(false)

Strict Standards: Resource ID#%d used as offset, casting to integer (%d) in %sbug62978.php on line %d

Notice: Undefined offset: %d in %sbug62978.php on line %d
NULL

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