Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
これを検索する方法がよくわかりませんが、これら2つに本当に違いはありますか?
$t = new Test(); // vs... $t = new Test;
違いはありません
ここを見て:
<?php class Test { function printTest() { echo "Test"; } } $t = new Test(); echo $t->printTest(); // vs... $t = new Test; echo $t->printTest(); ?>
出力:
Test //from Test() Test //from Test