3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo strlen("à"); echo "\n"; echo strlen(Normalizer::normalize("à", Normalizer::FORM_D)); $chars = Normalizer::normalize("à", Normalizer::FORM_D); $char = mb_substr($chars, 1, 1); $charCodepoint = IntlChar::ord($char); //onst integer PROPERTY_LEAD_CANONICAL_COMBINING_CLASS = 4112 ; //const integer PROPERTY_TRAIL_CANONICAL_COMBINING_CLASS = 4113 ; var_dump(IntlChar::hasBinaryProperty($charCodepoint, IntlChar::PROPERTY_TRAIL_CANONICAL_COMBINING_CLASS));
based on OOqRq
Output for 7.0.0 - 7.0.4, 7.0.6 - 7.2.6, 7.3.0rc3 - 7.3.0rc4
2 3bool(false)
Output for 7.0.5, 7.3.0alpha1 - 7.3.0beta1
2 Fatal error: Uncaught Error: Class 'Normalizer' not found in /in/WL7hn:5 Stack trace: #0 {main} thrown in /in/WL7hn on line 5
Process exited with code 255.
Output for 5.4.10 - 5.5.28, 5.5.31 - 5.5.33, 5.5.35 - 5.6.12, 5.6.16 - 5.6.19, 5.6.21 - 5.6.28
2 3 Fatal error: Class 'IntlChar' not found in /in/WL7hn on line 10
Process exited with code 255.
Output for 5.3.20 - 5.3.29, 5.5.29 - 5.5.30, 5.5.34, 5.6.13 - 5.6.15, 5.6.20
2 Fatal error: Class 'Normalizer' not found in /in/WL7hn on line 5
Process exited with code 255.