<?php
class ExampleA {
public function __construct(){
echo 'Método Mágico' . PHP_EOL;
}
public function ExampleA(){
echo 'Construtor descontinuado';
}
}
class ExampleB {
public function ExampleB(){
echo 'Construtor descontinuado' . PHP_EOL;
}
}
$e = new ExampleA;
$e = new ExampleB;
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ExampleB has a deprecated constructor in /in/r2shH on line 16
Método Mágico
Construtor descontinuado