3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = 'this is é a test of а system'; $it = IntlBreakIterator::createCharacterInstance(); $it->setText($str); foreach($it->getPartsIterator() as $char) { var_dump(bin2hex($char)); }
based on 54aed
Output for 7.1.25, 7.2.8 - 7.3.1
string(2) "74" string(2) "68" string(2) "69" string(2) "73" string(2) "20" string(2) "69" string(2) "73" string(2) "20" string(4) "c3a9" string(2) "20" string(2) "61" string(2) "20" string(2) "74" string(2) "65" string(2) "73" string(2) "74" string(2) "20" string(2) "6f" string(2) "66" string(2) "20" string(4) "d0b0" string(2) "20" string(2) "73" string(2) "79" string(2) "73" string(2) "74" string(2) "65" string(2) "6d"
Output for 7.2.0 - 7.2.7
Warning: IntlBreakIterator::createCharacterInstance() expects exactly 1 parameter, 0 given in /in/Ftq1v on line 4 Fatal error: Uncaught Error: Call to a member function setText() on null in /in/Ftq1v:5 Stack trace: #0 {main} thrown in /in/Ftq1v on line 5
Process exited with code 255.