3v4l.org

run code in 300+ PHP versions simultaneously
<?php $message = "输入法. 手写; 拼音; 关闭. 百科 文库 hao123 | 更多>> · 把百度设为主页把百度设为主页关于百度About Baidu. ©2014 Baidu 使用百度前必读 京ICP证030173号.";$end_html = 0;$start_html = 1;$tmp_message = '';$message = ' ' . $message . ' ';$html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#');$html_entities_replace = array('&amp;', '&lt;', '&gt;');$result = preg_replace($html_entities_match, $html_entities_replace, substr($message, $end_html + 1, ($start_html - $end_html - 1)));echo $result;

preferences:
38.4 ms | 402 KiB | 5 Q