これにデコードされたjsonオブジェクトがあります:
item_json:stdClass Object
(
[code] => 2013CA
[SP] => stdClass Object
(
[PID] => 1175630
[FirstName] => Kim
[LastName] => Kardashian
[DOB] => 01-02-1978
[Address1] => 12345 Kardashian Way
[Address2] =>
[Address3] =>
[City] => Hollywood
[State] => CA
[Zip] => 90210
[Country] => US
[Phone] => 1-210-5551212-
[Email] => kkardashian@kkardashian.com
[Info] => stdClass Object
(
[Declined] => null
[NameOnLicense] => KK
[State] => CA
[License] => 90210
[LicenseText] => License Number
[TypeID] => 215057
[Hours] => 24
[Units] => 24
[Price] => 0
)
)
)
Info->Declined が null かどうかをテストするにはどうすればよいですか?
私はもう試した
!isset($item_json-SP->Info->Declined)
と
$item_json-SP->Info->Declined == null
しかし、どちらも失敗します。