3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'TIHUD-2011/Sosyal-Program'; $array = array(); preg_replace_callback('#\((.*?)\)|[^()]+#', function($m)use(&$array){ if(isset($m[1])){ $array[] = explode('/', $m[1]); }else{ $array[] = trim($m[0]); } }, $string); print_r($array); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LLk9Y
function name:  (null)
number of ops:  13
compiled vars:  !0 = $string, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'TIHUD-2011%2FSosyal-Program'
    3     1        ASSIGN                                                   !1, <array>
    4     2        INIT_FCALL                                               'preg_replace_callback'
          3        SEND_VAL                                                 '%23%5C%28%28.%2A%3F%29%5C%29%7C%5B%5E%28%29%5D%2B%23'
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FLLk9Y%3A4%240'
          5        BIND_LEXICAL                                             ~4, !1
   10     6        SEND_VAL                                                 ~4
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   11     9        INIT_FCALL                                               'print_r'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
   12    12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FLLk9Y%3A4%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 12
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LLk9Y
function name:  {closure}
number of ops:  19
compiled vars:  !0 = $m, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
    5     2        ISSET_ISEMPTY_DIM_OBJ                         0          !0, 1
          3      > JMPZ                                                     ~2, ->12
    6     4    >   INIT_FCALL                                               'explode'
          5        SEND_VAL                                                 '%2F'
          6        FETCH_DIM_R                                      ~4      !0, 1
          7        SEND_VAL                                                 ~4
          8        DO_ICALL                                         $5      
          9        ASSIGN_DIM                                               !1
         10        OP_DATA                                                  $5
         11      > JMP                                                      ->18
    8    12    >   INIT_FCALL                                               'trim'
         13        FETCH_DIM_R                                      ~7      !0, 0
         14        SEND_VAL                                                 ~7
         15        DO_ICALL                                         $8      
         16        ASSIGN_DIM                                               !1
         17        OP_DATA                                                  $8
   10    18    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FLLk9Y%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.83 ms | 1396 KiB | 21 Q