Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GaspariLab's avatar

Sublime PHP linter

Hi guys, I have installed some php linter in Sublime but I am not satisfied because they don't recognize some errors.

For example this error (equal missing) is highlighted :

public function index()
{
    $users  User::paginate(25);
    return view('user.index')->with(compact('users'));
}

But this error (undefined variable abc) is not highlighted :

public function index()
{
    $users = User::paginate(25);
    $abc->save();
    return view('user.index')->with(compact('users'));
}

Can you suggest me how to recognize all errors?

0 likes
2 replies
Nash's avatar

The linter only checks for syntax errors and the second example is not syntactically wrong. You may want to consider using an IDE like PHPStorm if you need something with a deeper understanding of the actual logic.

Snapey's avatar

have a look at intelephense plugin.

It should be available for sublime. I use it with VS Code

Please or to participate in this conversation.