3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = <<<TXT /some text/ TXT; $pattern = "/ั‚ะตัั‚"; $pattern = mb_convert_encoding($pattern, 'UTF-8', 'CP1251'); $pattern = preg_quote($pattern, '/'); 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/h4T1v
function name:  (null)
number of ops:  30
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                                                 'CP1251'
          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
   13    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
   15    16        ASSIGN                                                   !2, <array>
   16    17        INIT_FCALL                                               'preg_match_all'
         18        CONCAT                                           ~12     '%2F', !1
         19        CONCAT                                           ~13     ~12, '%2Fmi'
         20        SEND_VAL                                                 ~13
         21        SEND_VAR                                                 !0
         22        SEND_REF                                                 !2
         23        DO_ICALL                                         $14     
         24        ASSIGN                                                   !3, $14
   18    25        INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !3
         27        SEND_VAR                                                 !2
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.79 ms | 1395 KiB | 21 Q