3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = '<p>Lorem ipsum dolor sitamet consec tetuer adipiscing elit praesent ves tibulum moles tie lacusenean non ummy hendrer maur hasellus porta usce suscipit varius mi.</p> <p><!-- pagebreak --></p> <p>Lorem ipsum next.</p>'; $string = substr($string, 0, strpos($string, '<!-- pagebreak -->')); var_dump($string);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(170) "<p>Lorem ipsum dolor sitamet consec tetuer adipiscing elit praesent ves tibulum moles tie lacusenean non ummy hendrer maur hasellus porta usce suscipit varius mi.</p> <p>"