3v4l.org

run code in 500+ PHP versions simultaneously
<?php $json = <<<'EOD' [{ "layout":12, "settings":{ "text":"Lorem", "atts":{ "html":"<div>Ipsum</div>" } } }] EOD; $arr = json_decode($json, true); array_walk_recursive($arr, function ($v, $k) { if ( in_array($k, ['text', 'html']) ) echo "$k -> $v\n"; });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OKfc7
function name:  (null)
number of ops:  12
compiled vars:  !0 = $json, !1 = $arr
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%5B%7B%0A%22layout%22%3A12%2C%0A%22settings%22%3A%7B%0A++++%22text%22%3A%22Lorem%22%2C%0A++++%22atts%22%3A%7B%0A++++++++%22html%22%3A%22%3Cdiv%3EIpsum%3C%2Fdiv%3E%22%0A++++%7D%0A%7D%0A%7D%5D'
   15     1        INIT_FCALL                                                   'json_decode'
          2        SEND_VAR                                                     !0
          3        SEND_VAL                                                     <true>
          4        DO_ICALL                                             $3      
          5        ASSIGN                                                       !1, $3
   17     6        INIT_FCALL                                                   'array_walk_recursive'
          7        SEND_REF                                                     !1
          8        DECLARE_LAMBDA_FUNCTION                              ~5      [0]
   20     9        SEND_VAL                                                     ~5
   17    10        DO_ICALL                                                     
   20    11      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/OKfc7
function name:  {closure:/in/OKfc7:17}
number of ops:  10
compiled vars:  !0 = $v, !1 = $k
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   18     2        IN_ARRAY                                                     !1, <array>
          3      > JMPZ                                                         ~2, ->9
   19     4    >   ROPE_INIT                                         4  ~4      !1
          5        ROPE_ADD                                          1  ~4      ~4, '+-%3E+'
          6        ROPE_ADD                                          2  ~4      ~4, !0
          7        ROPE_END                                          3  ~3      ~4, '%0A'
          8        ECHO                                                         ~3
   20     9    > > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
229.01 ms | 2259 KiB | 15 Q