{"action":"created","issue":{"url":"https://api.github.com/repos/google/flatbuffers/issues/3816","repository_url":"https://api.github.com/repos/google/flatbuffers","labels_url":"https://api.github.com/repos/google/flatbuffers/issues/3816/labels{/name}","comments_url":"https://api.github.com/repos/google/flatbuffers/issues/3816/comments","events_url":"https://api.github.com/repos/google/flatbuffers/issues/3816/events","html_url":"https://github.com/google/flatbuffers/pull/3816","id":140591272,"number":3816,"title":"Implement __vector_as_bytes and methods to get [ubyte] efficiently","user":{"login":"armen","id":6529,"avatar_url":"https://avatars.githubusercontent.com/u/6529?v=3","gravatar_id":"","url":"https://api.github.com/users/armen","html_url":"https://github.com/armen","followers_url":"https://api.github.com/users/armen/followers","following_url":"https://api.github.com/users/armen/following{/other_user}","gists_url":"https://api.github.com/users/armen/gists{/gist_id}","starred_url":"https://api.github.com/users/armen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/armen/subscriptions","organizations_url":"https://api.github.com/users/armen/orgs","repos_url":"https://api.github.com/users/armen/repos","events_url":"https://api.github.com/users/armen/events{/privacy}","received_events_url":"https://api.github.com/users/armen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-14T06:50:44Z","updated_at":"2016-03-22T01:13:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/google/flatbuffers/pulls/3816","html_url":"https://github.com/google/flatbuffers/pull/3816","diff_url":"https://github.com/google/flatbuffers/pull/3816.diff","patch_url":"https://github.com/google/flatbuffers/pull/3816.patch"},"body":"Currently in order to get a value type of [ubyte] in PHP, iteration is\r\nnecessary which is not efficient. Helper __vector_as_bytes has been\r\nimplemented in order to return the byte arrays in PHP efficiently.\r\n\r\nAppropriate methods also been added to use aforementioned method to return\r\nthe byte array. (e.g. get*Bytes()).\r\n\r\nThe reason the methods are named get*Bytes() and not for instance\r\nget*ByteArray() is the fact that PHP doesn't support byte arrays and the\r\nbinary safe string implementation in PHP is used to simulate byte arrays\r\nand since there is chance for PHP users to confuse this with PHP arrays\r\nthe name get*Bytes() has been chosen.\r\n\r\nIn the future __vector_as_bytebuffer() method can also be implemented to\r\nreturn PHP implementation of ByteBuffer."},"comment":{"url":"https://api.github.com/repos/google/flatbuffers/issues/comments/199569044","html_url":"https://github.com/google/flatbuffers/pull/3816#issuecomment-199569044","issue_url":"https://api.github.com/repos/google/flatbuffers/issues/3816","id":199569044,"user":{"login":"gwvo","id":6145400,"avatar_url":"https://avatars.githubusercontent.com/u/6145400?v=3","gravatar_id":"","url":"https://api.github.com/users/gwvo","html_url":"https://github.com/gwvo","followers_url":"https://api.github.com/users/gwvo/followers","following_url":"https://api.github.com/users/gwvo/following{/other_user}","gists_url":"https://api.github.com/users/gwvo/gists{/gist_id}","starred_url":"https://api.github.com/users/gwvo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwvo/subscriptions","organizations_url":"https://api.github.com/users/gwvo/orgs","repos_url":"https://api.github.com/users/gwvo/repos","events_url":"https://api.github.com/users/gwvo/events{/privacy}","received_events_url":"https://api.github.com/users/gwvo/received_events","type":"User","site_admin":false},"created_at":"2016-03-22T01:13:20Z","updated_at":"2016-03-22T01:13:20Z","body":"Looks good to me. Opinions, @chobie ?"}}