Run Code  | API  | Code Wall  | Users  | Misc  | Feedback  | Login  | Theme  | Privacy  | Blog 

unset によるオブジェクトのプロパティの削除と配列の要素の削除の検証

Language: Layout:
+ ] Show input
Absolute running time: 0.15 sec, cpu time: 0.02 sec, memory peak: 9 Mb, absolute service time: 0.16 sec 
edit mode |  history  | discussion
-----------------------------------
JSON文字列
{
    "社員コード": "",
    "氏名": "",
    "フリガナ": "",
    "所属": "",
    "性別": "",
    "作成日": "",
    "更新日": "",
    "給与": "",
    "手当": "",
    "管理者": "",
    "生年月日": ""
}
-----------------------------------
オブジェクトに変換したもの
stdClass Object
(
    [社員コード] => 
    [氏名] => 
    [フリガナ] => 
    [所属] => 
    [性別] => 
    [作成日] => 
    [更新日] => 
    [給与] => 
    [手当] => 
    [管理者] => 
    [生年月日] => 
)

-----------------------------------
『手当』プロパティを削除
stdClass Object
(
    [社員コード] => 
    [氏名] => 
    [フリガナ] => 
    [所属] => 
    [性別] => 
    [作成日] => 
    [更新日] => 
    [給与] => 
    [管理者] => 
    [生年月日] => 
)

-----------------------------------
配列に変換したもの
Array
(
    [社員コード] => 
    [氏名] => 
    [フリガナ] => 
    [所属] => 
    [性別] => 
    [作成日] => 
    [更新日] => 
    [給与] => 
    [管理者] => 
    [生年月日] => 
)

-----------------------------------
配列の要素を削除
Array
(
    [社員コード] => 
    [氏名] => 
    [フリガナ] => 
    [性別] => 
    [作成日] => 
    [更新日] => 
    [給与] => 
    [管理者] => 
    [生年月日] => 
)

    
                
Advertise here.