3v4l.org

run code in 300+ PHP versions simultaneously
<?php //whether ip is from share internet if (empty($_SERVER['HTTP_CLIENT_IP'])) { $ip_address = $_SERVER['HTTP_CLIENT_IP']; } //whether ip is from proxy elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ip_address = $_SERVER['HTTP_X_FORWARDED_FOR']; } //whether ip is from remote address else { $ip_address = $_SERVER['REMOTE_ADDR']; } echo $ip_address; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5IlGE
function name:  (null)
number of ops:  20
compiled vars:  !0 = $ip_address
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_IS                                         ~1      '_SERVER'
          1        ISSET_ISEMPTY_DIM_OBJ                         1          ~1, 'HTTP_CLIENT_IP'
          2      > JMPZ                                                     ~2, ->7
    5     3    >   FETCH_R                      global              ~3      '_SERVER'
          4        FETCH_DIM_R                                      ~4      ~3, 'HTTP_CLIENT_IP'
          5        ASSIGN                                                   !0, ~4
          6      > JMP                                                      ->18
    8     7    >   FETCH_IS                                         ~6      '_SERVER'
          8        ISSET_ISEMPTY_DIM_OBJ                         1  ~7      ~6, 'HTTP_X_FORWARDED_FOR'
          9        BOOL_NOT                                         ~8      ~7
         10      > JMPZ                                                     ~8, ->15
   10    11    >   FETCH_R                      global              ~9      '_SERVER'
         12        FETCH_DIM_R                                      ~10     ~9, 'HTTP_X_FORWARDED_FOR'
         13        ASSIGN                                                   !0, ~10
         14      > JMP                                                      ->18
   15    15    >   FETCH_R                      global              ~12     '_SERVER'
         16        FETCH_DIM_R                                      ~13     ~12, 'REMOTE_ADDR'
         17        ASSIGN                                                   !0, ~13
   17    18    >   ECHO                                                     !0
   18    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.49 ms | 1385 KiB | 13 Q