3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inputs = [ 'בְּרֵאשִׁית בָּרָא אֱלֹהִים אֵת הַשָּׁמַיִם וְאֵת הָאָֽרֶץ', 'בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ', ]; foreach ($inputs as $input) { $output = preg_replace('/[\x{0591}-\x{05AF}\x{05BE}\x{05C0}\x{05C3}]+/u', '', $input, -1, $count); echo !$count ? "no change" : "Replacement Count: {$count}\nBefore: {$input}\n After: {$output}"; echo "\n---\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 25
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 25
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/bHdkg
function name:  (null)
number of ops:  27
compiled vars:  !0 = $inputs, !1 = $input, !2 = $output, !3 = $count
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    7     1      > FE_RESET_R                                       $5      !0, ->25
          2    > > FE_FETCH_R                                               $5, !1, ->25
    8     3    >   INIT_FCALL                                               'preg_replace'
          4        SEND_VAL                                                 '%2F%5B%5Cx%7B0591%7D-%5Cx%7B05AF%7D%5Cx%7B05BE%7D%5Cx%7B05C0%7D%5Cx%7B05C3%7D%5D%2B%2Fu'
          5        SEND_VAL                                                 ''
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 -1
          8        SEND_REF                                                 !3
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
    9    11        BOOL_NOT                                         ~8      !3
         12      > JMPZ                                                     ~8, ->15
         13    >   QM_ASSIGN                                        ~9      'no+change'
         14      > JMP                                                      ->22
         15    >   ROPE_INIT                                     6  ~11     'Replacement+Count%3A+'
         16        ROPE_ADD                                      1  ~11     ~11, !3
         17        ROPE_ADD                                      2  ~11     ~11, '%0ABefore%3A+'
         18        ROPE_ADD                                      3  ~11     ~11, !1
         19        ROPE_ADD                                      4  ~11     ~11, '%0A+After%3A+'
         20        ROPE_END                                      5  ~10     ~11, !2
         21        QM_ASSIGN                                        ~9      ~10
         22    >   ECHO                                                     ~9
   10    23        ECHO                                                     '%0A---%0A'
    7    24      > JMP                                                      ->2
         25    >   FE_FREE                                                  $5
   11    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.99 ms | 1001 KiB | 14 Q