{"action":"created","issue":{"url":"https://api.github.com/repos/phpstan/phpstan/issues/974","repository_url":"https://api.github.com/repos/phpstan/phpstan","labels_url":"https://api.github.com/repos/phpstan/phpstan/issues/974/labels{/name}","comments_url":"https://api.github.com/repos/phpstan/phpstan/issues/974/comments","events_url":"https://api.github.com/repos/phpstan/phpstan/issues/974/events","html_url":"https://github.com/phpstan/phpstan/issues/974","id":319391194,"number":974,"title":"Array counts in loops are miscalculated","user":{"login":"muglug","id":2292638,"avatar_url":"https://avatars0.githubusercontent.com/u/2292638?v=4","gravatar_id":"","url":"https://api.github.com/users/muglug","html_url":"https://github.com/muglug","followers_url":"https://api.github.com/users/muglug/followers","following_url":"https://api.github.com/users/muglug/following{/other_user}","gists_url":"https://api.github.com/users/muglug/gists{/gist_id}","starred_url":"https://api.github.com/users/muglug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muglug/subscriptions","organizations_url":"https://api.github.com/users/muglug/orgs","repos_url":"https://api.github.com/users/muglug/repos","events_url":"https://api.github.com/users/muglug/events{/privacy}","received_events_url":"https://api.github.com/users/muglug/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-02T02:36:19Z","updated_at":"2018-05-02T18:08:10Z","closed_at":null,"author_association":"NONE","body":"```php\r\n$array = [1, 2, 3];\r\nwhile (rand(0, 1)) {\r\n    $array[] = 4;\r\n}\r\n\r\nif (count($array) === 7) {}\r\n```\r\n\r\nExpected: No issue\r\nActual: [Strict comparison using === between 3|4 and 7 will always evaluate to false.](https://phpstan.org/r/41c694c236ce53a991b448a385940359)"},"comment":{"url":"https://api.github.com/repos/phpstan/phpstan/issues/comments/386069262","html_url":"https://github.com/phpstan/phpstan/issues/974#issuecomment-386069262","issue_url":"https://api.github.com/repos/phpstan/phpstan/issues/974","id":386069262,"user":{"login":"ondrejmirtes","id":104888,"avatar_url":"https://avatars0.githubusercontent.com/u/104888?v=4","gravatar_id":"","url":"https://api.github.com/users/ondrejmirtes","html_url":"https://github.com/ondrejmirtes","followers_url":"https://api.github.com/users/ondrejmirtes/followers","following_url":"https://api.github.com/users/ondrejmirtes/following{/other_user}","gists_url":"https://api.github.com/users/ondrejmirtes/gists{/gist_id}","starred_url":"https://api.github.com/users/ondrejmirtes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ondrejmirtes/subscriptions","organizations_url":"https://api.github.com/users/ondrejmirtes/orgs","repos_url":"https://api.github.com/users/ondrejmirtes/repos","events_url":"https://api.github.com/users/ondrejmirtes/events{/privacy}","received_events_url":"https://api.github.com/users/ondrejmirtes/received_events","type":"User","site_admin":false},"created_at":"2018-05-02T18:08:10Z","updated_at":"2018-05-02T18:08:10Z","author_association":"OWNER","body":"Fixed: https://github.com/phpstan/phpstan/commit/2ea0d8ee3e158caa23e85541a0af9bc63fc52e04\r\n\r\nPlease note that there's still some room for improvement with stuff like `$array[$i++]` - actually, with incremented/decremented constant values in loops generally, so I plan to tackle that too 😊"}}
{"actor":{"display_login":"ondrejmirtes"}}