3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test() { echo "Testing..."; } class foo { var $arr = array("test"); function bar() { $this->arr[0](); } } $foo = new foo; $foo->bar(); function bye(){ echo "bye!"; } class A { static function hello() { echo "Hello World\n"; } } $y[0] = 'hello'; $y[1] = 'bye'; A::$y[0](); A::$y[1](); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Bo0pQ
function name:  (null)
number of ops:  18
compiled vars:  !0 = $foo, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $2      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   15     3        INIT_METHOD_CALL                                         !0, 'bar'
          4        DO_FCALL                                      0          
   27     5        ASSIGN_DIM                                               !1, 0
          6        OP_DATA                                                  'hello'
   28     7        ASSIGN_DIM                                               !1, 1
          8        OP_DATA                                                  'bye'
   29     9        FETCH_STATIC_PROP_R          unknown             ~8      'y'
         10        FETCH_DIM_R                                      ~9      ~8, 0
         11        INIT_DYNAMIC_CALL                                        ~9
         12        DO_FCALL                                      0          
   30    13        FETCH_STATIC_PROP_R          unknown             ~11     'y'
         14        FETCH_DIM_R                                      ~12     ~11, 1
         15        INIT_DYNAMIC_CALL                                        ~12
         16        DO_FCALL                                      0          
   31    17      > RETURN                                                   1

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

End of function test

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

End of function bye

Class foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Bo0pQ
function name:  bar
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   FETCH_OBJ_R                                      ~0      'arr'
          1        FETCH_DIM_R                                      ~1      ~0, 0
          2        INIT_DYNAMIC_CALL                                        ~1
          3        DO_FCALL                                      0          
   12     4      > RETURN                                                   null

End of function bar

End of class foo.

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

End of function hello

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.68 ms | 1403 KiB | 13 Q