3v4l.org

run code in 300+ PHP versions simultaneously
<?php $where = array('bla = :bla'); $expression = null; foreach($where as $cond => $term) { if(preg_match('/(:[^\S]+)/', $cond, $matches)) { $expression = $cond; } } echo $expression;

preferences:
39.51 ms | 402 KiB | 5 Q