{"action":"opened","issue":{"url":"https://api.github.com/repos/facebook/hhvm/issues/6785","labels_url":"https://api.github.com/repos/facebook/hhvm/issues/6785/labels{/name}","comments_url":"https://api.github.com/repos/facebook/hhvm/issues/6785/comments","events_url":"https://api.github.com/repos/facebook/hhvm/issues/6785/events","html_url":"https://github.com/facebook/hhvm/issues/6785","id":128927720,"number":6785,"title":"is_scalar() returns true for static array variable in class","user":{"login":"kaisung","id":629097,"avatar_url":"https://avatars.githubusercontent.com/u/629097?v=3","gravatar_id":"","url":"https://api.github.com/users/kaisung","html_url":"https://github.com/kaisung","followers_url":"https://api.github.com/users/kaisung/followers","following_url":"https://api.github.com/users/kaisung/following{/other_user}","gists_url":"https://api.github.com/users/kaisung/gists{/gist_id}","starred_url":"https://api.github.com/users/kaisung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaisung/subscriptions","organizations_url":"https://api.github.com/users/kaisung/orgs","repos_url":"https://api.github.com/users/kaisung/repos","events_url":"https://api.github.com/users/kaisung/events{/privacy}","received_events_url":"https://api.github.com/users/kaisung/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-26T20:09:23Z","updated_at":"2016-01-26T20:09:23Z","closed_at":null,"body":"The is_scalar() function incorrectly returns true for static array variables within a class.  The is_array() function seems to work correctly (and I'm using it as a workaround).  Tested on HHVM 3.11.1 release.\r\n\r\nThe code below prints \"true\" instead of \"false\".\r\n\r\n```\r\n<?php\r\n\r\nclass Config\r\n{\r\n    static $STATIC_ARRAY = array('foo' => 'bar');\r\n}\r\n\r\nif (is_scalar(Config::$STATIC_ARRAY)) {\r\n    print \"true\\n\";\r\n}\r\nelse {\r\n    print \"false\\n\";\r\n}\r\n```"}}