How to remove the warning not to use VAR in NetBeans?

1

Right here in the OS, I saw that I no longer need to use VAR, when declaring a variable in PHP, this was only up to PHP4. NetBeans, is giving error, if I do not use, and use only the variable

How do I remove this?

    
asked by anonymous 09.06.2017 / 18:18

1 answer

1

To declare an attribute within a class in PHP, you declare the visibility, then the attribute.

Right

<?php
    Class MinhaClasse{
public $atributo;
}

Wrong

    Class MinhaClasse{
$atributo;
}
    
09.06.2017 / 19:18