3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{"int": 1, "string" : "mystring"}'; $array = json_decode($json,true); foreach($array AS $key => $value) { echo $key . ": " . gettype($value) . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 15
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/eJE7U
function name:  (null)
number of ops:  17
compiled vars:  !0 = $json, !1 = $array, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%7B%22int%22%3A+1%2C+%22string%22+%3A+%22mystring%22%7D'
    3     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    4     6      > FE_RESET_R                                       $7      !1, ->15
          7    > > FE_FETCH_R                                       ~8      $7, !2, ->15
          8    >   ASSIGN                                                   !3, ~8
    5     9        CONCAT                                           ~10     !3, '%3A+'
         10        GET_TYPE                                         ~11     !2
         11        CONCAT                                           ~12     ~10, ~11
         12        CONCAT                                           ~13     ~12, '%0A'
         13        ECHO                                                     ~13
    4    14      > JMP                                                      ->7
         15    >   FE_FREE                                                  $7
    6    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.45 ms | 1395 KiB | 15 Q