3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!empty($_SERVER["HTTP_CLIENT_IP"])) { //check for ip from share internet $ip = $_SERVER["HTTP_CLIENT_IP"]; } elseif (!empty($_SERVER["HTTP_X_FORWARDED_FOR"])) { // Check for the Proxy User $ip = $_SERVER["HTTP_X_FORWARDED_FOR"]; } else { $ip = $_SERVER["REMOTE_ADDR"]; } // This will print user's real IP Address // does't matter if user using proxy or not. echo $ip; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i246O
function name:  (null)
number of ops:  21
compiled vars:  !0 = $ip
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_IS                                         ~1      '_SERVER'
          1        ISSET_ISEMPTY_DIM_OBJ                         1  ~2      ~1, 'HTTP_CLIENT_IP'
          2        BOOL_NOT                                         ~3      ~2
          3      > JMPZ                                                     ~3, ->8
    5     4    >   FETCH_R                      global              ~4      '_SERVER'
          5        FETCH_DIM_R                                      ~5      ~4, 'HTTP_CLIENT_IP'
          6        ASSIGN                                                   !0, ~5
          7      > JMP                                                      ->19
    7     8    >   FETCH_IS                                         ~7      '_SERVER'
          9        ISSET_ISEMPTY_DIM_OBJ                         1  ~8      ~7, 'HTTP_X_FORWARDED_FOR'
         10        BOOL_NOT                                         ~9      ~8
         11      > JMPZ                                                     ~9, ->16
   10    12    >   FETCH_R                      global              ~10     '_SERVER'
         13        FETCH_DIM_R                                      ~11     ~10, 'HTTP_X_FORWARDED_FOR'
         14        ASSIGN                                                   !0, ~11
         15      > JMP                                                      ->19
   14    16    >   FETCH_R                      global              ~13     '_SERVER'
         17        FETCH_DIM_R                                      ~14     ~13, 'REMOTE_ADDR'
         18        ASSIGN                                                   !0, ~14
   19    19    >   ECHO                                                     !0
   21    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.39 ms | 1394 KiB | 13 Q