3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "\w without the \u flag should result in int(0) in all PHP versions\n"; var_dump(preg_match('/\w/', 'ä')); echo "\n\w with the \u flag used to result in int(1) in PHP <7.3!\n"; var_dump(preg_match('/\w/u', 'ä')); echo "\n\pL instead of \w used to result in int(1) in all PHP versions\n"; var_dump(preg_match('/\pL/u', 'ä'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uJKEC
function name:  (null)
number of ops:  25
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     '%5Cw+without+the+%5Cu+flag+should+result+in+int%280%29+in+all+PHP+versions%0A'
    4     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'preg_match'
          3        SEND_VAL                                                 '%2F%5Cw%2F'
          4        SEND_VAL                                                 '%C3%A4'
          5        DO_ICALL                                         $0      
          6        SEND_VAR                                                 $0
          7        DO_ICALL                                                 
    6     8        ECHO                                                     '%0A%5Cw+with+the+%5Cu+flag+used+to+result+in+int%281%29+in+PHP+%3C7.3%21%0A'
    7     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'preg_match'
         11        SEND_VAL                                                 '%2F%5Cw%2Fu'
         12        SEND_VAL                                                 '%C3%A4'
         13        DO_ICALL                                         $2      
         14        SEND_VAR                                                 $2
         15        DO_ICALL                                                 
    9    16        ECHO                                                     '%0A%5CpL+instead+of+%5Cw+used+to+result+in+int%281%29+in+all+PHP+versions%0A'
   10    17        INIT_FCALL                                               'var_dump'
         18        INIT_FCALL                                               'preg_match'
         19        SEND_VAL                                                 '%2F%5CpL%2Fu'
         20        SEND_VAL                                                 '%C3%A4'
         21        DO_ICALL                                         $4      
         22        SEND_VAR                                                 $4
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.93 ms | 1395 KiB | 17 Q