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 = new A(); $a->$y[1](); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mWr2s
function name:  (null)
number of ops:  21
compiled vars:  !0 = $foo, !1 = $y, !2 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $3      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   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             ~9      'y'
         10        FETCH_DIM_R                                      ~10     ~9, 0
         11        INIT_DYNAMIC_CALL                                        ~10
         12        DO_FCALL                                      0          
   30    13        NEW                                              $12     'A'
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !2, $12
   31    16        FETCH_OBJ_R                                      ~15     !2, !1
         17        FETCH_DIM_R                                      ~16     ~15, 1
         18        INIT_DYNAMIC_CALL                                        ~16
         19        DO_FCALL                                      0          
   32    20      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mWr2s
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/mWr2s
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/mWr2s
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/mWr2s
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:
163.89 ms | 1399 KiB | 13 Q