3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ip = '192.168.21.0 - 192.168.21.255'; $ip = explode('-', $ip); list($lower, $upper) = $ip; $lower_dec = (float) sprintf("%u", ip2long($lower)); $upper_dec = (float) sprintf("%u", ip2long($upper)); print_r(ip2long($lower)); print_r(ip2long($upper));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ajl0S
function name:  (null)
number of ops:  43
compiled vars:  !0 = $ip, !1 = $lower, !2 = $upper, !3 = $lower_dec, !4 = $upper_dec
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '192.168.21.0+-+192.168.21.255'
    3     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '-'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !0, $6
    4     6        QM_ASSIGN                                        ~8      !0
          7        FETCH_LIST_R                                     $9      ~8, 0
          8        ASSIGN                                                   !1, $9
          9        FETCH_LIST_R                                     $11     ~8, 1
         10        ASSIGN                                                   !2, $11
         11        FREE                                                     ~8
    6    12        INIT_FCALL                                               'sprintf'
         13        SEND_VAL                                                 '%25u'
         14        INIT_FCALL                                               'ip2long'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $13     
         17        SEND_VAR                                                 $13
         18        DO_ICALL                                         $14     
         19        CAST                                          5  ~15     $14
         20        ASSIGN                                                   !3, ~15
    7    21        INIT_FCALL                                               'sprintf'
         22        SEND_VAL                                                 '%25u'
         23        INIT_FCALL                                               'ip2long'
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                         $17     
         26        SEND_VAR                                                 $17
         27        DO_ICALL                                         $18     
         28        CAST                                          5  ~19     $18
         29        ASSIGN                                                   !4, ~19
    8    30        INIT_FCALL                                               'print_r'
         31        INIT_FCALL                                               'ip2long'
         32        SEND_VAR                                                 !1
         33        DO_ICALL                                         $21     
         34        SEND_VAR                                                 $21
         35        DO_ICALL                                                 
    9    36        INIT_FCALL                                               'print_r'
         37        INIT_FCALL                                               'ip2long'
         38        SEND_VAR                                                 !2
         39        DO_ICALL                                         $23     
         40        SEND_VAR                                                 $23
         41        DO_ICALL                                                 
         42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.55 ms | 1396 KiB | 21 Q