3v4l.org

run code in 300+ PHP versions simultaneously
<?php class weasel { } function show1(int $value) { var_dump($value); } function show2(weasel $value) { var_dump($value); } try { show1(new weasel()); } catch (throwable $e) { echo $e->getMessage(), "\n"; } try { show2(10); } catch (throwable $e) { echo $e->getMessage(), "\n"; }
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 = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 6
Branch analysis from position: 6
2 jumps found. (Code = 107) Position 1 = 7, Position 2 = -2
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Found catch point at position: 15
Branch analysis from position: 15
2 jumps found. (Code = 107) Position 1 = 16, Position 2 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HgpGj
function name:  (null)
number of ops:  21
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'show1'
          1        NEW                                              $1      'weasel'
          2        DO_FCALL                                      0          
          3        SEND_VAR                                                 $1
          4        DO_FCALL                                      0          
          5      > JMP                                                      ->11
   16     6  E > > CATCH                                       last         'throwable'
   17     7    >   INIT_METHOD_CALL                                         !0, 'getMessage'
          8        DO_FCALL                                      0  $4      
          9        ECHO                                                     $4
         10        ECHO                                                     '%0A'
   20    11    >   INIT_FCALL                                               'show2'
         12        SEND_VAL                                                 10
         13        DO_FCALL                                      0          
         14      > JMP                                                      ->20
   21    15  E > > CATCH                                       last         'throwable'
   22    16    >   INIT_METHOD_CALL                                         !0, 'getMessage'
         17        DO_FCALL                                      0  $6      
         18        ECHO                                                     $6
         19        ECHO                                                     '%0A'
   23    20    > > RETURN                                                   1

Function show1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HgpGj
function name:  show1
number of ops:  5
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    8     4      > RETURN                                                   null

End of function show1

Function show2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HgpGj
function name:  show2
number of ops:  5
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   12     4      > RETURN                                                   null

End of function show2

Class weasel: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.27 ms | 1394 KiB | 17 Q