3v4l.org

run code in 500+ PHP versions simultaneously
<?php $re = '`substr\([^()]*\)\h*(?:=\h*\'[^\']*\'|IN\h*\([^()]*\))`mi'; $str = <<<STR SELECT * FROM tbl WHERE col_a = 'abc' AND SUBSTR(col_b, 7, 2) = 'cd' AND col_c LIKE 'ACD0%' AND SUBSTR(col_d, 10, 1) IN ('A','B','C') AND SUBSTR(col_e, 5, 3) = 'cde' AND SUBSTR(col_f, 2, 1) IN ('C','D','E') STR; preg_match_all($re, $str, $matches, 0); print_r($matches[0]);
Output for rfc.property-hooks, git.master, git.master_jit
Array ( [0] => SUBSTR(col_b, 7, 2) = 'cd' [1] => SUBSTR(col_d, 10, 1) IN ('A','B','C') [2] => SUBSTR(col_e, 5, 3) = 'cde' [3] => SUBSTR(col_f, 2, 1) IN ('C','D','E') )

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:
21.92 ms | 1295 KiB | 4 Q