fork(1) download
  1. <?php
  2.  
  3. $j = '{"bairro": "Jangurussu", "logradouro": "Rua 22", "cep": "60876470", "uf": "CE", "localidade": "Fortaleza"}';
  4. $json_str = json_decode($j, true);
  5. foreach ($json_str as $key => $value) {
  6. echo "$key: $value\n";
  7. }
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
bairro: Jangurussu
logradouro: Rua 22
cep: 60876470
uf: CE
localidade: Fortaleza