Is it a kind of a bug or something? When creating an object from a class containing a method with the same name as the class, the statement prints the method's output.(PHP 7.4)
<?php
class Y {
public $name = "Red";
public function y() {
echo $this->name;
}
}
$x = new Y(); // outputs "Red"
Function names are not case-sensitive, and hence this statement outputs y()?