{"action":"created","issue":{"url":"https://api.github.com/repos/etsy/phan/issues/74","labels_url":"https://api.github.com/repos/etsy/phan/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/etsy/phan/issues/74/comments","events_url":"https://api.github.com/repos/etsy/phan/issues/74/events","html_url":"https://github.com/etsy/phan/issues/74","id":122390675,"number":74,"title":"Crash on call to apache_request_headers","user":{"login":"morria","id":387209,"avatar_url":"https://avatars.githubusercontent.com/u/387209?v=3","gravatar_id":"","url":"https://api.github.com/users/morria","html_url":"https://github.com/morria","followers_url":"https://api.github.com/users/morria/followers","following_url":"https://api.github.com/users/morria/following{/other_user}","gists_url":"https://api.github.com/users/morria/gists{/gist_id}","starred_url":"https://api.github.com/users/morria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morria/subscriptions","organizations_url":"https://api.github.com/users/morria/orgs","repos_url":"https://api.github.com/users/morria/repos","events_url":"https://api.github.com/users/morria/events{/privacy}","received_events_url":"https://api.github.com/users/morria/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/etsy/phan/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/etsy/phan/milestones/1","html_url":"https://github.com/etsy/phan/milestones/1.0","labels_url":"https://api.github.com/repos/etsy/phan/milestones/1/labels","id":1452447,"number":1,"title":"1.0","description":"","creator":{"login":"morria","id":387209,"avatar_url":"https://avatars.githubusercontent.com/u/387209?v=3","gravatar_id":"","url":"https://api.github.com/users/morria","html_url":"https://github.com/morria","followers_url":"https://api.github.com/users/morria/followers","following_url":"https://api.github.com/users/morria/following{/other_user}","gists_url":"https://api.github.com/users/morria/gists{/gist_id}","starred_url":"https://api.github.com/users/morria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morria/subscriptions","organizations_url":"https://api.github.com/users/morria/orgs","repos_url":"https://api.github.com/users/morria/repos","events_url":"https://api.github.com/users/morria/events{/privacy}","received_events_url":"https://api.github.com/users/morria/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":27,"state":"open","created_at":"2015-12-09T18:09:22Z","updated_at":"2015-12-15T23:15:44Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-12-15T23:15:44Z","updated_at":"2015-12-16T01:03:34Z","closed_at":null,"body":"For the file\r\n\r\n```php\r\n<?php\r\n$h = apache_request_headers();\r\n```\r\n\r\nWe get the crash\r\n\r\n```\r\nPHP Fatal error:  Uncaught Phan\\Exception\\CodeBaseException: call to undefined function \\apache_request_headers() from apache.php:2:0 in /home/amorrison/development/phan/src/Phan/Language/AST.php:561\r\nStack trace:\r\n#0 /home/amorrison/development/phan/src/Phan/Analyze/UnionTypeVisitor.php(692): Phan\\Language\\AST::functionFromNameInContext('apache_request_...', Object(Phan\\Language\\Context), Object(Phan\\CodeBase))\r\n#1 /home/amorrison/development/phan/src/Phan/Language/AST/Element.php(45): Phan\\Analyze\\UnionTypeVisitor->visitCall(Object(ast\\Node))\r\n#2 /home/amorrison/development/phan/src/Phan/Language/UnionType.php(156): Phan\\Language\\AST\\Element->acceptKindVisitor(Object(Phan\\Analyze\\UnionTypeVisitor))\r\n#3 /home/amorrison/development/phan/src/Phan/Analyze/BreadthFirstVisitor.php(134): Phan\\Language\\UnionType::fromNode(Object(Phan\\Language\\Context), Object(Phan\\CodeBase), Object(ast\\Node))\r\n#4 /home/amorrison/development/phan/src/Phan/Language/AST/Element.php(35): Phan\\Analyze\\BreadthFirstVisitor->visitAssign(Object(ast\\Node))\r\n#5 /home in /home/amorrison/development/phan/src/Phan/Language/AST.php on line 561\r\n```"},"comment":{"url":"https://api.github.com/repos/etsy/phan/issues/comments/164950367","html_url":"https://github.com/etsy/phan/issues/74#issuecomment-164950367","issue_url":"https://api.github.com/repos/etsy/phan/issues/74","id":164950367,"user":{"login":"rlerdorf","id":54641,"avatar_url":"https://avatars.githubusercontent.com/u/54641?v=3","gravatar_id":"","url":"https://api.github.com/users/rlerdorf","html_url":"https://github.com/rlerdorf","followers_url":"https://api.github.com/users/rlerdorf/followers","following_url":"https://api.github.com/users/rlerdorf/following{/other_user}","gists_url":"https://api.github.com/users/rlerdorf/gists{/gist_id}","starred_url":"https://api.github.com/users/rlerdorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlerdorf/subscriptions","organizations_url":"https://api.github.com/users/rlerdorf/orgs","repos_url":"https://api.github.com/users/rlerdorf/repos","events_url":"https://api.github.com/users/rlerdorf/events{/privacy}","received_events_url":"https://api.github.com/users/rlerdorf/received_events","type":"User","site_admin":false},"created_at":"2015-12-16T01:03:34Z","updated_at":"2015-12-16T01:03:34Z","body":"It shouldn't matter though. It should be no different from something like an Oracle oci8 function from the FunctionSignatureMap which might also not be compiled in."}}