3v4l.org

run code in 300+ PHP versions simultaneously
<?php function string_internal(string $input): string { return $input; } function string(mixed $input, bool $passNull = false): string { if ($passNull && $input === null) return null; return string_internal($input); } $input = 123; $str = string($input); var_dump($str);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ldvFb
function name:  (null)
number of ops:  9
compiled vars:  !0 = $input, !1 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, 123
   11     1        INIT_FCALL                                               'string'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                                   !1, $3
   12     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

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

End of function string_internal

Function string:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/ldvFb
function name:  string
number of ops:  15
compiled vars:  !0 = $input, !1 = $passNull
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <false>
    5     2      > JMPZ_EX                                          ~2      !1, ->5
          3    >   TYPE_CHECK                                    2  ~3      !0
          4        BOOL                                             ~2      ~3
          5    > > JMPZ                                                     ~2, ->8
          6    >   VERIFY_RETURN_TYPE                               ~4      null
          7      > RETURN                                                   ~4
    7     8    >   INIT_FCALL                                               'string_internal'
          9        SEND_VAR                                                 !0
         10        DO_FCALL                                      0  $5      
         11        VERIFY_RETURN_TYPE                                       $5
         12      > RETURN                                                   $5
    8    13*       VERIFY_RETURN_TYPE                                       
         14*     > RETURN                                                   null

End of function string

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.86 ms | 1008 KiB | 16 Q