3v4l.org

run code in 300+ PHP versions simultaneously
<?php $commands = "[CMD1,[CMD2],[CMD3,[CMD4],[CMD5]]]"; if (preg_match_all('/[^][,]+/', $commands, $matches)) { $array = $matches[0]; rsort($array); print_r($array); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 15
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/I1GIo
function name:  (null)
number of ops:  16
compiled vars:  !0 = $commands, !1 = $matches, !2 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5BCMD1%2C%5BCMD2%5D%2C%5BCMD3%2C%5BCMD4%5D%2C%5BCMD5%5D%5D%5D'
    4     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%5B%5E%5D%5B%2C%5D%2B%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                         $4      
          6      > JMPZ                                                     $4, ->15
    5     7    >   FETCH_DIM_R                                      ~5      !1, 0
          8        ASSIGN                                                   !2, ~5
    6     9        INIT_FCALL                                               'rsort'
         10        SEND_REF                                                 !2
         11        DO_ICALL                                                 
    7    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
    8    15    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.65 ms | 1001 KiB | 16 Q