3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = 'תירס גדול A-10 (פרי גליל)'; echo preg_replace_callback( "/\p{Hebrew}+(?: \p{Hebrew}+)*/u", fn($m) => implode( array_reverse( preg_split('~~u', $m[0], 0, PREG_SPLIT_NO_EMPTY) ) ), $str );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/usfi2
function name:  (null)
number of ops:  9
compiled vars:  !0 = $str
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%D7%AA%D7%99%D7%A8%D7%A1+%D7%92%D7%93%D7%95%D7%9C+A-10+%28%D7%A4%D7%A8%D7%99+%D7%92%D7%9C%D7%99%D7%9C%29'
    4     1        INIT_FCALL                                                   'preg_replace_callback'
    5     2        SEND_VAL                                                     '%2F%5Cp%7BHebrew%7D%2B%28%3F%3A+%5Cp%7BHebrew%7D%2B%29%2A%2Fu'
    6     3        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
   10     4        SEND_VAL                                                     ~2
   11     5        SEND_VAR                                                     !0
    4     6        DO_ICALL                                             $3      
   11     7        ECHO                                                         $3
   12     8      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/usfi2
function name:  {closure:/in/usfi2:6}
number of ops:  14
compiled vars:  !0 = $m
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
    7     1        INIT_FCALL                                                   'array_reverse'
    8     2        INIT_FCALL                                                   'preg_split'
          3        SEND_VAL                                                     '%7E%7Eu'
          4        FETCH_DIM_R                                          ~1      !0, 0
          5        SEND_VAL                                                     ~1
          6        SEND_VAL                                                     0
          7        SEND_VAL                                                     1
          8        DO_ICALL                                             $2      
          9        SEND_VAR                                                     $2
    7    10        DO_ICALL                                             $3      
    6    11        FRAMELESS_ICALL_1                implode             ~4      $3
    8    12      > RETURN                                                       ~4
   10    13*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.95 ms | 1956 KiB | 16 Q