performance – Refactor code in PHP

I have this function and need to refactor it Please refactor the code below to make it more concise, efficient and readable with good logic flow function findFirstStringInBracket($str){ if(strlen($str) >…