3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { function b($att, $val) { if(is_array($val)) { return array_map(array($this, 'b'), $val, array($att)); } return $val . ' filtered'; } } $a = new A; var_dump($a->b('att', array(1, 2, 3)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T7CSv
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   12     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'b'
          5        SEND_VAL_EX                                              'att'
          6        SEND_VAL_EX                                              <array>
          7        DO_FCALL                                      0  $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class A:
Function b:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T7CSv
function name:  b
number of ops:  17
compiled vars:  !0 = $att, !1 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        TYPE_CHECK                                  128          !1
          3      > JMPZ                                                     ~2, ->14
    5     4    >   INIT_FCALL                                               'array_map'
          5        FETCH_THIS                                       ~3      
          6        INIT_ARRAY                                       ~4      ~3
          7        ADD_ARRAY_ELEMENT                                ~4      'b'
          8        SEND_VAL                                                 ~4
          9        SEND_VAR                                                 !1
         10        INIT_ARRAY                                       ~5      !0
         11        SEND_VAL                                                 ~5
         12        DO_ICALL                                         $6      
         13      > RETURN                                                   $6
    7    14    >   CONCAT                                           ~7      !1, '+filtered'
         15      > RETURN                                                   ~7
    8    16*     > RETURN                                                   null

End of function b

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
192.37 ms | 1400 KiB | 17 Q