3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function normalise($string) { preg_match('~[a-z0-9]+$~i', $string, $match); if ( ! isset($match[0])) { return false; } return strtoupper($match[0]); } echo normalise('Deu-12345tx'), PHP_EOL;
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.6.21, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
12345TX
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
12345TX Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/hVMZU on line 13 PHP_EOL