3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ "This is a text with John Doe", "This is a text with Max Müstermann ", "This is a text withJohn-Frank' Doe.", "This is a text with John/Doejlkjkjlk", ]; $pattern = "/^(?=.{25,999})(?=.*[a-z]{2})[a-zA-Z0-9äöü,.' -]+$/"; foreach ($strings as $string) { if (preg_match($pattern, $string)) { echo "Ok ==> $string" . PHP_EOL; } else { echo "error" . PHP_EOL; } }
Output for git.master, git.master_jit, rfc.property-hooks
Ok ==> This is a text with John Doe Ok ==> This is a text with Max Müstermann Ok ==> This is a text withJohn-Frank' Doe. error

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:
186.58 ms | 405 KiB | 5 Q