3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_position($atts) { $string = $_SESSION['position']; $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; } get_position("Advertising");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fOvQC
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'get_position'
          1        SEND_VAL                                                 'Advertising'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function get_position:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 26
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fOvQC
function name:  get_position
number of ops:  34
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        FETCH_R                      global              ~4      '_SESSION'
          2        FETCH_DIM_R                                      ~5      ~4, 'position'
          3        ASSIGN                                                   !1, ~5
    5     4        ASSIGN                                                   !2, <array>
    6     5        INIT_FCALL                                               'strtolower'
          6        INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !1
          8        SEND_VAL                                                 0
          9        SEND_VAL                                                 1
         10        DO_ICALL                                         $8      
         11        SEND_VAR                                                 $8
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !3, $9
    7    14        INIT_FCALL                                               'in_array'
         15        SEND_VAR                                                 !3
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $11     
         18      > JMPZ                                                     $11, ->26
    8    19    >   INIT_FCALL                                               'ucfirst'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $12     
         22        CONCAT                                           ~13     'an+%3Cstrong%3E', $12
         23        CONCAT                                           ~14     ~13, '%3C%2Fstrong%3E'
         24        ASSIGN                                                   !1, ~14
         25      > JMP                                                      ->32
   10    26    >   INIT_FCALL                                               'ucfirst'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                         $16     
         29        CONCAT                                           ~17     'a+%3Cstrong%3E', $16
         30        CONCAT                                           ~18     ~17, '%3C%2Fstrong%3E'
         31        ASSIGN                                                   !1, ~18
   12    32    > > RETURN                                                   !1
   13    33*     > RETURN                                                   null

End of function get_position

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.24 ms | 1394 KiB | 22 Q