Edit report at https://bugs.php.net/bug.php?id=64326&edit=1

 ID:                 64326
 Updated by:         re...@php.net
 Reported by:        f at worldhomes dot com
 Summary:            Parse error on casting a bracket array to an object
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            *General Issues
 Operating System:   Mac
 PHP Version:        5.4.12
 Block user comment: N
 Private report:     N

 New Comment:

There is no such error, see: http://3v4l.org/Qjk0T 
PHP >= 5.4 works fine.

Are you sure you are running 5.4.12?


Previous Comments:
------------------------------------------------------------------------
[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

Reply via email to