fork(2) download
  1. <?php
  2.  
  3. $name = "$ blah";
  4. $regex = '/^(\$|\(.+\))( ?)/';
  5. $matchedName = preg_replace($regex, "", $name);
  6.  
  7. var_dump($regex);
  8. var_dump($matchedName);
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
string(18) "/^(\$|\(.+\))( ?)/"
string(4) "blah"