3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = <<<TXT /some text/ TXT; $pattern = "/ั‚ะตัั‚"; $pattern = mb_convert_encoding($pattern, 'UTF-8', 'Windows-1251'); $pattern = preg_quote($pattern, '/'); $pattern = mb_convert_encoding($pattern, 'Windows-1251', 'UTF-8'); var_dump($pattern); $matches = array(); $match = preg_match_all("/" . $pattern . "/mi", $text, $matches); var_dump($match, $matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qur3A
function name:  (null)
number of ops:  36
compiled vars:  !0 = $text, !1 = $pattern, !2 = $matches, !3 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%0A%2Fsome+text%2F%0A'
    9     1        ASSIGN                                                   !1, '%2F%D1%82%D0%B5%D1%81%D1%82'
   10     2        INIT_FCALL                                               'mb_convert_encoding'
          3        SEND_VAR                                                 !1
          4        SEND_VAL                                                 'UTF-8'
          5        SEND_VAL                                                 'Windows-1251'
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !1, $6
   11     8        INIT_FCALL                                               'preg_quote'
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 '%2F'
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !1, $8
   12    13        INIT_FCALL                                               'mb_convert_encoding'
         14        SEND_VAR                                                 !1
         15        SEND_VAL                                                 'Windows-1251'
         16        SEND_VAL                                                 'UTF-8'
         17        DO_ICALL                                         $10     
         18        ASSIGN                                                   !1, $10
   14    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                                 
   16    22        ASSIGN                                                   !2, <array>
   17    23        INIT_FCALL                                               'preg_match_all'
         24        CONCAT                                           ~14     '%2F', !1
         25        CONCAT                                           ~15     ~14, '%2Fmi'
         26        SEND_VAL                                                 ~15
         27        SEND_VAR                                                 !0
         28        SEND_REF                                                 !2
         29        DO_ICALL                                         $16     
         30        ASSIGN                                                   !3, $16
   19    31        INIT_FCALL                                               'var_dump'
         32        SEND_VAR                                                 !3
         33        SEND_VAR                                                 !2
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.56 ms | 1400 KiB | 21 Q