<?php
$i = IntlBreakIterator::createWordInstance('en');
$i->setText('This is so awesome. Don\'t you think?');
foreach($i->getPartsIterator(IntlPartsIterator::KEY_RIGHT) as $word) {
echo var_dump($word);
}
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
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 8.0.13
Fatal error: Uncaught Error: Class "IntlBreakIterator" not found in /in/EIeM2:3
Stack trace:
#0 {main}
thrown in /in/EIeM2 on line 3
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 7.4.33
Fatal error: Uncaught Error: Class 'IntlBreakIterator' not found in /in/EIeM2:3
Stack trace:
#0 {main}
thrown in /in/EIeM2 on line 3
Process exited with code 255.
Output for 5.4.0 - 5.4.45
Fatal error: Class 'IntlBreakIterator' not found in /in/EIeM2 on line 3
Process exited with code 255.