3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo preg_replace('@(?=\pLm)@u', '*', 'م'), PHP_EOL; // prints: '*م' ✓ echo preg_replace('@(?=\pLm)@u', '*', 'ض'), PHP_EOL; // prints: '*ض' ✓ echo preg_replace('@(?=\pLm)@u', '*', 'غ'), PHP_EOL; // prints: '*�*�' ✗ echo preg_replace('@(?=\pLm)@u', '*', 'ص'), PHP_EOL; // prints: '*�*�' ✗
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k4QtD
function name:  (null)
number of ops:  29
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'preg_replace'
          1        SEND_VAL                                                 '%40%28%3F%3D%5CpLm%29%40u'
          2        SEND_VAL                                                 '%2A'
          3        SEND_VAL                                                 '%D9%85'
          4        DO_ICALL                                         $0      
          5        ECHO                                                     $0
          6        ECHO                                                     '%0A'
    4     7        INIT_FCALL                                               'preg_replace'
          8        SEND_VAL                                                 '%40%28%3F%3D%5CpLm%29%40u'
          9        SEND_VAL                                                 '%2A'
         10        SEND_VAL                                                 '%D8%B6'
         11        DO_ICALL                                         $1      
         12        ECHO                                                     $1
         13        ECHO                                                     '%0A'
    5    14        INIT_FCALL                                               'preg_replace'
         15        SEND_VAL                                                 '%40%28%3F%3D%5CpLm%29%40u'
         16        SEND_VAL                                                 '%2A'
         17        SEND_VAL                                                 '%D8%BA'
         18        DO_ICALL                                         $2      
         19        ECHO                                                     $2
         20        ECHO                                                     '%0A'
    6    21        INIT_FCALL                                               'preg_replace'
         22        SEND_VAL                                                 '%40%28%3F%3D%5CpLm%29%40u'
         23        SEND_VAL                                                 '%2A'
         24        SEND_VAL                                                 '%D8%B5'
         25        DO_ICALL                                         $3      
         26        ECHO                                                     $3
         27        ECHO                                                     '%0A'
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.17 ms | 1395 KiB | 15 Q