Annotation of embedaddon/php/tests/lang/bug24652.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #24652 (broken array_flip())
! 3: --FILE--
! 4: <?php
! 5: /* This works */
! 6: $f = array('7' => 0);
! 7: var_dump($f);
! 8: var_dump(array_key_exists(7, $f));
! 9: var_dump(array_key_exists('7', $f));
! 10:
! 11: print "----------\n";
! 12: /* This doesn't */
! 13: $f = array_flip(array('7'));
! 14: var_dump($f);
! 15: var_dump(array_key_exists(7, $f));
! 16: var_dump(array_key_exists('7', $f));
! 17: ?>
! 18: --EXPECT--
! 19: array(1) {
! 20: [7]=>
! 21: int(0)
! 22: }
! 23: bool(true)
! 24: bool(true)
! 25: ----------
! 26: array(1) {
! 27: [7]=>
! 28: int(0)
! 29: }
! 30: bool(true)
! 31: bool(true)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>