3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = 'Bar\Foo\Baz'; echo strlen($str) . PHP_EOL; echo strlen($str) / 10 . PHP_EOL ; echo ceil(strlen($str) / 10) . PHP_EOL; echo min(ceil(strlen($str) / 10), 3) . PHP_EOL;
based on D46CY
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.2.0
11 1.1 2 2
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/pLejC on line 5 11PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/pLejC on line 6 1.1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/pLejC on line 7 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/pLejC on line 8 2PHP_EOL