3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function a (int $a){ echo $a; } try { a("banana"); } catch(Throwable $e){ echo get_class($e); echo $e->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 4
Branch analysis from position: 4
2 jumps found. (Code = 107) Position 1 = 5, Position 2 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vPYft
function name:  (null)
number of ops:  11
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'a'
          1        SEND_VAL                                                 'banana'
          2        DO_FCALL                                      0          
          3      > JMP                                                      ->10
   10     4  E > > CATCH                                       last         'Throwable'
   11     5    >   GET_CLASS                                        ~2      !0
          6        ECHO                                                     ~2
   12     7        INIT_METHOD_CALL                                         !0, 'getMessage'
          8        DO_FCALL                                      0  $3      
          9        ECHO                                                     $3
   13    10    > > RETURN                                                   1

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

End of function a

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.9 ms | 1397 KiB | 14 Q