phpantom_lsp 0.7.0

Fast PHP language server with deep type intelligence. Generics, Laravel, PHPStan annotations. Ready in an instant.
Documentation
// test: closure body does not see outer variables without use()
// feature: completion
// Adapted from phpactor WorseLocalVariableCompletorTest 'Use variables not in function body'
// Variables declared outside a closure are not available inside unless captured via use()

// expect_absent: $barfoo
// expect_absent: $foobar
---
<?php

class Outer {
    public function outerMethod(): void {}
}

$barfoo = 12;
$foobar = new Outer();

$f = function () {
    $<>
};