3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __construct(Bar $bar) { die('hello world'); } } class Bar {} try { new Foo(New Bar); } catch (\Exception $e) { echo "ex"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
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/hve8c
function name:  (null)
number of ops:  10
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'Foo'
          1        NEW                                              $2      'Bar'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $2
          4        DO_FCALL                                      0          
          5        FREE                                                     $1
          6      > JMP                                                      ->9
   14     7  E > > CATCH                                       last         'Exception'
   15     8    >   ECHO                                                     'ex'
   16     9    > > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/hve8c
function name:  __construct
number of ops:  3
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1      > EXIT                                                     'hello+world'
    7     2*     > RETURN                                                   null

End of function __construct

End of class Foo.

Class Bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.3 ms | 1394 KiB | 13 Q