Doc #61507 [Opn->Ver]: Incompatibilty when using isset() on a string with a string key as offset

From: Date: Mon, 26 Mar 2012 16:37:53 +0000
Subject: Doc #61507 [Opn->Ver]: Incompatibilty when using isset() on a string with a string key as offset
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-8119@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=61507&edit=1 ID: 61507 Updated by: yohgaki@php.net Reported by: joffery at ne2000 dot nl Summary: Incompatibilty when using isset() on a string with a string key as offset -Status: Open +Status: Verified Type: Documentation Problem Package: Strings related Operating System: Linux PHP Version: 5.4.0 Block user comment: N Private report: N New Comment: It does. This should be addressed. Previous Comments: ------------------------------------------------------------------------ [2012-03-26 10:18:34] joffery at ne2000 dot nl Description: ------------ Incompatibility when using isset() on a string with a string key as offset. Probably an effect of the change "Simplified string offset reading. $str[1][0] is now a legal construct.". Current implementation seems correct although this is an incompatibility in previous versions and should be documented. A previous bug (#37727) noted that behavior before 5.4 was incorrect but was filed as 'not a bug'. Test script: --------------- $ php -r '$str = "str"; var_dump(isset($str["x"]));' Expected result: ---------------- bool(false) Actual result: -------------- PHP 5.3.9: bool(true) PHP 5.4.0: bool(false) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=61507&edit=1

« previous php.doc.bugs (#8119) next »