3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Filter { // PHP 5: filter is a constructor // PHP 7: filter is a constructor and E_DEPRECATED is raised // PHP 8: filter is a normal method and is not a constructor; no E_DEPRECATED is raised function filter($a) {} } $filter = new ReflectionMethod('Filter', 'filter'); // PHP 5: bool(true) // PHP 7: bool(true) // PHP 8: bool(false) var_dump($filter->isConstructor());
based on I3QoX
Output for 7.0.0 - 7.2.6
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Filter has a deprecated constructor in /in/g1IjY on line 3 bool(true)
Output for 5.3.20 - 5.6.28
bool(true)