Bug #64326 [Fbk->NoF]: Parse error on casting a bracket array to an object

From: Date: Tue, 15 Oct 2013 11:54:38 +0000
Subject: Bug #64326 [Fbk->NoF]: Parse error on casting a bracket array to an object
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-182229@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64326&edit=1 ID: 64326 Updated by: php-bugs@lists.php.net Reported by: f at worldhomes dot com Summary: Parse error on casting a bracket array to an object -Status: Feedback +Status: No Feedback Type: Bug Package: *General Issues Operating System: Mac PHP Version: 5.4.12 Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. Previous Comments: ------------------------------------------------------------------------ [2013-02-28 17:00:36] reeze@php.net There is no such error, see: http://3v4l.org/Qjk0T PHP >= 5.4 works fine. Are you sure you are running 5.4.12? ------------------------------------------------------------------------ [2013-02-28 16:11:03] f at worldhomes dot com Description: ------------ This code does not work on Mac OSX Lion : json_encode ( (object) [ 'status' => (int) $newstatus ] ) After further debugging, problem: "(object)[]" : you can not cast a bracket array to object Parse error: unexpected '[' Test script: --------------- json_encode ( (object) [ 'status' => 4 ] ) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=64326&edit=1

« previous php.bugs (#182229) next »