3v4l.org

run code in 300+ PHP versions simultaneously
<?php $master_array[] = (array)json_decode('{"results":[{"cat_id":2,"cat_name":"bicycle repairs"}]}', true); $master_array[] = (array)json_decode(null, true); $master_array[] = (array)json_decode('{"results":[{"cat_id":"4","cat_name":"plumber"},{"cat_id":"5","cat_name":"Electrician"},{"cat_id":"6","cat_name":"vet"}]}', true); var_export(array_merge(...array_column($master_array, 'results')));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BVFCa
function name:  (null)
number of ops:  33
compiled vars:  !0 = $master_array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'json_decode'
          1        SEND_VAL                                                 '%7B%22results%22%3A%5B%7B%22cat_id%22%3A2%2C%22cat_name%22%3A%22bicycle+repairs%22%7D%5D%7D'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $2      
          4        CAST                                          7  ~3      $2
          5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  ~3
    3     7        INIT_FCALL                                               'json_decode'
          8        SEND_VAL                                                 null
          9        SEND_VAL                                                 <true>
         10        DO_ICALL                                         $5      
         11        CAST                                          7  ~6      $5
         12        ASSIGN_DIM                                               !0
         13        OP_DATA                                                  ~6
    4    14        INIT_FCALL                                               'json_decode'
         15        SEND_VAL                                                 '%7B%22results%22%3A%5B%7B%22cat_id%22%3A%224%22%2C%22cat_name%22%3A%22plumber%22%7D%2C%7B%22cat_id%22%3A%225%22%2C%22cat_name%22%3A%22Electrician%22%7D%2C%7B%22cat_id%22%3A%226%22%2C%22cat_name%22%3A%22vet%22%7D%5D%7D'
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $8      
         18        CAST                                          7  ~9      $8
         19        ASSIGN_DIM                                               !0
         20        OP_DATA                                                  ~9
    7    21        INIT_FCALL                                               'var_export'
         22        INIT_FCALL                                               'array_merge'
         23        INIT_FCALL                                               'array_column'
         24        SEND_VAR                                                 !0
         25        SEND_VAL                                                 'results'
         26        DO_ICALL                                         $10     
         27        SEND_UNPACK                                              $10
         28        CHECK_UNDEF_ARGS                                         
         29        DO_ICALL                                         $11     
         30        SEND_VAR                                                 $11
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.57 ms | 1014 KiB | 17 Q