Skip to content
Advertisement

how can i remove ‘}’ expected error in php classes in vscode. I used these codes

JavaScript

These are the codes i used and these are the errors i’m getting

Advertisement

Answer

class property should have visibility like public ,private ,protected

so it should be like

JavaScript

You can read here https://www.php.net/manual/en/language.oop5.visibility.php

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement