File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
spl /
tests /
bug61347.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue May 29 12:34:43 2012 UTC (12 years, 2 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
HEAD
php 5.4.3+patches
--TEST--
Bug #61347 (inconsist isset behavior of Arrayobject)
--FILE--
<?php
$a = array('b' => NULL, 37 => NULL);
var_dump(isset($a['b'])); //false
$b = new ArrayObject($a);
var_dump(isset($b['b'])); //false
var_dump(isset($b[37])); //false
var_dump(isset($b['no_exists'])); //false
var_dump(empty($b['b'])); //true
var_dump(empty($b[37])); //true
var_dump(array_key_exists('b', $b)); //true
var_dump($b['b']);
$a = array('b' => '', 37 => false);
$b = new ArrayObject($a);
var_dump(isset($b['b'])); //true
var_dump(isset($b[37])); //true
var_dump(isset($b['no_exists'])); //false
var_dump(empty($b['b'])); //true
var_dump(empty($b[37])); //true
--EXPECT--
bool(false)
bool(false)
bool(false)
bool(false)
bool(true)
bool(true)
bool(true)
NULL
bool(true)
bool(true)
bool(false)
bool(true)
bool(true)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>