3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { function malzwei($n) { return $n * 2; } function quadrat($n) { return $n * $n; } function getQuadrat() { return $this->quadrat; } } $t = new Test(); echo call_user_func($t->getQuadrat(), 3); var_dump(array_map($t->getQuadrat(), array(1, 2, 3, 4)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gv03V
function name:  (null)
number of ops:  19
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    9     3        INIT_METHOD_CALL                                         !0, 'getQuadrat'
          4        DO_FCALL                                      0  $4      
          5        INIT_USER_CALL                                1          'call_user_func', $4
          6        SEND_USER                                                3
          7        DO_FCALL                                      0  $5      
          8        ECHO                                                     $5
   10     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'array_map'
         11        INIT_METHOD_CALL                                         !0, 'getQuadrat'
         12        DO_FCALL                                      0  $6      
         13        SEND_VAR                                                 $6
         14        SEND_VAL                                                 <array>
         15        DO_ICALL                                         $7      
         16        SEND_VAR                                                 $7
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

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

End of function malzwei

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

End of function quadrat

Function getquadrat:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gv03V
function name:  getQuadrat
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_OBJ_R                                      ~0      'quadrat'
          1      > RETURN                                                   ~0
          2*     > RETURN                                                   null

End of function getquadrat

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.22 ms | 1388 KiB | 17 Q