{"full_name":"phan/phan","owner":"phan","name":"phan","shard":"1","url":"https://github.com/phan/phan","description":"Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness.","homepage":"https://github.com/phan/phan/wiki","topics":["php","static-analysis","phan","analysis","analyzer","static-code-analysis"],"tag_pages":["analysis","analyzer","php","static-analysis","static-code-analysis"],"language":"PHP","license":"NOASSERTION","avatar":"https://avatars.githubusercontent.com/u/31359272?v=4","created_at":"2015-10-22T14:34:09Z","pushed_at":"2026-11-15T19:21:32Z","metrics":{"stars":5622,"forks":366,"watchers":94,"issues":2987,"prs":2661,"releases":198,"issues_open":784,"issues_closed":2203,"prs_open":13,"prs_closed":105,"prs_merged":2543,"discussions":0},"growth":{"day":{"stars":0,"forks":0,"base_day":"2026-11-15"}},"history":{"dates":["2026-11-10","2026-11-11","2026-11-12","2026-11-13","2026-11-14","2026-11-15","2026-11-16"],"stars":[5623,5623,5623,5622,5622,5622,5622],"forks":[366,366,366,366,366,366,366],"watchers":[null,94,94,94,94,94,94],"issues_open":[null,779,781,782,782,782,784],"prs_open":[null,11,11,11,11,11,13]},"boards":{},"same_owner":[],"issues":[{"number":3005,"title":"dependencyListForFile()","comments":18,"created_at":"2019-07-25T14:13:11Z"},{"number":3839,"title":"Function templates don't work when check_docblock_signature_param_type_match is false","comments":15,"created_at":"2020-04-08T08:22:18Z"},{"number":2311,"title":"Create online playground?","comments":13,"created_at":"2019-01-09T04:05:24Z"},{"number":3984,"title":"Returning a variable that is assigned from a mixed return function, will not trigger any error.","comments":9,"created_at":"2020-06-26T19:19:39Z"},{"number":4111,"title":"Add way to *always* warn about missing real type signatures (parameters, return type, property)","comments":8,"created_at":"2020-08-04T13:57:26Z"},{"number":1569,"title":"Support for -k flag with daemon mode","comments":7,"created_at":"2018-03-15T16:45:01Z"},{"number":3564,"title":"PhanTypeInvalidDimOffset Invalid offset \"...\" of array type array{}","comments":6,"created_at":"2019-12-04T08:44:01Z"},{"number":2082,"title":"Suggestion: adopt semantic versioning","comments":6,"created_at":"2018-10-22T15:56:30Z"}],"discussions":[],"latest_release":{"name":"6.0.11","tag":"6.0.11","published_at":"2026-10-15T00:33:22Z","body":"Performance improvements:\n- In the `'balanced'` `process_file_assignment`, also try splitting groups of files weighing more than half or a quarter of an even share (not only more than a whole share) and use the partition with the lowest predicted maximum load: a large class hierarchy that is under a share but placed first no longer leaves one analysis process noticeably heavier than the others (on a large codebase with `--processes 4`, the heaviest worker went from ~25 % above the mean to a few percent) ([#5601](https://github.com/phan/phan/pull/5601))\n- Speed up the loading of plugins' return type overrides and function call analyzers, which took ~10 s on a large codebase before the analysis processes were forked: the inherited copies of a method are found by walking the subclasses of its class instead of grouping every method of the code base by its defining method, the internal callable-parameter checks are generated once per declared method instead of once per inherited copy, and the analyzer for plugins checking callable arguments is built once per declared method ([#5603](https://github.com/phan/phan/pull/5603))\n- Add the option `lazy_inherited_methods` (off by default): the copies of methods that a class inherits from a parent class declared in a file excluded from analysis (e.g. a test framework) are created on their first lookup instead of when the class is hydrated. On a large codebase with many test classes this cut the wall time by 22-24 % and the peak memory of the main process by ~40 % with identical results; the verification mode `PHAN_LAZY_INHERIT_VERIFY=1` checks every lazily created copy against the copy an eager import would have made. Plugins implementing `AnalyzeMethodCapability` must also implement the new marker interface `AnalyzeMethodSkipsInheritedCopiesCapability` (their `analyzeMethod()` may then be called late, or not at all, for inherited copies that are never used); otherwise the option disables itself ([#5605](https://github.com/phan/phan/pull/5605))\n\nBug fixes:\n- Keep the type of a variable unknown when it is unknown on some branches and known on others: `$x = null; if ($c) { $x = unknown(); }` (or the same with `try`/`catch`, `switch`, a loop, ...) used to make `$x` exactly `null` because the unknown branch contributed nothing to the merged type, so `PhanTypeMismatchArgument` (and related issues) were reported with certainty for a value that may be anything. The merged type is now `mixed` (resp. `T|mixed`), as the ternary operator already inferred in the same situation. This also makes the issues reported by `--processes N` runs less dependent on which process analyzed the callee, since a callee's inferred return type is only known to the process that analyzed its file ([#5602](https://github.com/phan/phan/pull/5602))\n- Fix `PhanParamTooManyInternal` being reported for every call with arguments to 58 internal methods and functions that the PHP 8.2, 8.3 and 8.5 signature deltas listed with their return type only: the `Random\\Randomizer` methods (`getBytes`, `getInt`, `pickArrayKeys`, `shuffleArray`, `shuffleBytes`), the `__unserialize` methods of the date, `SplFixedArray` and random engine classes, `Random\\Engine\\PcgOneseq128XslRr64::jump`, the PHP 8.3 `DOMNode` methods `contains`, `getRootNode`, `isEqualNode` and `replaceChildren` on every DOM node class, `IntlGregorianCalendar::setDate`/`setDateTime` and `curl_share_init_persistent`. The deltas now have the parameters, and a signature map entry without parameters no longer replaces the parameters known from reflection ([#5604](https://github.com/phan/phan/pull/5604))\n- Fix the false positive `PhanTypeExpectedObjectOrClassName` for `new $x()` when `$x` has the type `object` without a known class, e.g. a `mixed` value narrowed by `method_exists($x, 'run')` to `class-string|object`: `new $obj()` creates an instance of the class of `$obj`, whatever that class is. The expression now has the type `object` ([#5606](https://github.com/phan/phan/pull/5","is_prerelease":false},"readme":true,"readme_zh":false,"news":[],"stale":false,"snapshot_at":"2026-11-16T09:23:14Z","history_start":"2026-09-06"}