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(fopen('php://memory', 'r'))); } catch (Error $e) { echo '!!!' . $e->getMessage() . '!!!'; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 14
Branch analysis from position: 14
2 jumps found. (Code = 107) Position 1 = 15, Position 2 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iaENf
function name:  (null)
number of ops:  21
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        INIT_FCALL                                               'fopen'
          6        SEND_VAL                                                 'php%3A%2F%2Fmemory'
          7        SEND_VAL                                                 'r'
          8        DO_ICALL                                         $5      
          9        SEND_VAR_NO_REF_EX                                       $5
         10        DO_FCALL                                      0  $6      
         11        SEND_VAR                                                 $6
         12        DO_ICALL                                                 
         13      > JMP                                                      ->20
   14    14  E > > CATCH                                       last         'Error'
   15    15    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         16        DO_FCALL                                      0  $8      
         17        CONCAT                                           ~9      '%21%21%21', $8
         18        CONCAT                                           ~10     ~9, '%21%21%21'
         19        ECHO                                                     ~10
   16    20    > > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iaENf
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:
156.89 ms | 1400 KiB | 17 Q