3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $coll = new Collator('root'); var_dump(substr_count($coll->getSortKey('Hello'), "\0"));
based on XH4sE
Output for 5.4.5 - 7.2.6
int(0)
Output for 5.4.0 - 5.4.4
int(1)
Output for 5.0.0 - 5.3.29
Fatal error: Class 'Collator' not found in /in/ofp14 on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: collator in /in/ofp14 on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: collator in /in/ofp14 on line 2