3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); class Foo {} function type_null( null $a ) { return $a; } function type_array( array $a ) { return $a; } function type_Foo( Foo $a ) { return $a; } function return_type_array( array $a ): array { return null; } function return_type_null( array $a ): null { return $a; } type_null( 'a' ); //type_array( 'a' ); //type_Foo( new stdClass() ); //return_type_array( array() ); //return_type_null( array() );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f0gTa
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   26     0  E >   INIT_FCALL                                                   'type_null'
          1        SEND_VAL                                                     'a'
          2        DO_FCALL                                          0          
   30     3      > RETURN                                                       1

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

End of function type_null

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

End of function type_array

Function type_foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f0gTa
function name:  type_Foo
number of ops:  3
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   RECV                                                 !0      
   15     1      > RETURN                                                       !0
   16     2*     > RETURN                                                       null

End of function type_foo

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

End of function return_type_array

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

End of function return_type_null

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
140.7 ms | 701 KiB | 9 Q