3v4l.org

run code in 300+ PHP versions simultaneously
<?php const REGEX = '/class=("gx-block"|"gx-block .*"|".* gx-block")/i'; const HTML1 = '<div class="gx-block">abc</div>'; const HTML2 = '<div class="xyz">abc (gx-block) def</div>'; const HTML3 = '<div class="gx-blockhhh">abc</div>'; echo preg_match(REGEX, HTML1) ? 'true' : 'false'; echo PHP_EOL; echo preg_match(REGEX, HTML2) ? 'true' : 'false'; echo PHP_EOL; echo preg_match(REGEX, HTML3) ? 'true' : 'false'; echo PHP_EOL;
Output for git.master, git.master_jit, rfc.property-hooks
true false false

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