3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.83 ms | 1395 KiB | 15 Q