3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public function onError() { echo 'Hello'; } public function __destruct() { echo 'Coucou'; } } $bar = new foo(); register_shutdown_function(array($bar, 'onError')); trigger_error('bla', E_USER_ERROR);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sR5Fi
function name:  (null)
number of ops:  13
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        INIT_FCALL                                               'register_shutdown_function'
          4        INIT_ARRAY                                       ~4      !0
          5        ADD_ARRAY_ELEMENT                                ~4      'onError'
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
   17     8        INIT_FCALL                                               'trigger_error'
          9        SEND_VAL                                                 'bla'
         10        SEND_VAL                                                 256
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

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

End of function onerror

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

End of function __destruct

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.88 ms | 1395 KiB | 17 Q