3v4l.org

run code in 500+ PHP versions simultaneously
<?php /* set_error_handler(function($errno, $errstr, $errfile, $errline) { echo "caught"; return true; }); */ class A { public function __destruct() { echo "in destructor"; } } function foo(object $o) { trigger_error('foo', E_USER_ERROR); } $o = new A; foo($o); echo "after";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J5NXF
function name:  (null)
number of ops:  8
compiled vars:  !0 = $o
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   19     0  E >   NEW                                                  $1      'A'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   20     3        INIT_FCALL                                                   'foo'
          4        SEND_VAR                                                     !0
          5        DO_FCALL                                          0          
   21     6        ECHO                                                         'after'
          7      > RETURN                                                       1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J5NXF
function name:  foo
number of ops:  6
compiled vars:  !0 = $o
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   RECV                                                 !0      
   16     1        INIT_FCALL                                                   'trigger_error'
          2        SEND_VAL                                                     'foo'
          3        SEND_VAL                                                     256
          4        DO_ICALL                                                     
   17     5      > RETURN                                                       null

End of function foo

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

End of function __destruct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.41 ms | 1597 KiB | 15 Q