3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $i = IntlBreakIterator::createWordInstance('en'); $i->setText('This is so awesome. Don\'t you think?'); var_dump($i->following(IntlBreakIterator::WORD_NUMBER)); foreach($i->getPartsIterator(IntlPartsIterator::KEY_RIGHT) as $word) { echo var_dump($word); }
based on ZHIYj
Output for 5.5.17, 5.6.0 - 5.6.38, 7.0.0 - 7.2.12
int(-1) string(4) "This" string(1) " " string(2) "is" string(1) " " string(2) "so" string(1) " " string(7) "awesome" string(1) "." string(1) " " string(5) "Don't" string(1) " " string(3) "you" string(1) " " string(5) "think" string(1) "?"
Output for hhvm-3.22.0
int(-1) Fatal error: Uncaught Error: Couldn't find constant IntlPartsIterator::KEY_RIGHT in /in/fo0bu:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.11.1 - 3.21.3
int(-1) Fatal error: Uncaught Error: Couldn't find constant IntlPartsIterator::KEY_RIGHT in /in/fo0bu:7 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.1
int(-1) Fatal error: Couldn't find constant IntlPartsIterator::KEY_RIGHT in /in/fo0bu on line 7
Process exited with code 255.
Output for 5.3.19 - 5.5.16, 5.5.18 - 5.5.38
Fatal error: Class 'IntlBreakIterator' not found in /in/fo0bu on line 3
Process exited with code 255.