3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo preg_replace('@(?=\pL)@u', '*', 'م'); // prints: '*م' ✓ echo preg_replace('@(?=\pL)@u', '*', 'ض'); // prints: '*ض' ✓ echo preg_replace('@(?=\pL)@u', '*', 'غ'); // prints: '*�*�' ✗ echo preg_replace('@(?=\pL)@u', '*', 'ص'); // prints: '*�*�' ✗
Output for 4.4.0 - 4.4.9, 5.0.5, 5.1.1 - 5.1.6, 5.5.27 - 5.5.35, 5.6.11 - 7.1.0
*م*ض*غ*ص
Output for 5.2.9 - 5.5.26, 5.6.8 - 5.6.10
*م*ض*�*�*�*�
Output for 5.2.0 - 5.2.8
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/sEPhM on line 6
Process exited with code 255.
Output for 4.3.11, 5.0.0 - 5.0.4
Warning: preg_replace(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 4 in /in/sEPhM on line 3 Warning: preg_replace(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 4 in /in/sEPhM on line 4 Warning: preg_replace(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 4 in /in/sEPhM on line 5 Warning: preg_replace(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 4 in /in/sEPhM on line 6
Output for 4.3.0 - 4.3.10
Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 4 in /in/sEPhM on line 3 Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 4 in /in/sEPhM on line 4 Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 4 in /in/sEPhM on line 5 Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 4 in /in/sEPhM on line 6