- バックアップ一覧
- 差分 を表示
- 現在との差分 を表示
- ソース を表示
- PHP/OOP/stdClassを使ったオブジェクトとハッシュの相互変換 へ行く。
- 1 (2011-11-30 (水) 17:54:21)
stdClassを使ったオブジェクトとハッシュの相互変換
php> $a = (object) array( 'id' => 1 );
php> = $a
<object #2 of type stdClass> {
id => 1,
}
php> $b = (array) $a;
php> = $b
array(
"id" => 1,
)