{"action":"created","issue":{"url":"https://api.github.com/repos/nikic/PHP-Parser/issues/146","labels_url":"https://api.github.com/repos/nikic/PHP-Parser/issues/146/labels{/name}","comments_url":"https://api.github.com/repos/nikic/PHP-Parser/issues/146/comments","events_url":"https://api.github.com/repos/nikic/PHP-Parser/issues/146/events","html_url":"https://github.com/nikic/PHP-Parser/issues/146","id":48918521,"number":146,"title":"Preserve information about used array syntax and number format.","user":{"login":"suralc","id":730039,"avatar_url":"https://avatars.githubusercontent.com/u/730039?v=3","gravatar_id":"","url":"https://api.github.com/users/suralc","html_url":"https://github.com/suralc","followers_url":"https://api.github.com/users/suralc/followers","following_url":"https://api.github.com/users/suralc/following{/other_user}","gists_url":"https://api.github.com/users/suralc/gists{/gist_id}","starred_url":"https://api.github.com/users/suralc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suralc/subscriptions","organizations_url":"https://api.github.com/users/suralc/orgs","repos_url":"https://api.github.com/users/suralc/repos","events_url":"https://api.github.com/users/suralc/events{/privacy}","received_events_url":"https://api.github.com/users/suralc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-11-15T17:19:31Z","updated_at":"2015-01-23T10:36:20Z","closed_at":null,"body":"Is it currently impossible to retrieve the syntax type used to define an array (`array()` vs `[]`) or did I overlook something? (The grammar file already makes a difference, but creates the same Array_ instance, maybe pass an optional parameter if the new syntax is used?)\r\n\r\nAlso binary and octal numbers (`0b1010` and `0777`) are represented as LNumber. It may  be useful to have the source format available there. (type attribute with a LNumber::TYPE_BINARY constant or similiar)\r\n\r\nThis may be used for some static analysis scenarios and detection of minimal php version requirements.\r\n\r\nedit: I read about the second part in #26 It may still be nice to have atleast the used array notation as a flag on the node.\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/nikic/PHP-Parser/issues/comments/71175459","html_url":"https://github.com/nikic/PHP-Parser/issues/146#issuecomment-71175459","issue_url":"https://api.github.com/repos/nikic/PHP-Parser/issues/146","id":71175459,"user":{"login":"gonzaloserrano","id":349328,"avatar_url":"https://avatars.githubusercontent.com/u/349328?v=3","gravatar_id":"","url":"https://api.github.com/users/gonzaloserrano","html_url":"https://github.com/gonzaloserrano","followers_url":"https://api.github.com/users/gonzaloserrano/followers","following_url":"https://api.github.com/users/gonzaloserrano/following{/other_user}","gists_url":"https://api.github.com/users/gonzaloserrano/gists{/gist_id}","starred_url":"https://api.github.com/users/gonzaloserrano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonzaloserrano/subscriptions","organizations_url":"https://api.github.com/users/gonzaloserrano/orgs","repos_url":"https://api.github.com/users/gonzaloserrano/repos","events_url":"https://api.github.com/users/gonzaloserrano/events{/privacy}","received_events_url":"https://api.github.com/users/gonzaloserrano/received_events","type":"User","site_admin":false},"created_at":"2015-01-23T10:36:20Z","updated_at":"2015-01-23T10:36:20Z","body":"Hi, this addition would be great! Since we have part of our codebase that supports PHP 5.3 and sometimes our devs use short array syntax by mistake, we could write a script to analyze the changed files and check for this behaviour."}}