3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $re = "/^[a-zA-Z ,.\p{Han}]+$/u"; $tests = array( 'Mr Smith', 'Mr. Smith', 'Mr. 123 Smith', '姓名', 'tom!!!', 'Mary@', 'May#', 'john$', 'ee%', 'e^', 'EE&', 'EE(', 'vivek', '姓名#', '姓名 # 那裡外籍' ); foreach ($tests as $test) { if (preg_match($re, $test) !== 1) { echo $test . ' failed' . PHP_EOL; } }
based on 5notQ
Output for 4.4.3 - 4.4.9, 5.1.3 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Mr. 123 Smith failed tom!!! failed Mary@ failed May# failed john$ failed ee% failed e^ failed EE& failed EE( failed 姓名# failed 姓名 # 那裡外籍 failed
Output for 4.4.0 - 4.4.2, 5.0.5 - 5.1.2
Warning: preg_match(): Compilation failed: unknown property name after \P or \p at offset 17 in /in/r5HHK on line 24 Mr Smith failed Warning: preg_match(): Compilation failed: unknown property name after \P or \p at offset 17 in /in/r5HHK on line 24 Mr. Smith failed Warning: preg_match(): Compilation failed: unknown property name after \P or \p at offset 17 in /in/r5HHK on line 24 Mr. 123 Smith failed Warning: preg_match(): Compilation failed: unknown property name after \P or \p at offset 17 in /in/r5HHK on line 24 姓名 failed Warning: preg_match(): Compilation failed: unknown property name after \P or \p at offset 17 in /in/r5HHK on line 24 tom!!! failed Warning: preg_match(): Compilation failed: unknown property name after \P or \p at offset 17 in /in/r5HHK on line 24 Mary@ failed Warning: preg_match(): Compilation failed: unknown property name after \P or \p at offset 17 in /in/r5HHK on line 24 May# failed Warning: preg_match(): Compilation failed: unknown property name after \P or \p at offset 17 in /in/r5HHK on line 24 john$ failed Warning: preg_match(): Compilation failed: unknown property name after \P or \p at offset 17 in /in/r5HHK on line 24 ee% failed Warning: preg_match(): Compilation failed: unknown property name after \P or \p at offset 17 in /in/r5HHK on line 24 e^ failed Warning: preg_match(): Compilation failed: unknown property name after \P or \p at offset 17 in /in/r5HHK on line 24 EE& failed Warning: preg_match(): Compilation failed: unknown property name after \P or \p at offset 17 in /in/r5HHK on line 24 EE( failed Warning: preg_match(): Compilation failed: unknown property name after \P or \p at offset 17 in /in/r5HHK on line 24 vivek failed Warning: preg_match(): Compilation failed: unknown property name after \P or \p at offset 17 in /in/r5HHK on line 24 姓名# failed Warning: preg_match(): Compilation failed: unknown property name after \P or \p at offset 17 in /in/r5HHK on line 24 姓名 # 那裡外籍 failed
Output for 4.3.11, 5.0.2 - 5.0.4
Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Mr Smith failed Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Mr. Smith failed Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Mr. 123 Smith failed Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 姓名 failed Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 tom!!! failed Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Mary@ failed Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 May# failed Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 john$ failed Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 ee% failed Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 e^ failed Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 EE& failed Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 EE( failed Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 vivek failed Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 姓名# failed Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 姓名 # 那裡外籍 failed
Output for 5.0.0 - 5.0.1
Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 Mr Smith failedPHP_EOL Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 Mr. Smith failedPHP_EOL Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 Mr. 123 Smith failedPHP_EOL Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 姓名 failedPHP_EOL Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 tom!!! failedPHP_EOL Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 Mary@ failedPHP_EOL Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 May# failedPHP_EOL Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 john$ failedPHP_EOL Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 ee% failedPHP_EOL Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 e^ failedPHP_EOL Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 EE& failedPHP_EOL Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 EE( failedPHP_EOL Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 vivek failedPHP_EOL Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 姓名# failedPHP_EOL Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 姓名 # 那裡外籍 failedPHP_EOL
Output for 4.3.10
Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Mr Smith failed Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Mr. Smith failed Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Mr. 123 Smith failed Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 姓名 failed Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 tom!!! failed Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Mary@ failed Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 May# failed Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 john$ failed Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 ee% failed Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 e^ failed Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 EE& failed Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 EE( failed Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 vivek failed Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 姓名# failed Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 姓名 # 那裡外籍 failed
Output for 4.3.0 - 4.3.9
Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 Mr Smith failedPHP_EOL Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 Mr. Smith failedPHP_EOL Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 Mr. 123 Smith failedPHP_EOL Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 姓名 failedPHP_EOL Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 tom!!! failedPHP_EOL Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 Mary@ failedPHP_EOL Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 May# failedPHP_EOL Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 john$ failedPHP_EOL Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 ee% failedPHP_EOL Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 e^ failedPHP_EOL Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 EE& failedPHP_EOL Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 EE( failedPHP_EOL Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 vivek failedPHP_EOL Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 姓名# failedPHP_EOL Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 12 in /in/r5HHK on line 24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r5HHK on line 25 姓名 # 那裡外籍 failedPHP_EOL