3v4l.org

run code in 300+ PHP versions simultaneously
<?php $source = '<p>Today, not only we have so many breeds that are trained this and that.</p> <h4><strong>We must add a dot after the closing strong</strong></h4> <p>Hunting with your dog is a blah blah with each other.</p> <h2>No need to change this one!</h2> <p>Hunting with your dog is a blah blah with each other.</p>'; $source = addMissingPunctuation( $source ); echo $source; function addMissingPunctuation( $input ) { return preg_replace("/[^,.;!?]\K<\/h[1-6]>/mi", '.\0', $input); }
Output for git.master, git.master_jit, rfc.property-hooks
<p>Today, not only we have so many breeds that are trained this and that.</p> <h4><strong>We must add a dot after the closing strong</strong>.</h4> <p>Hunting with your dog is a blah blah with each other.</p> <h2>No need to change this one!</h2> <p>Hunting with your dog is a blah blah with each other.</p>

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
166.95 ms | 406 KiB | 5 Q