3v4l.org

run code in 300+ PHP versions simultaneously
<?php function doSomething(string $value) : string { try { $value = 5 % 0; } catch(Error $e) { var_dump($e); } return $value; } echo doSomething("Hello");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KW9rQ
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'dosomething'
          1        SEND_VAL                                                 'Hello'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
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/KW9rQ
function name:  doSomething
number of ops:  12
compiled vars:  !0 = $value, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    6     1        MOD                                              ~2      5, 0
          2        ASSIGN                                                   !0, ~2
          3      > JMP                                                      ->8
    7     4  E > > CATCH                                       last         'Error'
    8     5    >   INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
   10     8    >   VERIFY_RETURN_TYPE                                       !0
          9      > RETURN                                                   !0
   11    10*       VERIFY_RETURN_TYPE                                       
         11*     > RETURN                                                   null

End of function dosomething

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.27 ms | 1397 KiB | 16 Q