3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $foo = 'bar'; public function foo() { $this->foo = $this->foo .'baz'; } } $a = new A; $function = array($a, 'foo'); call_user_func( $function ); echo $a->foo . "<br>"; $function(); echo $a->foo;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HuNMh
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a, !1 = $function
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   12     3        INIT_ARRAY                                       ~5      !0
          4        ADD_ARRAY_ELEMENT                                ~5      'foo'
          5        ASSIGN                                                   !1, ~5
   14     6        INIT_USER_CALL                                0          'call_user_func', !1
          7        DO_FCALL                                      0          
   15     8        FETCH_OBJ_R                                      ~8      !0, 'foo'
          9        CONCAT                                           ~9      ~8, '%3Cbr%3E'
         10        ECHO                                                     ~9
   16    11        INIT_DYNAMIC_CALL                                        !1
         12        DO_FCALL                                      0          
   17    13        FETCH_OBJ_R                                      ~11     !0, 'foo'
         14        ECHO                                                     ~11
         15      > RETURN                                                   1

Class A:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HuNMh
function name:  foo
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   FETCH_OBJ_R                                      ~1      'foo'
          1        CONCAT                                           ~2      ~1, 'baz'
          2        ASSIGN_OBJ                                               'foo'
          3        OP_DATA                                                  ~2
    7     4      > RETURN                                                   null

End of function foo

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.97 ms | 1394 KiB | 13 Q