Guest User

Untitled

a guest
Jul 16th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. <?php
  2. $testCases = array(
  3. '[1,2,3]',
  4. '{"one":1,"two":2,"three":3}',
  5. '"1"',
  6. '1'
  7. );
  8.  
  9. foreach ($testCases as $testCase) {
  10. echo "INPUT:", PHP_EOL;
  11. echo $testCase, PHP_EOL;
  12. echo "OUTPUT:", PHP_EOL;
  13. var_dump(json_decode($testCase));
  14. echo PHP_EOL;
  15. }
Add Comment
Please, Sign In to add comment