{"action":"created","comment":{"url":"https://api.github.com/repos/phpspec/prophecy/pulls/comments/45628080","id":45628080,"diff_hunk":"@@ -54,7 +54,13 @@ public function __construct(StringUtil $util = null)\n      */\n     public function makeCall(ObjectProphecy $prophecy, $methodName, array $arguments)\n     {\n-        $backtrace = debug_backtrace();\n+        // For efficiency leave out 'args' in the generated backtrace\n+        // DEBUG_BACKTRACE_IGNORE_ARGS was introduced in PHP 5.3.6\n+        if (version_compare(PHP_VERSION, '5.3.6', '>=')) {\n+            $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);","path":"src/Prophecy/Call/CallCenter.php","position":8,"original_position":8,"commit_id":"ca42070734c741b0919d85b8a99cfe4a6766db56","original_commit_id":"ca42070734c741b0919d85b8a99cfe4a6766db56","user":{"login":"ockcyp","id":5054896,"avatar_url":"https://avatars.githubusercontent.com/u/5054896?v=3","gravatar_id":"","url":"https://api.github.com/users/ockcyp","html_url":"https://github.com/ockcyp","followers_url":"https://api.github.com/users/ockcyp/followers","following_url":"https://api.github.com/users/ockcyp/following{/other_user}","gists_url":"https://api.github.com/users/ockcyp/gists{/gist_id}","starred_url":"https://api.github.com/users/ockcyp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ockcyp/subscriptions","organizations_url":"https://api.github.com/users/ockcyp/orgs","repos_url":"https://api.github.com/users/ockcyp/repos","events_url":"https://api.github.com/users/ockcyp/events{/privacy}","received_events_url":"https://api.github.com/users/ockcyp/received_events","type":"User","site_admin":false},"body":"@aik099 I excluded that one when I provided `DEBUG_BACKTRACE_IGNORE_ARGS`, overriding default behaviour.\r\n\r\nsee:\r\n```php\r\n<?php\r\n\r\nclass A\r\n{\r\n    public function a()\r\n    {\r\n        return debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);\r\n    }\r\n\r\n    public function b()\r\n    {\r\n        return debug_backtrace();\r\n    }\r\n\r\n    public function c()\r\n    {\r\n        return debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT);\r\n    }\r\n}\r\n\r\n$a = new A;\r\nprint_r($a->a());\r\nprint_r($a->b());\r\nprint_r($a->c());\r\n```\r\n\r\noutput:\r\n```\r\nArray\r\n(\r\n    [0] => Array\r\n        (\r\n            [file] => /home/omer/Projects/Amara/prophecy/backtraceDebug.php\r\n            [line] => 22\r\n            [function] => a\r\n            [class] => A\r\n            [type] => ->\r\n        )\r\n)\r\nArray\r\n(\r\n    [0] => Array\r\n        (\r\n            [file] => /home/omer/Projects/Amara/prophecy/backtraceDebug.php\r\n            [line] => 23\r\n            [function] => b\r\n            [class] => A\r\n            [object] => A Object\r\n                (\r\n                )\r\n            [type] => ->\r\n            [args] => Array\r\n                (\r\n                )\r\n        )\r\n)\r\nArray\r\n(\r\n    [0] => Array\r\n        (\r\n            [file] => /home/omer/Projects/Amara/prophecy/backtraceDebug.php\r\n            [line] => 24\r\n            [function] => c\r\n            [class] => A\r\n            [object] => A Object\r\n                (\r\n                )\r\n            [type] => ->\r\n            [args] => Array\r\n                (\r\n                )\r\n        )\r\n)\r\n```","created_at":"2015-11-23T16:53:43Z","updated_at":"2015-11-23T16:53:43Z","html_url":"https://github.com/phpspec/prophecy/pull/232#discussion_r45628080","pull_request_url":"https://api.github.com/repos/phpspec/prophecy/pulls/232","_links":{"self":{"href":"https://api.github.com/repos/phpspec/prophecy/pulls/comments/45628080"},"html":{"href":"https://github.com/phpspec/prophecy/pull/232#discussion_r45628080"},"pull_request":{"href":"https://api.github.com/repos/phpspec/prophecy/pulls/232"}}},"pull_request":{"url":"https://api.github.com/repos/phpspec/prophecy/pulls/232","id":51541623,"html_url":"https://github.com/phpspec/prophecy/pull/232","diff_url":"https://github.com/phpspec/prophecy/pull/232.diff","patch_url":"https://github.com/phpspec/prophecy/pull/232.patch","issue_url":"https://api.github.com/repos/phpspec/prophecy/issues/232","number":232,"state":"open","locked":false,"title":"For efficiency leave out 'args' in the generated backtrace","user":{"login":"ockcyp","id":5054896,"avatar_url":"https://avatars.githubusercontent.com/u/5054896?v=3","gravatar_id":"","url":"https://api.github.com/users/ockcyp","html_url":"https://github.com/ockcyp","followers_url":"https://api.github.com/users/ockcyp/followers","following_url":"https://api.github.com/users/ockcyp/following{/other_user}","gists_url":"https://api.github.com/users/ockcyp/gists{/gist_id}","starred_url":"https://api.github.com/users/ockcyp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ockcyp/subscriptions","organizations_url":"https://api.github.com/users/ockcyp/orgs","repos_url":"https://api.github.com/users/ockcyp/repos","events_url":"https://api.github.com/users/ockcyp/events{/privacy}","received_events_url":"https://api.github.com/users/ockcyp/received_events","type":"User","site_admin":false},"body":"This removes 'args' element from generated backtraces. If arguments are objects it will result in great performance benefit.\r\n\r\nSee [PHP: debug_backtrace - Manual](http://php.net/manual/en/function.debug-backtrace.php)\r\n\r\nPeople with PHP version less than 5.3.6 will not be able to get any benefit from this change.\r\n\r\nThis is also a possible fix to #229\r\nIt fixed the random segmentation faults we were having in our PHPUnit tests.\r\n\r\ngdb backtrace:\r\n```\r\n#0  debug_backtrace_get_args (curpos=<value optimized out>)\r\n    at /usr/src/debug/php-5.5.30/Zend/zend_builtin_functions.c:2029\r\n```","created_at":"2015-11-23T15:59:51Z","updated_at":"2015-11-23T16:53:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f1994ebaa1f21325c6e63d8052cc81befae48d6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/phpspec/prophecy/pulls/232/commits","review_comments_url":"https://api.github.com/repos/phpspec/prophecy/pulls/232/comments","review_comment_url":"https://api.github.com/repos/phpspec/prophecy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phpspec/prophecy/issues/232/comments","statuses_url":"https://api.github.com/repos/phpspec/prophecy/statuses/ca42070734c741b0919d85b8a99cfe4a6766db56","head":{"label":"AmaraLiving:backtrace-ignore-args","ref":"backtrace-ignore-args","sha":"ca42070734c741b0919d85b8a99cfe4a6766db56","user":{"login":"AmaraLiving","id":8897532,"avatar_url":"https://avatars.githubusercontent.com/u/8897532?v=3","gravatar_id":"","url":"https://api.github.com/users/AmaraLiving","html_url":"https://github.com/AmaraLiving","followers_url":"https://api.github.com/users/AmaraLiving/followers","following_url":"https://api.github.com/users/AmaraLiving/following{/other_user}","gists_url":"https://api.github.com/users/AmaraLiving/gists{/gist_id}","starred_url":"https://api.github.com/users/AmaraLiving/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmaraLiving/subscriptions","organizations_url":"https://api.github.com/users/AmaraLiving/orgs","repos_url":"https://api.github.com/users/AmaraLiving/repos","events_url":"https://api.github.com/users/AmaraLiving/events{/privacy}","received_events_url":"https://api.github.com/users/AmaraLiving/received_events","type":"Organization","site_admin":false},"repo":{"id":46724085,"name":"prophecy","full_name":"AmaraLiving/prophecy","owner":{"login":"AmaraLiving","id":8897532,"avatar_url":"https://avatars.githubusercontent.com/u/8897532?v=3","gravatar_id":"","url":"https://api.github.com/users/AmaraLiving","html_url":"https://github.com/AmaraLiving","followers_url":"https://api.github.com/users/AmaraLiving/followers","following_url":"https://api.github.com/users/AmaraLiving/following{/other_user}","gists_url":"https://api.github.com/users/AmaraLiving/gists{/gist_id}","starred_url":"https://api.github.com/users/AmaraLiving/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmaraLiving/subscriptions","organizations_url":"https://api.github.com/users/AmaraLiving/orgs","repos_url":"https://api.github.com/users/AmaraLiving/repos","events_url":"https://api.github.com/users/AmaraLiving/events{/privacy}","received_events_url":"https://api.github.com/users/AmaraLiving/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AmaraLiving/prophecy","description":"Highly opinionated mocking framework for PHP 5.3+","fork":true,"url":"https://api.github.com/repos/AmaraLiving/prophecy","forks_url":"https://api.github.com/repos/AmaraLiving/prophecy/forks","keys_url":"https://api.github.com/repos/AmaraLiving/prophecy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AmaraLiving/prophecy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AmaraLiving/prophecy/teams","hooks_url":"https://api.github.com/repos/AmaraLiving/prophecy/hooks","issue_events_url":"https://api.github.com/repos/AmaraLiving/prophecy/issues/events{/number}","events_url":"https://api.github.com/repos/AmaraLiving/prophecy/events","assignees_url":"https://api.github.com/repos/AmaraLiving/prophecy/assignees{/user}","branches_url":"https://api.github.com/repos/AmaraLiving/prophecy/branches{/branch}","tags_url":"https://api.github.com/repos/AmaraLiving/prophecy/tags","blobs_url":"https://api.github.com/repos/AmaraLiving/prophecy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AmaraLiving/prophecy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AmaraLiving/prophecy/git/refs{/sha}","trees_url":"https://api.github.com/repos/AmaraLiving/prophecy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AmaraLiving/prophecy/statuses/{sha}","languages_url":"https://api.github.com/repos/AmaraLiving/prophecy/languages","stargazers_url":"https://api.github.com/repos/AmaraLiving/prophecy/stargazers","contributors_url":"https://api.github.com/repos/AmaraLiving/prophecy/contributors","subscribers_url":"https://api.github.com/repos/AmaraLiving/prophecy/subscribers","subscription_url":"https://api.github.com/repos/AmaraLiving/prophecy/subscription","commits_url":"https://api.github.com/repos/AmaraLiving/prophecy/commits{/sha}","git_commits_url":"https://api.github.com/repos/AmaraLiving/prophecy/git/commits{/sha}","comments_url":"https://api.github.com/repos/AmaraLiving/prophecy/comments{/number}","issue_comment_url":"https://api.github.com/repos/AmaraLiving/prophecy/issues/comments{/number}","contents_url":"https://api.github.com/repos/AmaraLiving/prophecy/contents/{+path}","compare_url":"https://api.github.com/repos/AmaraLiving/prophecy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AmaraLiving/prophecy/merges","archive_url":"https://api.github.com/repos/AmaraLiving/prophecy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AmaraLiving/prophecy/downloads","issues_url":"https://api.github.com/repos/AmaraLiving/prophecy/issues{/number}","pulls_url":"https://api.github.com/repos/AmaraLiving/prophecy/pulls{/number}","milestones_url":"https://api.github.com/repos/AmaraLiving/prophecy/milestones{/number}","notifications_url":"https://api.github.com/repos/AmaraLiving/prophecy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AmaraLiving/prophecy/labels{/name}","releases_url":"https://api.github.com/repos/AmaraLiving/prophecy/releases{/id}","created_at":"2015-11-23T14:03:15Z","updated_at":"2015-11-23T14:03:15Z","pushed_at":"2015-11-23T14:29:25Z","git_url":"git://github.com/AmaraLiving/prophecy.git","ssh_url":"git@github.com:AmaraLiving/prophecy.git","clone_url":"https://github.com/AmaraLiving/prophecy.git","svn_url":"https://github.com/AmaraLiving/prophecy","homepage":"","size":393,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"phpspec:master","ref":"master","sha":"8887e24c7a9fe8fea1b785df05b4558988d26cec","user":{"login":"phpspec","id":416702,"avatar_url":"https://avatars.githubusercontent.com/u/416702?v=3","gravatar_id":"","url":"https://api.github.com/users/phpspec","html_url":"https://github.com/phpspec","followers_url":"https://api.github.com/users/phpspec/followers","following_url":"https://api.github.com/users/phpspec/following{/other_user}","gists_url":"https://api.github.com/users/phpspec/gists{/gist_id}","starred_url":"https://api.github.com/users/phpspec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpspec/subscriptions","organizations_url":"https://api.github.com/users/phpspec/orgs","repos_url":"https://api.github.com/users/phpspec/repos","events_url":"https://api.github.com/users/phpspec/events{/privacy}","received_events_url":"https://api.github.com/users/phpspec/received_events","type":"Organization","site_admin":false},"repo":{"id":9004802,"name":"prophecy","full_name":"phpspec/prophecy","owner":{"login":"phpspec","id":416702,"avatar_url":"https://avatars.githubusercontent.com/u/416702?v=3","gravatar_id":"","url":"https://api.github.com/users/phpspec","html_url":"https://github.com/phpspec","followers_url":"https://api.github.com/users/phpspec/followers","following_url":"https://api.github.com/users/phpspec/following{/other_user}","gists_url":"https://api.github.com/users/phpspec/gists{/gist_id}","starred_url":"https://api.github.com/users/phpspec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpspec/subscriptions","organizations_url":"https://api.github.com/users/phpspec/orgs","repos_url":"https://api.github.com/users/phpspec/repos","events_url":"https://api.github.com/users/phpspec/events{/privacy}","received_events_url":"https://api.github.com/users/phpspec/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/phpspec/prophecy","description":"Highly opinionated mocking framework for PHP 5.3+","fork":false,"url":"https://api.github.com/repos/phpspec/prophecy","forks_url":"https://api.github.com/repos/phpspec/prophecy/forks","keys_url":"https://api.github.com/repos/phpspec/prophecy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phpspec/prophecy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phpspec/prophecy/teams","hooks_url":"https://api.github.com/repos/phpspec/prophecy/hooks","issue_events_url":"https://api.github.com/repos/phpspec/prophecy/issues/events{/number}","events_url":"https://api.github.com/repos/phpspec/prophecy/events","assignees_url":"https://api.github.com/repos/phpspec/prophecy/assignees{/user}","branches_url":"https://api.github.com/repos/phpspec/prophecy/branches{/branch}","tags_url":"https://api.github.com/repos/phpspec/prophecy/tags","blobs_url":"https://api.github.com/repos/phpspec/prophecy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phpspec/prophecy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phpspec/prophecy/git/refs{/sha}","trees_url":"https://api.github.com/repos/phpspec/prophecy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phpspec/prophecy/statuses/{sha}","languages_url":"https://api.github.com/repos/phpspec/prophecy/languages","stargazers_url":"https://api.github.com/repos/phpspec/prophecy/stargazers","contributors_url":"https://api.github.com/repos/phpspec/prophecy/contributors","subscribers_url":"https://api.github.com/repos/phpspec/prophecy/subscribers","subscription_url":"https://api.github.com/repos/phpspec/prophecy/subscription","commits_url":"https://api.github.com/repos/phpspec/prophecy/commits{/sha}","git_commits_url":"https://api.github.com/repos/phpspec/prophecy/git/commits{/sha}","comments_url":"https://api.github.com/repos/phpspec/prophecy/comments{/number}","issue_comment_url":"https://api.github.com/repos/phpspec/prophecy/issues/comments{/number}","contents_url":"https://api.github.com/repos/phpspec/prophecy/contents/{+path}","compare_url":"https://api.github.com/repos/phpspec/prophecy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phpspec/prophecy/merges","archive_url":"https://api.github.com/repos/phpspec/prophecy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phpspec/prophecy/downloads","issues_url":"https://api.github.com/repos/phpspec/prophecy/issues{/number}","pulls_url":"https://api.github.com/repos/phpspec/prophecy/pulls{/number}","milestones_url":"https://api.github.com/repos/phpspec/prophecy/milestones{/number}","notifications_url":"https://api.github.com/repos/phpspec/prophecy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phpspec/prophecy/labels{/name}","releases_url":"https://api.github.com/repos/phpspec/prophecy/releases{/id}","created_at":"2013-03-25T11:40:40Z","updated_at":"2015-11-23T13:20:57Z","pushed_at":"2015-11-23T15:59:52Z","git_url":"git://github.com/phpspec/prophecy.git","ssh_url":"git@github.com:phpspec/prophecy.git","clone_url":"https://github.com/phpspec/prophecy.git","svn_url":"https://github.com/phpspec/prophecy","homepage":"","size":512,"stargazers_count":591,"watchers_count":591,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":96,"mirror_url":null,"open_issues_count":54,"forks":96,"open_issues":54,"watchers":591,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/phpspec/prophecy/pulls/232"},"html":{"href":"https://github.com/phpspec/prophecy/pull/232"},"issue":{"href":"https://api.github.com/repos/phpspec/prophecy/issues/232"},"comments":{"href":"https://api.github.com/repos/phpspec/prophecy/issues/232/comments"},"review_comments":{"href":"https://api.github.com/repos/phpspec/prophecy/pulls/232/comments"},"review_comment":{"href":"https://api.github.com/repos/phpspec/prophecy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phpspec/prophecy/pulls/232/commits"},"statuses":{"href":"https://api.github.com/repos/phpspec/prophecy/statuses/ca42070734c741b0919d85b8a99cfe4a6766db56"}}}}