3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(bin2hex(inet_pton('2001:0db8:85a3:08d3:1319:8a2e:0370:7344'))); var_dump(bin2hex(inet_pton('::1'))); var_dump(bin2hex(inet_pton('127.0.0.1')), bin2hex(inet_pton('::ffff:127.0.0.1')), bin2hex(inet_pton('::ffff:7f00:1'))); $ipHex = bin2hex(inet_pton('127.0.0.1')); $ipHex = (strlen($ipHex) == 8) ? '00000000000000000000ffff' . $ipHex : $ipHex; var_dump("SELECT 1 FROM IPv6Ranges WHERE X'" . $ipHex . "' BETWEEN `start` AND `end`");
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 51, Position 2 = 54
Branch analysis from position: 51
1 jumps found. (Code = 42) Position 1 = 55
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 54
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mMtv2
function name:  (null)
number of ops:  62
compiled vars:  !0 = $ipHex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'bin2hex'
          2        INIT_FCALL                                               'inet_pton'
          3        SEND_VAL                                                 '2001%3A0db8%3A85a3%3A08d3%3A1319%3A8a2e%3A0370%3A7344'
          4        DO_ICALL                                         $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                                 
    4     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'bin2hex'
         11        INIT_FCALL                                               'inet_pton'
         12        SEND_VAL                                                 '%3A%3A1'
         13        DO_ICALL                                         $4      
         14        SEND_VAR                                                 $4
         15        DO_ICALL                                         $5      
         16        SEND_VAR                                                 $5
         17        DO_ICALL                                                 
    5    18        INIT_FCALL                                               'var_dump'
         19        INIT_FCALL                                               'bin2hex'
         20        INIT_FCALL                                               'inet_pton'
         21        SEND_VAL                                                 '127.0.0.1'
         22        DO_ICALL                                         $7      
         23        SEND_VAR                                                 $7
         24        DO_ICALL                                         $8      
         25        SEND_VAR                                                 $8
         26        INIT_FCALL                                               'bin2hex'
         27        INIT_FCALL                                               'inet_pton'
         28        SEND_VAL                                                 '%3A%3Affff%3A127.0.0.1'
         29        DO_ICALL                                         $9      
         30        SEND_VAR                                                 $9
         31        DO_ICALL                                         $10     
         32        SEND_VAR                                                 $10
         33        INIT_FCALL                                               'bin2hex'
         34        INIT_FCALL                                               'inet_pton'
         35        SEND_VAL                                                 '%3A%3Affff%3A7f00%3A1'
         36        DO_ICALL                                         $11     
         37        SEND_VAR                                                 $11
         38        DO_ICALL                                         $12     
         39        SEND_VAR                                                 $12
         40        DO_ICALL                                                 
    7    41        INIT_FCALL                                               'bin2hex'
         42        INIT_FCALL                                               'inet_pton'
         43        SEND_VAL                                                 '127.0.0.1'
         44        DO_ICALL                                         $14     
         45        SEND_VAR                                                 $14
         46        DO_ICALL                                         $15     
         47        ASSIGN                                                   !0, $15
    8    48        STRLEN                                           ~17     !0
         49        IS_EQUAL                                                 ~17, 8
         50      > JMPZ                                                     ~18, ->54
         51    >   CONCAT                                           ~19     '00000000000000000000ffff', !0
         52        QM_ASSIGN                                        ~20     ~19
         53      > JMP                                                      ->55
         54    >   QM_ASSIGN                                        ~20     !0
         55    >   ASSIGN                                                   !0, ~20
    9    56        INIT_FCALL                                               'var_dump'
         57        CONCAT                                           ~22     'SELECT+1+FROM+IPv6Ranges+WHERE+X%27', !0
         58        CONCAT                                           ~23     ~22, '%27+BETWEEN+%60start%60+AND+%60end%60'
         59        SEND_VAL                                                 ~23
         60        DO_ICALL                                                 
         61      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.41 ms | 1400 KiB | 19 Q