3v4l.org

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

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

End of function my_str_starts_with

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.75 ms | 1397 KiB | 18 Q