{"action":"closed","issue":{"url":"https://api.github.com/repos/facebook/hhvm/issues/7136","repository_url":"https://api.github.com/repos/facebook/hhvm","labels_url":"https://api.github.com/repos/facebook/hhvm/issues/7136/labels{/name}","comments_url":"https://api.github.com/repos/facebook/hhvm/issues/7136/comments","events_url":"https://api.github.com/repos/facebook/hhvm/issues/7136/events","html_url":"https://github.com/facebook/hhvm/issues/7136","id":158882538,"number":7136,"title":"Bug with `parse_url()` when // is used with a port number (protocol-relative URLs)","user":{"login":"sidkshatriya","id":638477,"avatar_url":"https://avatars.githubusercontent.com/u/638477?v=3","gravatar_id":"","url":"https://api.github.com/users/sidkshatriya","html_url":"https://github.com/sidkshatriya","followers_url":"https://api.github.com/users/sidkshatriya/followers","following_url":"https://api.github.com/users/sidkshatriya/following{/other_user}","gists_url":"https://api.github.com/users/sidkshatriya/gists{/gist_id}","starred_url":"https://api.github.com/users/sidkshatriya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sidkshatriya/subscriptions","organizations_url":"https://api.github.com/users/sidkshatriya/orgs","repos_url":"https://api.github.com/users/sidkshatriya/repos","events_url":"https://api.github.com/users/sidkshatriya/events{/privacy}","received_events_url":"https://api.github.com/users/sidkshatriya/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/hhvm/labels/php5%20incompatibility","name":"php5 incompatibility","color":"837ced"},{"url":"https://api.github.com/repos/facebook/hhvm/labels/probably%20easy","name":"probably easy","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-07T09:50:28Z","updated_at":"2016-06-08T17:37:26Z","closed_at":"2016-06-08T17:37:26Z","body":"```bash\r\n$ hhvm --version\r\nHipHop VM 3.13.1 (rel)\r\nCompiler: 1464937811_N\r\nRepo schema: ffd45ddd5bc7fba39004fffd34606434c03ef3aa\r\n```\r\n\r\nAlso tried out:\r\n```\r\nhhvm --version\r\nHipHop VM 3.14.0-dev (rel)\r\nCompiler: heads/master-0-g038adc5ef6de05366a293148b2ac690ad8cc731d\r\nRepo schema: 18676eb99fbe7473f9bce7b498aca365a8d96f4e\r\n```\r\n\r\n(with same issue)\r\n\r\nSee the output of `parse_url()` below:\r\n\r\n```php\r\n$ hhvm -a\r\nWelcome to HipHop Debugger!\r\nType \"help\" or \"?\" for a complete list of commands.\r\n\r\nNote: no server specified, debugging local scripts only.\r\nIf you want to connect to a server, launch with \"-h\" or use:\r\n  [m]achine [c]onnect <servername>\r\n\r\n##### OK\r\nhphpd> var_dump(parse_url(\"http://example.org:8088/sites/default/files/drums.mp3\"));\r\narray(4) {\r\n  [\"scheme\"]=>\r\n  string(4) \"http\"\r\n  [\"host\"]=>\r\n  string(11) \"example.org\"\r\n  [\"port\"]=>\r\n  int(8088)\r\n  [\"path\"]=>\r\n  string(30) \"/sites/default/files/drums.mp3\"\r\n}\r\n\r\n##### OK\r\nhphpd> var_dump(parse_url(\"//example.org/sites/default/files/drums.mp3\"));\r\narray(2) {\r\n  [\"host\"]=>\r\n  string(11) \"example.org\"\r\n  [\"path\"]=>\r\n  string(30) \"/sites/default/files/drums.mp3\"\r\n}\r\n\r\n####### BUG ??\r\nhphpd> var_dump(parse_url(\"//example.org:8088/sites/default/files/drums.mp3\"));\r\nbool(false)\r\n```\r\n### Expected result\r\n\r\nThe output of the last line should be (tried in PHP 5.5 and PHP 7.0):\r\n```php\r\nphp > var_dump(parse_url(\"//example.org:8088/sites/default/files/drums.mp3\"));\r\narray(3) {\r\n  [\"host\"]=>\r\n  string(11) \"example.org\"\r\n  [\"port\"]=>\r\n  int(8088)\r\n  [\"path\"]=>\r\n  string(30) \"/sites/default/files/drums.mp3\"\r\n}\r\n```\r\n\r\nNot only is this a PHP incompatibility, it might be a bug?\r\n\r\nOr is this intentional on hhvm?"}}
{"actor":{"display_login":"hhvm-bot"}}