3v4l.org

run code in 300+ PHP versions simultaneously
<?php $parts = ['hello', 'hi', 'how r u', 'how are you', 'how r you', 'how are u']; $strings = ['Hello', 'Helloooo', 'How r youuuu', 'hell', 'w are y', 'heey hello', 'heeeey hello bro']; $regexp = implode('|', $parts); foreach ($strings as $string) { echo "$string: " . (preg_match("/($regexp)/i", $string) ? "true\n" : "false\n"); }
Output for git.master, git.master_jit, rfc.property-hooks
Hello: true Helloooo: true How r youuuu: true hell: false w are y: false heey hello: true heeeey hello bro: true

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