3v4l.org

run code in 500+ 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:  16
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        FRAMELESS_ICALL_2                preg_match          ~0      '%2F%5Cw%2F', '%C3%A4'
          3        SEND_VAL                                                     ~0
          4        DO_ICALL                                                     
    6     5        ECHO                                                         '%0A%5Cw+with+the+%5Cu+flag+used+to+result+in+int%281%29+in+PHP+%3C7.3%21%0A'
    7     6        INIT_FCALL                                                   'var_dump'
          7        FRAMELESS_ICALL_2                preg_match          ~2      '%2F%5Cw%2Fu', '%C3%A4'
          8        SEND_VAL                                                     ~2
          9        DO_ICALL                                                     
    9    10        ECHO                                                         '%0A%5CpL+instead+of+%5Cw+used+to+result+in+int%281%29+in+all+PHP+versions%0A'
   10    11        INIT_FCALL                                                   'var_dump'
         12        FRAMELESS_ICALL_2                preg_match          ~4      '%2F%5CpL%2Fu', '%C3%A4'
         13        SEND_VAL                                                     ~4
         14        DO_ICALL                                                     
         15      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
169.7 ms | 3366 KiB | 14 Q