fork download
  1. <?php
  2.  
  3. $json = '[
  4. {"nome" : "WallaceMaxters"},
  5. {"nome" : "Bigown"},
  6. {"nome" : "Math", "url" : "http://m...content-available-to-author-only...h.test"}
  7. ]';
  8.  
  9. print_r(json_decode($json, TRUE));
  10.  
  11. $convert = json_decode($json, TRUE);
  12.  
  13. array_walk_recursive($convert, function (&$value /** Não esqueça do & **/)
  14. {
  15. if (filter_var($value, FILTER_VALIDATE_URL)) return;
  16.  
  17. $value = mb_strtoupper($value, 'UTF-8');
  18. });
  19.  
  20.  
  21. print_r($convert);
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Array
        (
            [nome] => WallaceMaxters
        )

    [1] => Array
        (
            [nome] => Bigown
        )

    [2] => Array
        (
            [nome] => Math
            [url] => http://m...content-available-to-author-only...h.test
        )

)
Array
(
    [0] => Array
        (
            [nome] => WALLACEMAXTERS
        )

    [1] => Array
        (
            [nome] => BIGOWN
        )

    [2] => Array
        (
            [nome] => MATH
            [url] => http://m...content-available-to-author-only...h.test
        )

)