3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_exception_handler(function (Throwable $exception) { var_dump($exception->getTrace()); }); class Foo { private $foo; public function __toString() { return $this->foo; } } sprintf('%s', new Foo());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lJ61X
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'set_exception_handler'
          1        DECLARE_LAMBDA_FUNCTION                          ~0      [0]
    5     2        SEND_VAL                                                 ~0
    3     3        DO_ICALL                                                 
    7     4        DECLARE_CLASS                                            'foo'
   17     5        INIT_FCALL                                               'sprintf'
          6        SEND_VAL                                                 '%25s'
          7        NEW                                              $2      'Foo'
          8        DO_FCALL                                      0          
          9        SEND_VAR                                                 $2
         10        DO_ICALL                                                 
         11      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lJ61X
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $exception
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'var_dump'
          2        INIT_METHOD_CALL                                         !0, 'getTrace'
          3        DO_FCALL                                      0  $1      
          4        SEND_VAR                                                 $1
          5        DO_ICALL                                                 
    5     6      > RETURN                                                   null

End of Dynamic Function 0

Class Foo:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lJ61X
function name:  __toString
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   FETCH_OBJ_R                                      ~0      'foo'
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
   14     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function __tostring

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.77 ms | 1018 KiB | 16 Q