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); } finally {} fourtyTwo();
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 162) Position 1 = 5, Position 2 = 4
Branch analysis from position: 5
1 jumps found. (Code = 163) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aUBDe
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'hello'
          1        SEND_VAL                                                 1234
          2        DO_FCALL                                      0          
   16     3      > FAST_CALL                                                ->5
          4    > > JMP                                                      ->6
          5    > > FAST_RET                                                 
   18     6    >   INIT_FCALL                                               'fourtytwo'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Function hello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aUBDe
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/aUBDe
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.48 ms | 1398 KiB | 15 Q