3v4l.org

run code in 300+ PHP versions simultaneously
<?php // just do this... $matches = array(); preg_match_all('/\s(:\w+)/', 'jhkjh :fgfgfgfg :fgfg : : ffgg', $matches); print_r($matches); // we could wrap it in a function that eliminates the pass by reference, and/or use Flux (https://github.com/selvinortiz/flux) and extend it $matches = array(); preg_match_all('/\s(:\w+)/', 'jhkjh :fgfgfgfg :fgfg : : ffgg', $matches, PREG_SET_ORDER); print_r($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3niO0
function name:  (null)
number of ops:  20
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%5Cs%28%3A%5Cw%2B%29%2F'
          3        SEND_VAL                                                 'jhkjh+%3Afgfgfgfg+%3Afgfg+%3A+%3A+ffgg'
          4        SEND_REF                                                 !0
          5        DO_ICALL                                                 
    5     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
    9     9        ASSIGN                                                   !0, <array>
   10    10        INIT_FCALL                                               'preg_match_all'
         11        SEND_VAL                                                 '%2F%5Cs%28%3A%5Cw%2B%29%2F'
         12        SEND_VAL                                                 'jhkjh+%3Afgfgfgfg+%3Afgfg+%3A+%3A+ffgg'
         13        SEND_REF                                                 !0
         14        SEND_VAL                                                 2
         15        DO_ICALL                                                 
   11    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.41 ms | 1395 KiB | 17 Q