3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '1<script>2</script>3<script>4</script>5'; $txt = preg_replace("/<script>.*?<\/script>/s", '', $html); var_dump($txt); //135 ←と表示したい。 //例2 $html = 'a<script>s</script>b<script>-</script>c'; $txt = preg_replace("/<script>.*?<\/script>/s", '', $html); var_dump($txt); //abc ←と表示したい。 $html = '1<script>2</script>3<script>4</script>5'; $txt = preg_replace("/<script>.*<\/script>/s", '', $html); var_dump($txt); //135 ←と表示したい。 //例2 $html = 'a<script>s</script>b<script>-</script>c'; $txt = preg_replace("/<script>.*<\/script>/s", '', $html); var_dump($txt); //abc ←と表示したい。
Output for git.master, git.master_jit, rfc.property-hooks
string(3) "135" string(3) "abc" string(2) "15" string(2) "ac"

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:
28.23 ms | 401 KiB | 8 Q