fork(15) download
  1. <?php
  2.  
  3. preg_match_all('/fn_name\((["\'])(.*?)\1\)/', "fn_name('string');", $out);
  4. var_dump($out);
  5. preg_match_all('/fn_name\((["\'])(.*?)\1\)/', 'fn_name("string");', $out);
  6. var_dump($out);
  7.  
  8. ?>
  9.  
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
array(3) {
  [0]=>
  array(1) {
    [0]=>
    string(17) "fn_name('string')"
  }
  [1]=>
  array(1) {
    [0]=>
    string(1) "'"
  }
  [2]=>
  array(1) {
    [0]=>
    string(6) "string"
  }
}
array(3) {
  [0]=>
  array(1) {
    [0]=>
    string(17) "fn_name("string")"
  }
  [1]=>
  array(1) {
    [0]=>
    string(1) """
  }
  [2]=>
  array(1) {
    [0]=>
    string(6) "string"
  }
}