3v4l.org

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

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

End of function test_hash

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.75 ms | 1402 KiB | 17 Q