Cannot declare class Attribute, because the name is already in use |
I have a controlled called Attribute.
It worked fine under PHP 7.4 and PHP 8.0 but on PHP 8.1 I get: "Cannot declare class Attribute, because the name is already in use" I searched my project and cannot find any other class called Attribute (not even in the system directory). It doesn't seem to be a reserved keyword either. Anything else I'm missing?
You cannot use class Attribute in PHP8, because PHP provides the class.
https://3v4l.org/1LTG3 See https://www.php.net/manual/en/language.a...lasses.php
I believe it's a reserved word in php 8.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |