3v4l.org

run code in 500+ PHP versions simultaneously
<?php $_GET = [ 'myserver' => [ 'state'=>'10' ] ]; $existingJson = '{ "key1": "val1", "key2": "val2" }'; $array = json_decode($existingJson, true); $newArray = array_merge_recursive($array, $_GET); print_r($newArray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i1YvC
function name:  (null)
number of ops:  18
compiled vars:  !0 = $existingJson, !1 = $array, !2 = $newArray
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   FETCH_W                          global              $3      '_GET'
          1        ASSIGN                                                       $3, <array>
    9     2        ASSIGN                                                       !0, '%7B%0A++++%22key1%22%3A+%22val1%22%2C%0A++++%22key2%22%3A+%22val2%22%0A%7D'
   14     3        INIT_FCALL                                                   'json_decode'
          4        SEND_VAR                                                     !0
          5        SEND_VAL                                                     <true>
          6        DO_ICALL                                             $6      
          7        ASSIGN                                                       !1, $6
   16     8        INIT_FCALL                                                   'array_merge_recursive'
          9        SEND_VAR                                                     !1
         10        FETCH_R                          global              ~8      '_GET'
         11        SEND_VAL                                                     ~8
         12        DO_ICALL                                             $9      
         13        ASSIGN                                                       !2, $9
   18    14        INIT_FCALL                                                   'print_r'
         15        SEND_VAR                                                     !2
         16        DO_ICALL                                                     
         17      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.9 ms | 2117 KiB | 16 Q