3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function setUp() { $tests = array( 'printHello' => array(), 'printWorld' => array(), 'printName' => array('Bob'), ); foreach( $tests as $fn => $params) call_user_func_array( array( $this, $fn), $params); } public function printHello() { echo "Hello, "; } public function printWorld() { echo "World!"; } public function printName($name=false) { echo $name; } } $o = new Test; $o->setUp();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QjEFk
function name:  (null)
number of ops:  6
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   28     3        INIT_METHOD_CALL                                         !0, 'setUp'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Test:
Function setup:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 12
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/QjEFk
function name:  setUp
number of ops:  14
compiled vars:  !0 = $tests, !1 = $params, !2 = $fn
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, <array>
   10     1      > FE_RESET_R                                       $4      !0, ->12
          2    > > FE_FETCH_R                                       ~5      $4, !1, ->12
          3    >   ASSIGN                                                   !2, ~5
   11     4        FETCH_THIS                                       ~7      
          5        INIT_ARRAY                                       ~8      ~7
          6        ADD_ARRAY_ELEMENT                                ~8      !2
          7        INIT_USER_CALL                                0          'call_user_func_array', ~8
          8        SEND_ARRAY                                               !1
          9        CHECK_UNDEF_ARGS                                         
         10        DO_FCALL                                      1          
   10    11      > JMP                                                      ->2
         12    >   FE_FREE                                                  $4
   12    13      > RETURN                                                   null

End of function setup

Function printhello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QjEFk
function name:  printHello
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ECHO                                                     'Hello%2C+'
   16     1      > RETURN                                                   null

End of function printhello

Function printworld:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QjEFk
function name:  printWorld
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ECHO                                                     'World%21'
   20     1      > RETURN                                                   null

End of function printworld

Function printname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QjEFk
function name:  printName
number of ops:  3
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV_INIT                                        !0      <false>
   23     1        ECHO                                                     !0
   24     2      > RETURN                                                   null

End of function printname

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.91 ms | 1439 KiB | 13 Q