3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = ['This is. a.. test...', 'This is a........... test.', '...This is. a.. ..test', 'This is a test', 'This. is... a. test.' ]; foreach ($strings as $string) { if (preg_match('~(?<!\.)\.{3}(?!\.)~', $string)) { echo "Yes, found an occurrence of not more than 3 dots in a row ($string)"; } else { echo "Nope, no occurrence of exactly 3 dots in a row ($string)"; } echo "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
Yes, found an occurrence of not more than 3 dots in a row (This is. a.. test...) Nope, no occurrence of exactly 3 dots in a row (This is a........... test.) Yes, found an occurrence of not more than 3 dots in a row (...This is. a.. ..test) Nope, no occurrence of exactly 3 dots in a row (This is a test) Yes, found an occurrence of not more than 3 dots in a row (This. is... a. test.)

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:
29.73 ms | 406 KiB | 5 Q