Is there any difference between the object created by PHP `$a = new A ();` and `$a = new A;`?

class A{
    function say(){
        print "a";
    }
}

$a = new A();
$a->say();

is there any difference between the creation object $a = new A (); and $a = new A; here?

Php
Mar.24,2021

is written differently. If the constructor needs to pass parameters, use the first one!


makes no difference. Objects are instantiated in the form of no parameters.


there is no difference:


Thank you for the invitation. If so many people answer, there is no need to answer!

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e32433-441bb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e32433-441bb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?