3v4l.org

run code in 300+ PHP versions simultaneously
<?php browser(); function browser() { $browsers = array('chrome', 'msie', 'firefox', 'safari'); for ($i = 0; $i < count($browsers); $i++) { if ($_SERVER['HTTP_USER_AGENT'] == $browsers[$i]) { echo "You are using {$browsers[$i]}."; } } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cXYUR
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'browser'
          1        DO_FCALL                                      0          
   10     2      > RETURN                                                   1

Function browser:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 3
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 3
Branch analysis from position: 17
Branch analysis from position: 3
Branch analysis from position: 13
filename:       /in/cXYUR
function name:  browser
number of ops:  18
compiled vars:  !0 = $browsers, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->14
    6     3    >   FETCH_R                      global              ~4      '_SERVER'
          4        FETCH_DIM_R                                      ~5      ~4, 'HTTP_USER_AGENT'
          5        FETCH_DIM_R                                      ~6      !0, !1
          6        IS_EQUAL                                                 ~5, ~6
          7      > JMPZ                                                     ~7, ->13
    7     8    >   ROPE_INIT                                     3  ~10     'You+are+using+'
          9        FETCH_DIM_R                                      ~8      !0, !1
         10        ROPE_ADD                                      1  ~10     ~10, ~8
         11        ROPE_END                                      2  ~9      ~10, '.'
         12        ECHO                                                     ~9
    5    13    >   PRE_INC                                                  !1
         14    >   COUNT                                            ~13     !0
         15        IS_SMALLER                                               !1, ~13
         16      > JMPNZ                                                    ~14, ->3
   10    17    > > RETURN                                                   null

End of function browser

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.21 ms | 1398 KiB | 14 Q