I'm tempted to use interfaces in my project but am unsure if they work with PHP version 5.2 (which I must support).
What is the minimum version of PHP that will allow me to use interfaces in my code?
I'm tempted to use interfaces in my project but am unsure if they work with PHP version 5.2 (which I must support).
What is the minimum version of PHP that will allow me to use interfaces in my code?
Interfaces were introduced in php 5! You can see this in the manual here: http://php.net/manual/en/oop5.intro.php
And a quote from there:
Among the features in PHP 5 are the inclusions of visibility, abstract and final classes and methods, additional magic methods, interfaces, cloning and typehinting.
You can also simply test it here: http://3v4l.org/T2uJU and then you see it also there