3v4l.org

run code in 300+ PHP versions simultaneously
<?php function stripDiacritics(string $string): string { return preg_replace('/[\x{0300}-\x{036f}]/u', '', Normalizer::normalize($string , Normalizer::FORM_D)); } var_dump(stripDiacritics('äüößà')); var_dump(stripDiacritics('c̳̻͚̻̩̻͉̯̄̏͑̋͆̎͐ͬ͑͌́͢h̵͔͈͍͇̪̯͇̞͖͇̜͉̪̪̤̙ͧͣ̓̐̓ͤ͋͒ͥ͑̆͒̓͋̑́͞ǎ̡̮̤̤̬͚̝͙̞͎̇ͧ͆͊ͅo̴̲̺͓̖͖͉̜̟̗̮̳͉̻͉̫̯̫̍̋̿̒͌̃̂͊̏̈̏̿ͧ́ͬ̌ͥ̇̓̀͢͜s̵̵̘̹̜̝̘̺̙̻̠̱͚̤͓͚̠͙̝͕͆̿̽ͥ̃͠͡'));
Output for 7.0.0, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.3.33, 7.4.0 - 7.4.25, 7.4.27 - 7.4.32, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.27, 8.4.1 - 8.4.14
string(6) "auoßa" string(5) "chaos"
Output for 8.0.13
Fatal error: Uncaught Error: Class "Normalizer" not found in /in/WodoOD:4 Stack trace: #0 /in/WodoOD(7): stripDiacritics('\xC3\xA4\xC3\xBC\xC3\xB6\xC3\x9F\xC3\xA0') #1 {main} thrown in /in/WodoOD on line 4
Process exited with code 255.
Output for 7.3.32, 7.4.26, 7.4.33
Fatal error: Uncaught Error: Class 'Normalizer' not found in /in/WodoOD:4 Stack trace: #0 /in/WodoOD(7): stripDiacritics('\xC3\xA4\xC3\xBC\xC3\xB6\xC3\x9F\xC3\xA0') #1 {main} thrown in /in/WodoOD on line 4
Process exited with code 255.
Output for 5.6.38
Parse error: syntax error, unexpected ':', expecting '{' in /in/WodoOD on line 3
Process exited with code 255.

preferences:
54.97 ms | 409 KiB | 5 Q