3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json_string = <<<'EOT' "{ "John": { "status":"Wait" }, "Jennifer": { "status":"Active" }, "James": { "status":"Active", "age":56, "count":10, "progress":0.0029857, "bad":0 } }" EOT; $json = json_decode($json_string, true); foreach ($json as $key => $val) { if(is_array($val)) { echo "$key:\n"; } else { echo "$key => $val\n"; } } //echo $json;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 21
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 21
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/FCsro
function name:  (null)
number of ops:  23
compiled vars:  !0 = $json_string, !1 = $json, !2 = $val, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '++++%22%7B%0A++++%09%22John%22%3A+%7B%0A+++++%09+++%22status%22%3A%22Wait%22%0A++++%09%7D%2C%0A++++%09%22Jennifer%22%3A+%7B%0A++++%09++++%22status%22%3A%22Active%22%0A++++%09%7D%2C%0A++++%09%22James%22%3A+%7B%0A+++++%09+++%22status%22%3A%22Active%22%2C%0A++++++++%09%22age%22%3A56%2C%0A++++++++%09%22count%22%3A10%2C%0A++++++++%09%22progress%22%3A0.0029857%2C%0A++++++++%09%22bad%22%3A0%0A+++%09%09%7D%0A%09%7D%22'
   21     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
   23     6      > FE_RESET_R                                       $7      !1, ->21
          7    > > FE_FETCH_R                                       ~8      $7, !2, ->21
          8    >   ASSIGN                                                   !3, ~8
   24     9        TYPE_CHECK                                  128          !2
         10      > JMPZ                                                     ~10, ->15
   25    11    >   NOP                                                      
         12        FAST_CONCAT                                      ~11     !3, '%3A%0A'
         13        ECHO                                                     ~11
         14      > JMP                                                      ->20
   27    15    >   ROPE_INIT                                     4  ~13     !3
         16        ROPE_ADD                                      1  ~13     ~13, '+%3D%3E+'
         17        ROPE_ADD                                      2  ~13     ~13, !2
         18        ROPE_END                                      3  ~12     ~13, '%0A'
         19        ECHO                                                     ~12
   23    20    > > JMP                                                      ->7
         21    >   FE_FREE                                                  $7
   31    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.82 ms | 1396 KiB | 15 Q