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

Function show1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kE3hC
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/kE3hC
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]
Class class@anonymous: [no user functions]
Class class@anonymous: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.54 ms | 1403 KiB | 17 Q