<?php class foo { public function __construct($str) { echo $str . '<br>'; } } $obj = new foo('bar'); if (class_exists('foo')) { echo 'the class is not defined<br>'; } else { echo 'the class is defined<br>'; }
上記のコードでclass_existsが
trueにならないのですが、なぜでしょうか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2018/04/25 01:19