3v4l.org

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

preferences:
39.64 ms | 402 KiB | 5 Q