3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_position($string) { $first_letter = strtolower(substr($string,0,1)); if( strstr("aeiou",$vowels) ) { $string = "an <strong>".ucfirst($string)."</strong>"; } else { $string = "a <strong>".ucfirst($string)."</strong>"; } return $string; } $output1 = get_position("Advertising"); $output2 = get_position("Marketing"); echo $output1."<br>"; echo $output2."<br>";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o5KEU
function name:  (null)
number of ops:  13
compiled vars:  !0 = $output1, !1 = $output2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'get_position'
          1        SEND_VAL                                                 'Advertising'
          2        DO_FCALL                                      0  $2      
          3        ASSIGN                                                   !0, $2
   14     4        INIT_FCALL                                               'get_position'
          5        SEND_VAL                                                 'Marketing'
          6        DO_FCALL                                      0  $4      
          7        ASSIGN                                                   !1, $4
   15     8        CONCAT                                           ~6      !0, '%3Cbr%3E'
          9        ECHO                                                     ~6
   16    10        CONCAT                                           ~7      !1, '%3Cbr%3E'
         11        ECHO                                                     ~7
         12      > RETURN                                                   1

Function get_position:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 22
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o5KEU
function name:  get_position
number of ops:  30
compiled vars:  !0 = $string, !1 = $first_letter, !2 = $vowels
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'strtolower'
          2        INIT_FCALL                                               'substr'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 0
          5        SEND_VAL                                                 1
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                         $4      
          9        ASSIGN                                                   !1, $4
    5    10        INIT_FCALL                                               'strstr'
         11        SEND_VAL                                                 'aeiou'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $6      
         14      > JMPZ                                                     $6, ->22
    6    15    >   INIT_FCALL                                               'ucfirst'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $7      
         18        CONCAT                                           ~8      'an+%3Cstrong%3E', $7
         19        CONCAT                                           ~9      ~8, '%3C%2Fstrong%3E'
         20        ASSIGN                                                   !0, ~9
         21      > JMP                                                      ->28
    8    22    >   INIT_FCALL                                               'ucfirst'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $11     
         25        CONCAT                                           ~12     'a+%3Cstrong%3E', $11
         26        CONCAT                                           ~13     ~12, '%3C%2Fstrong%3E'
         27        ASSIGN                                                   !0, ~13
   10    28    > > RETURN                                                   !0
   11    29*     > RETURN                                                   null

End of function get_position

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.87 ms | 1403 KiB | 23 Q