Level 20
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.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
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?
Please or to participate in this conversation.