3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = '  love@outerbanks.org  '; preg_match('/^\x{c2a0}*(.*?)\x{c2a0}*$/u', $string, $out); var_dump($out[1]); foreach ($out[1] as $chr) { echo ord($chr); }
based on CfltQ
Output for 4.3.3 - 4.3.10, 4.4.0 - 5.6.28, 7.0.0 - 7.1.0
string(27) "  love@outerbanks.org  " Warning: Invalid argument supplied for foreach() in /in/4MAi1 on line 8
Output for hhvm-3.10.0 - 3.12.0
string(27) "  love@outerbanks.org  " Warning: Invalid argument supplied for foreach() in /in/4MAi1 on line 10
Output for 4.3.11
string(27) "  love@outerbanks.org  "
Output for 4.3.0 - 4.3.2
Notice: Undefined offset: 1 in /in/4MAi1 on line 6 NULL Warning: Invalid argument supplied for foreach() in /in/4MAi1 on line 8