3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = "Ahoj já jsem poslední. "; $ln = mb_strlen($str, 'UTF-8'); ecoh $ln . "&nbsp;"; $ref = 0; $offset = mb_strrpos($str, ' ', $ref, 'UTF-8'); echo "<br>nalezeno na pozici $offset, \$ref = $ref"; $ref = ($ln - $offset + 1) * -1; $offset = mb_strrpos($str, ' ', $ref, 'UTF-8'); echo "<br>nalezeno na pozici $offset, \$ref = $ref"; $ref = ($ln - $offset + 1) * -1; $offset = mb_strrpos($str, ' ', $ref, 'UTF-8'); echo "<br>nalezeno na pozici $offset, \$ref = $ref"; $ref = ($ln - $offset + 1) * -1; $offset = mb_strrpos($str, ' ', $ref, 'UTF-8'); echo "<br>nalezeno na pozici $offset, \$ref = $ref"; $ref = ($ln - $offset + 1) * -1;
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected '$ln' (T_VARIABLE) in /in/W5HX5 on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/W5HX5 on line 4
Process exited with code 255.