#28406 [Opn->Bgs]: New string offset syntax

From: Date: Sat, 15 May 2004 17:59:40 +0000
Subject: #28406 [Opn->Bgs]: New string offset syntax
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-59661@lists.php.net to get a copy of this message
ID: 28406 Updated by: derick@php.net Reported By: solace at ezmail dot ru -Status: Open +Status: Bogus Bug Type: Zend Engine 2 problem Operating System: WinXP PHP Version: 5.0.0RC2 New Comment: That PDF is not authorative. Previous Comments: ------------------------------------------------------------------------ [2004-05-14 22:55:53] solace at ezmail dot ru Description: ------------ Here is an example from ZendEngine-2.0.pdf (from zend.com): An example of the new functionality: $str1 = $str2 = “”; $str1{0} = ‘a’; $str2[0] = ‘a’; The result will be $str1 being the string “a” But we still get array, just as for []. Reproduce code: --------------- $str1 = ""; $str1{0} = 'a'; var_dump($str1); Expected result: ---------------- string(1) "a" Actual result: -------------- array(1) { [0]=> string(1) "a" } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28406&edit=1

« previous php.bugs (#59661) next »