3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function __construct(Bar $foo) {} } try { $foo = new Foo(new Foo); } catch (\TypeError $e) { echo $e->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 7
Branch analysis from position: 7
2 jumps found. (Code = 107) Position 1 = 8, Position 2 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GtPcv
function name:  (null)
number of ops:  12
compiled vars:  !0 = $foo, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $2      'Foo'
          1        NEW                                              $3      'Foo'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $3
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
          6      > JMP                                                      ->11
    9     7  E > > CATCH                                       last         'TypeError'
   10     8    >   INIT_METHOD_CALL                                         !1, 'getMessage'
          9        DO_FCALL                                      0  $7      
         10        ECHO                                                     $7
   11    11    > > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GtPcv
function name:  __construct
number of ops:  2
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.19 ms | 1398 KiB | 13 Q