概要
LaravelでstdClassを使うとして
PHP Error: Class ‘App\stdClass’ not found
と出たのでその解決策の備忘録
問題点
以下のようにstdClass使おうと思ったら
$hoge = new stdClass();
PHP Error: Class ‘App\stdClass’ not found
とエラーが出た
解決策
以下のようにする
$hoge = new \stdClass();
原因
当該コードがApp名前空間の中に居たので、App内でstdClassを探してしまったため