3v4l.org

run code in 300+ PHP versions simultaneously
<?php function grammahBendah($str='', $gender=''){ if ($gender == 'female'){ $str = str_replace(" him"," her", $str); //also handles 'herself' $str = str_replace(" he"," she", $str); $str = str_replace(" his"," her", $str); $nPower00 = $str; return $nPower00; } } var_dump(grammahBendah('themselves', 'female'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AN9vE
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'grammahbendah'
          2        SEND_VAL                                                 'themselves'
          3        SEND_VAL                                                 'female'
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function grammahbendah:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 24
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AN9vE
function name:  grammahBendah
number of ops:  25
compiled vars:  !0 = $str, !1 = $gender, !2 = $nPower00
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      ''
          1        RECV_INIT                                        !1      ''
    5     2        IS_EQUAL                                                 !1, 'female'
          3      > JMPZ                                                     ~3, ->24
    6     4    >   INIT_FCALL                                               'str_replace'
          5        SEND_VAL                                                 '+him'
          6        SEND_VAL                                                 '+her'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $4      
          9        ASSIGN                                                   !0, $4
    7    10        INIT_FCALL                                               'str_replace'
         11        SEND_VAL                                                 '+he'
         12        SEND_VAL                                                 '+she'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $6      
         15        ASSIGN                                                   !0, $6
    8    16        INIT_FCALL                                               'str_replace'
         17        SEND_VAL                                                 '+his'
         18        SEND_VAL                                                 '+her'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $8      
         21        ASSIGN                                                   !0, $8
   10    22        ASSIGN                                                   !2, !0
   11    23      > RETURN                                                   !2
   13    24    > > RETURN                                                   null

End of function grammahbendah

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.28 ms | 1399 KiB | 18 Q