3v4l.org

run code in 300+ PHP versions simultaneously
<?PHP class COMMENT { public function prepare($data) { $data['body'] = COMMENT::prepareBody($data['body']); } public function prepareBody($body) { call_user_func(array('self', 'prepareBody_cb')); } public static function prepareBody_cb($match) { return 'ok'; } } class COMMENTS { function addComment($data) { $x = COMMENT::prepareBody($data); } } class ACTION { function ietsMetComment() { $post = array ('body' => 'a'); $c = new COMMENTS(); $c->addComment($post); } } function selector() { $x = new ACTION; $x->ietsMetComment(); } error_reporting(E_ALL); ini_set('display_errors', 'on'); selector();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XsVCg
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   46     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
   47     3        INIT_FCALL                                               'ini_set'
          4        SEND_VAL                                                 'display_errors'
          5        SEND_VAL                                                 'on'
          6        DO_ICALL                                                 
   49     7        INIT_FCALL                                               'selector'
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Function selector:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XsVCg
function name:  selector
number of ops:  6
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   41     0  E >   NEW                                              $1      'ACTION'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   42     3        INIT_METHOD_CALL                                         !0, 'ietsMetComment'
          4        DO_FCALL                                      0          
   44     5      > RETURN                                                   null

End of function selector

Class COMMENT:
Function prepare:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XsVCg
function name:  prepare
number of ops:  9
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        INIT_STATIC_METHOD_CALL                                  'COMMENT', 'prepareBody'
          2        CHECK_FUNC_ARG                                           
          3        FETCH_DIM_FUNC_ARG                               $2      !0, 'body'
          4        SEND_FUNC_ARG                                            $2
          5        DO_FCALL                                      0  $3      
          6        ASSIGN_DIM                                               !0, 'body'
          7        OP_DATA                                                  $3
    8     8      > RETURN                                                   null

End of function prepare

Function preparebody:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XsVCg
function name:  prepareBody
number of ops:  4
compiled vars:  !0 = $body
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        INIT_USER_CALL                                0          'call_user_func', <array>
          2        DO_FCALL                                      0          
   13     3      > RETURN                                                   null

End of function preparebody

Function preparebody_cb:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XsVCg
function name:  prepareBody_cb
number of ops:  3
compiled vars:  !0 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   17     1      > RETURN                                                   'ok'
   18     2*     > RETURN                                                   null

End of function preparebody_cb

End of class COMMENT.

Class COMMENTS:
Function addcomment:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XsVCg
function name:  addComment
number of ops:  6
compiled vars:  !0 = $data, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
   24     1        INIT_STATIC_METHOD_CALL                                  'COMMENT', 'prepareBody'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !1, $2
   25     5      > RETURN                                                   null

End of function addcomment

End of class COMMENTS.

Class ACTION:
Function ietsmetcomment:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XsVCg
function name:  ietsMetComment
number of ops:  8
compiled vars:  !0 = $post, !1 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   ASSIGN                                                   !0, <array>
   33     1        NEW                                              $3      'COMMENTS'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
   34     4        INIT_METHOD_CALL                                         !1, 'addComment'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   35     7      > RETURN                                                   null

End of function ietsmetcomment

End of class ACTION.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.84 ms | 1403 KiB | 18 Q