-
Notifications
You must be signed in to change notification settings - Fork 98
Closed
Description
Hi!
I newbie in php, and i have a problem with Ds\Map()
If I use a reference as a key or I use variable with a reference as a key Ds\Map cannot found my value.
Reproduce code:
<?php
$map = new Ds\Map();
$str = "test_key";
$str_ref = &$str; // comment uncomment this
$map[$str] = "stored"; // try $str_ref too
if ($map->hasKey($str)) { // try $str_ref too
echo "found";
} else {
echo "not found";
}
Version info:
Linux home-desktop 4.10.13-1-ARCH #1 SMP PREEMPT Thu Apr 27 12:15:09 CEST 2017 x86_64 GNU/Linux
PHP 7.1.5 (cli) (built: May 9 2017 16:55:02) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Xdebug v2.5.3, Copyright (c) 2002-2017, by Derick Rethans
Metadata
Metadata
Assignees
Labels
No labels