{"action":"closed","issue":{"url":"https://api.github.com/repos/phalcon/zephir/issues/862","labels_url":"https://api.github.com/repos/phalcon/zephir/issues/862/labels{/name}","comments_url":"https://api.github.com/repos/phalcon/zephir/issues/862/comments","events_url":"https://api.github.com/repos/phalcon/zephir/issues/862/events","html_url":"https://github.com/phalcon/zephir/issues/862","id":65683217,"number":862,"title":"Nested static function call, wrong result for get_called_class","user":{"login":"steffengy","id":1194855,"avatar_url":"https://avatars.githubusercontent.com/u/1194855?v=3","gravatar_id":"","url":"https://api.github.com/users/steffengy","html_url":"https://github.com/steffengy","followers_url":"https://api.github.com/users/steffengy/followers","following_url":"https://api.github.com/users/steffengy/following{/other_user}","gists_url":"https://api.github.com/users/steffengy/gists{/gist_id}","starred_url":"https://api.github.com/users/steffengy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steffengy/subscriptions","organizations_url":"https://api.github.com/users/steffengy/orgs","repos_url":"https://api.github.com/users/steffengy/repos","events_url":"https://api.github.com/users/steffengy/events{/privacy}","received_events_url":"https://api.github.com/users/steffengy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-01T13:22:15Z","updated_at":"2015-04-01T16:55:55Z","closed_at":"2015-04-01T16:55:55Z","body":"```\r\nclass BBDebug\r\n{\r\n    public static function call()\r\n    {\r\n        var instance;\r\n        let instance = new AADebug();\r\n        return instance->wrapFunc();\r\n    }\r\n}\r\n```\r\n\r\n```\r\nclass AADebug\r\n{\r\n    public static function r()\r\n    {\r\n        echo get_called_class();\r\n    }\r\n\r\n    public function wrapFunc()\r\n    {\r\n        AADebug::r();\r\n    }\r\n}\r\n\r\n```\r\n\r\nPHP:\r\n```\r\nBBDebug::call();\r\n```\r\n\r\nResults in\r\n```\r\nXX\\BBDebug\r\n```\r\nwhen it cleary should be\r\n```\r\nXX\\AADebug\r\n```\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/10314450-nested-static-function-call-wrong-result-for-get_called_class?utm_campaign=plugin&utm_content=tracker%2F280146&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F280146&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"}}