3v4l.org

run code in 500+ PHP versions simultaneously
<?php $stringSplit = "+foo a -ba24+Sample3"; preg_match_all("/\+[^-+\s]+/", $stringSplit, $matchesPlus); print_r($matchesPlus[0]); preg_match_all("/-[^-+\s]+/", $stringSplit, $matchesMinus); print_r($matchesMinus[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L19jg
function name:  (null)
number of ops:  20
compiled vars:  !0 = $stringSplit, !1 = $matchesPlus, !2 = $matchesMinus
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%2Bfoo+a+-ba24%2BSample3'
    5     1        INIT_FCALL                                                   'preg_match_all'
          2        SEND_VAL                                                     '%2F%5C%2B%5B%5E-%2B%5Cs%5D%2B%2F'
          3        SEND_VAR                                                     !0
          4        SEND_REF                                                     !1
          5        DO_ICALL                                                     
    6     6        INIT_FCALL                                                   'print_r'
          7        FETCH_DIM_R                                          ~5      !1, 0
          8        SEND_VAL                                                     ~5
          9        DO_ICALL                                                     
    8    10        INIT_FCALL                                                   'preg_match_all'
         11        SEND_VAL                                                     '%2F-%5B%5E-%2B%5Cs%5D%2B%2F'
         12        SEND_VAR                                                     !0
         13        SEND_REF                                                     !2
         14        DO_ICALL                                                     
    9    15        INIT_FCALL                                                   'print_r'
         16        FETCH_DIM_R                                          ~8      !2, 0
         17        SEND_VAL                                                     ~8
         18        DO_ICALL                                                     
         19      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
128.87 ms | 479 KiB | 9 Q