3v4l.org

run code in 300+ PHP versions simultaneously
<?php // 1. example (not working) $get_string = "format=[epub,mobi]"; parse_str($get_string, $get_array); print_r($get_array); // 2. example: (working) $get_string = "format[]=epub&format[]=mobi"; parse_str($get_string, $get_array); print_r($get_array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f74K5
function name:  (null)
number of ops:  17
compiled vars:  !0 = $get_string, !1 = $get_array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'format%3D%5Bepub%2Cmobi%5D'
    5     1        INIT_FCALL                                               'parse_str'
          2        SEND_VAR                                                 !0
          3        SEND_REF                                                 !1
          4        DO_ICALL                                                 
    6     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
    9     8        ASSIGN                                                   !0, 'format%5B%5D%3Depub%26format%5B%5D%3Dmobi'
   10     9        INIT_FCALL                                               'parse_str'
         10        SEND_VAR                                                 !0
         11        SEND_REF                                                 !1
         12        DO_ICALL                                                 
   11    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.61 ms | 1394 KiB | 17 Q