3v4l.org

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

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

End of function square

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.67 ms | 2133 KiB | 16 Q