3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach(array( '', 'x', ' ', '0.0.0.0', '255.255.255.255', // Some bad IP '127.0.0.1', // localhost '10.0.0.0', '192.168.0.1', 'fe80::414a:a44e:53f2:e694%21', // Private IP addresses '8.8.8.8', // Good ) as $ip) { echo "$ip => "; var_dump(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 1, Position 2 = 14
Branch analysis from position: 1
2 jumps found. (Code = 78) Position 1 = 2, Position 2 = 14
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/0Lv4G
function name:  (null)
number of ops:  16
compiled vars:  !0 = $ip
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E > > FE_RESET_R                                       $1      <array>, ->14
          1    > > FE_FETCH_R                                               $1, !0, ->14
    8     2    >   NOP                                                      
          3        FAST_CONCAT                                      ~2      !0, '+%3D%3E+'
          4        ECHO                                                     ~2
          5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'filter_var'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 275
          9        SEND_VAL                                                 15728640
         10        DO_ICALL                                         $3      
         11        SEND_VAR                                                 $3
         12        DO_ICALL                                                 
    3    13      > JMP                                                      ->1
         14    >   FE_FREE                                                  $1
    9    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.53 ms | 1394 KiB | 17 Q