3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ip = "192.168.115.000"; echo "ip2long($ip) PHP".phpversion().' '.PHP_OS.' : '.(ip2long($ip) === false ? "invalid" : "valid");
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
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: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XmQUl
function name:  (null)
number of ops:  21
compiled vars:  !0 = $ip
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '192.168.115.000'
    3     1        ROPE_INIT                                     3  ~3      'ip2long%28'
          2        ROPE_ADD                                      1  ~3      ~3, !0
          3        ROPE_END                                      2  ~2      ~3, '%29+PHP'
          4        INIT_FCALL                                               'phpversion'
          5        DO_ICALL                                         $5      
          6        CONCAT                                           ~6      ~2, $5
          7        CONCAT                                           ~7      ~6, '+'
          8        CONCAT                                           ~8      ~7, 'Linux'
          9        CONCAT                                           ~9      ~8, '+%3A+'
         10        INIT_FCALL                                               'ip2long'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $10     
         13        TYPE_CHECK                                    4          $10
         14      > JMPZ                                                     ~11, ->17
         15    >   QM_ASSIGN                                        ~12     'invalid'
         16      > JMP                                                      ->18
         17    >   QM_ASSIGN                                        ~12     'valid'
         18    >   CONCAT                                           ~13     ~9, ~12
         19        ECHO                                                     ~13
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.29 ms | 1395 KiB | 17 Q