fork download
  1. <?php
  2. $json = '{
  3. "Autenticacao": {
  4. "login": "123",
  5. "senha": "123"
  6. }
  7. }';
  8.  
  9. $obj = json_decode($json);
  10. if(!isset($obj->Autenticacao->login)) {
  11. die('error brrrhh');
  12. }
  13. echo $obj->Autenticacao->login;
Success #stdin #stdout 0.01s 82880KB
stdin
Standard input is empty
stdout
123