3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_position($atts) { $string = $atts; $vowels = array("a,e,i,o,u"); $first_letter = strtolower(substr($string,0,1)); if( in_array($first_letter,$vowels) ) { $string = "an <strong>".ucfirst($string)."</strong>"; } else { $string = "a <strong>".ucfirst($string)."</strong>"; } return $string; } $output = get_position("Advertising"); echo $output;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TaQtq
function name:  (null)
number of ops:  6
compiled vars:  !0 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'get_position'
          1        SEND_VAL                                                 'Advertising'
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
   16     4        ECHO                                                     !0
          5      > RETURN                                                   1

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

End of function get_position

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.7 ms | 1403 KiB | 22 Q