3v4l.org

run code in 300+ PHP versions simultaneously
<?php $address = '1::'; $parts = explode(':', $address); $len = count($parts); if ($len < 8) { if ($parts[0] === '') { array_splice($parts, 0, 0, array_fill(0, 8 - $len, 0)); $parts = array_reverse($parts); } else { $parts = array_reverse($parts); if ($parts[0] === '') { array_splice($parts, 0, 0, array_fill(0, 8 - $len, 0)); } else { } } } var_dump($parts);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 50
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 30
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 50
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
Branch analysis from position: 50
Branch analysis from position: 50
filename:       /in/WvgXi
function name:  (null)
number of ops:  54
compiled vars:  !0 = $address, !1 = $parts, !2 = $len
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '1%3A%3A'
    5     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%3A'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    6     6        COUNT                                            ~6      !1
          7        ASSIGN                                                   !2, ~6
    8     8        IS_SMALLER                                               !2, 8
          9      > JMPZ                                                     ~8, ->50
    9    10    >   FETCH_DIM_R                                      ~9      !1, 0
         11        IS_IDENTICAL                                             ~9, ''
         12      > JMPZ                                                     ~10, ->30
   10    13    >   INIT_FCALL                                               'array_splice'
         14        SEND_REF                                                 !1
         15        SEND_VAL                                                 0
         16        SEND_VAL                                                 0
         17        INIT_FCALL                                               'array_fill'
         18        SEND_VAL                                                 0
         19        SUB                                              ~11     8, !2
         20        SEND_VAL                                                 ~11
         21        SEND_VAL                                                 0
         22        DO_ICALL                                         $12     
         23        SEND_VAR                                                 $12
         24        DO_ICALL                                                 
   11    25        INIT_FCALL                                               'array_reverse'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                         $14     
         28        ASSIGN                                                   !1, $14
         29      > JMP                                                      ->50
   13    30    >   INIT_FCALL                                               'array_reverse'
         31        SEND_VAR                                                 !1
         32        DO_ICALL                                         $16     
         33        ASSIGN                                                   !1, $16
   14    34        FETCH_DIM_R                                      ~18     !1, 0
         35        IS_IDENTICAL                                             ~18, ''
         36      > JMPZ                                                     ~19, ->50
   15    37    >   INIT_FCALL                                               'array_splice'
         38        SEND_REF                                                 !1
         39        SEND_VAL                                                 0
         40        SEND_VAL                                                 0
         41        INIT_FCALL                                               'array_fill'
         42        SEND_VAL                                                 0
         43        SUB                                              ~20     8, !2
         44        SEND_VAL                                                 ~20
         45        SEND_VAL                                                 0
         46        DO_ICALL                                         $21     
         47        SEND_VAR                                                 $21
         48        DO_ICALL                                                 
         49      > JMP                                                      ->50
   21    50    >   INIT_FCALL                                               'var_dump'
         51        SEND_VAR                                                 !1
         52        DO_ICALL                                                 
         53      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.99 ms | 1400 KiB | 23 Q