3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $language = 'ru'; $pattern = '{0, plural, one{# час} few{# часа} many{# часов(many)} other{# часов(other)}}'; $formatter = new \MessageFormatter($language, $pattern); echo $formatter->format([2]);
based on GKmfq
Output for 7.3.0alpha1 - 7.3.0beta1
Fatal error: Uncaught Error: Class 'MessageFormatter' not found in /in/Yh2J4:6 Stack trace: #0 {main} thrown in /in/Yh2J4 on line 6
Process exited with code 255.
Output for 5.6.0 - 5.6.30, 7.1.0 - 7.2.6
2 часа
Output for hhvm-3.18.5 - 3.22.0
2 часов(other)