fork download
  1. <?php
  2.  
  3. $a = [
  4. false,
  5. 0,
  6. 'false',
  7. 'test',
  8. ];
  9.  
  10. $json = json_encode($a);
  11.  
  12.  
  13. var_dump($json);
  14.  
  15. $b = json_decode($json);
  16.  
  17.  
Success #stdin #stdout 0s 82560KB
stdin
Standard input is empty
stdout
string(24) "[false,0,"false","test"]"
array(4) {
  [0]=>
  bool(false)
  [1]=>
  int(0)
  [2]=>
  string(5) "false"
  [3]=>
  string(4) "test"
}