3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar(bool $arg) { return $arg; } } $foo = new Foo(); try { var_dump($foo->bar(new stdClass())); } catch (Error $e) { echo '!!!' . $e->getMessage() . '!!!'; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 12
Branch analysis from position: 12
2 jumps found. (Code = 107) Position 1 = 13, Position 2 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XhMQY
function name:  (null)
number of ops:  19
compiled vars:  !0 = $foo, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   13     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'bar'
          5        NEW                                              $5      'stdClass'
          6        DO_FCALL                                      0          
          7        SEND_VAR_NO_REF_EX                                       $5
          8        DO_FCALL                                      0  $7      
          9        SEND_VAR                                                 $7
         10        DO_ICALL                                                 
         11      > JMP                                                      ->18
   14    12  E > > CATCH                                       last         'Error'
   15    13    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         14        DO_FCALL                                      0  $9      
         15        CONCAT                                           ~10     '%21%21%21', $9
         16        CONCAT                                           ~11     ~10, '%21%21%21'
         17        ECHO                                                     ~11
   16    18    > > RETURN                                                   1

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

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.66 ms | 1395 KiB | 15 Q