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; } } $t = new Test; $t->foo(); call_user_funct(array($test, 'foo'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ciVFk
function name:  (null)
number of ops:  11
compiled vars:  !0 = $t, !1 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $2      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   16     3        INIT_METHOD_CALL                                         !0, 'foo'
          4        DO_FCALL                                      0          
   18     5        INIT_FCALL_BY_NAME                                       'call_user_funct'
          6        INIT_ARRAY                                       ~6      !1
          7        ADD_ARRAY_ELEMENT                                ~6      'foo'
          8        SEND_VAL_EX                                              ~6
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Class Test:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ciVFk
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/ciVFk
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:
162.06 ms | 1394 KiB | 13 Q