3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function foo() { echo "foo", PHP_EOL; } public function __destruct() { echo "going to die", PHP_EOL; } } $test = new Test; $test->foo(); call_user_func(array($test, 'foo')); call_user_func(array(&$test, 'foo'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NTWqO
function name:  (null)
number of ops:  14
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_METHOD_CALL                                         !0, 'foo'
          4        DO_FCALL                                      0          
   18     5        INIT_ARRAY                                       ~5      !0
          6        ADD_ARRAY_ELEMENT                                ~5      'foo'
          7        INIT_USER_CALL                                0          'call_user_func', ~5
          8        DO_FCALL                                      0          
   20     9        INIT_ARRAY                                       ~7      !0
         10        ADD_ARRAY_ELEMENT                                ~7      'foo'
         11        INIT_USER_CALL                                0          'call_user_func', ~7
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

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

End of function foo

Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NTWqO
function name:  __destruct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ECHO                                                     'going+to+die'
          1        ECHO                                                     '%0A'
   11     2      > RETURN                                                   null

End of function __destruct

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.48 ms | 1385 KiB | 13 Q