3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo setlocale(LC_ALL, 0); echo setlocale(LANG, 0); echo setlocale(LC_COLLATE, 0); echo setlocale(LC_NUMERIC, 0); $text = '%&/()"QEm software VaLidation V20ººººº'; $replacementChar = ' '; // replace non Unicode letters or digits by the replacement char $text = preg_replace('/[^\pL\d]+/u', $replacementChar, $text); echo $text."\n"; // trim replacement characters that ended up at the edges $text = trim($text, $replacementChar); // Force conversion to us-ascci, to take care of accented characters // and transliterate replacing unknown characters by a similar one $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text); echo $text."\n"; $text = strtolower($text); // Remove unwanted characters due to transliteration // but keep the replacement character $text = preg_replace('/[^'.$replacementChar.'\w]+/', '', $text); echo $text."\n";
Output for git.master, git.master_jit, rfc.property-hooks
C Fatal error: Uncaught Error: Undefined constant "LANG" in /in/m1V1r:4 Stack trace: #0 {main} thrown in /in/m1V1r on line 4
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
119.65 ms | 405 KiB | 5 Q