3v4l.org

run code in 300+ PHP versions simultaneously
<?php function add(int $x, int $y): int { return $x + $y; } var_dump(add(1, 2)); var_dump(add(1, '2'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gq4NK
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'add'
          2        SEND_VAL                                                 1
          3        SEND_VAL                                                 2
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
    7     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'add'
          9        SEND_VAL                                                 1
         10        SEND_VAL                                                 '2'
         11        DO_FCALL                                      0  $2      
         12        SEND_VAR                                                 $2
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

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

End of function add

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.21 ms | 1397 KiB | 17 Q