3v4l.org

run code in 300+ PHP versions simultaneously
<?php //declare(strict_types = 1); function hello(string $s) : void { echo "$s\n"; } function fourtyTwo() : int { // returning wrong type return "42"; } // calling with wrong type try { hello(1234); } catch (Throwable $t) { echo $t; } try { fourtyTwo(); } catch (Throwable $t) { echo $t; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
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 = 42) Position 1 = 11
Branch analysis from position: 11
Found catch point at position: 9
Branch analysis from position: 9
2 jumps found. (Code = 107) Position 1 = 10, Position 2 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Pg0hc
function name:  (null)
number of ops:  12
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'hello'
          1        SEND_VAL                                                 1234
          2        DO_FCALL                                      0          
          3      > JMP                                                      ->6
   16     4  E > > CATCH                                       last         'Throwable'
   17     5    >   ECHO                                                     !0
   21     6    >   INIT_FCALL                                               'fourtytwo'
          7        DO_FCALL                                      0          
          8      > JMP                                                      ->11
   22     9  E > > CATCH                                       last         'Throwable'
   23    10    >   ECHO                                                     !0
   24    11    > > RETURN                                                   1

Function hello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Pg0hc
function name:  hello
number of ops:  5
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        NOP                                                      
          2        FAST_CONCAT                                      ~1      !0, '%0A'
          3        ECHO                                                     ~1
    6     4      > RETURN                                                   null

End of function hello

Function fourtytwo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Pg0hc
function name:  fourtyTwo
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   VERIFY_RETURN_TYPE                               ~0      '42'
          1      > RETURN                                                   ~0
   11     2*       VERIFY_RETURN_TYPE                                       
          3*     > RETURN                                                   null

End of function fourtytwo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.86 ms | 944 KiB | 16 Q