3v4l.org

run code in 300+ PHP versions simultaneously
<?php class bla { public function tryCallback($x) { return array_map(array($this, "callback"), $x); } private function callback($x) { return $x + 1; } } $x = new bla(); var_dump( $x->tryCallback(array(1,2,3)) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LWQ9f
function name:  (null)
number of ops:  10
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'bla'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_FCALL                                               'var_dump'
   17     4        INIT_METHOD_CALL                                         !0, 'tryCallback'
          5        SEND_VAL_EX                                              <array>
          6        DO_FCALL                                      0  $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
   18     9      > RETURN                                                   1

Class bla:
Function trycallback:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LWQ9f
function name:  tryCallback
number of ops:  10
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'array_map'
          2        FETCH_THIS                                       ~1      
          3        INIT_ARRAY                                       ~2      ~1
          4        ADD_ARRAY_ELEMENT                                ~2      'callback'
          5        SEND_VAL                                                 ~2
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8      > RETURN                                                   $3
    6     9*     > RETURN                                                   null

End of function trycallback

Function callback:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LWQ9f
function name:  callback
number of ops:  4
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        ADD                                              ~1      !0, 1
          2      > RETURN                                                   ~1
   11     3*     > RETURN                                                   null

End of function callback

End of class bla.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.79 ms | 1396 KiB | 17 Q