3v4l.org

run code in 300+ PHP versions simultaneously
<?php function my_func($n): int { return $n; } var_dump(my_func('6')); // => (int) 6 var_dump(my_func(3.1415)); // => (int) 3 var_dump(my_func(TRUE)); // => (int) 1 var_dump(my_func([])); // => Fatal error: Uncaught TypeError: Argument 1 passed to my_func() must be of the type integer, array given var_dump(my_func(new \stdClass())); // => ... object given var_dump(my_func(NULL)); // => ... null given
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CkEJU
function name:  (null)
number of ops:  39
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'my_func'
          2        SEND_VAL                                                 '6'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
    7     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'my_func'
          8        SEND_VAL                                                 3.1415
          9        DO_FCALL                                      0  $2      
         10        SEND_VAR                                                 $2
         11        DO_ICALL                                                 
    8    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'my_func'
         14        SEND_VAL                                                 <true>
         15        DO_FCALL                                      0  $4      
         16        SEND_VAR                                                 $4
         17        DO_ICALL                                                 
    9    18        INIT_FCALL                                               'var_dump'
         19        INIT_FCALL                                               'my_func'
         20        SEND_VAL                                                 <array>
         21        DO_FCALL                                      0  $6      
         22        SEND_VAR                                                 $6
         23        DO_ICALL                                                 
   10    24        INIT_FCALL                                               'var_dump'
         25        INIT_FCALL                                               'my_func'
         26        NEW                                              $8      'stdClass'
         27        DO_FCALL                                      0          
         28        SEND_VAR                                                 $8
         29        DO_FCALL                                      0  $10     
         30        SEND_VAR                                                 $10
         31        DO_ICALL                                                 
   11    32        INIT_FCALL                                               'var_dump'
         33        INIT_FCALL                                               'my_func'
         34        SEND_VAL                                                 null
         35        DO_FCALL                                      0  $12     
         36        SEND_VAR                                                 $12
         37        DO_ICALL                                                 
         38      > RETURN                                                   1

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

End of function my_func

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.34 ms | 1403 KiB | 21 Q