3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $len = 19; $text = "怎么将新闻的很长的标题只显示前面一些字,后面用.....来代替?"; echo strlen($text)<=$len ? $text : (substr($text,0,$len).chr(0)."....");
Output for 4.3.0 - 7.1.0
怎么将新闻的�....