fork download
  1. <?php
  2.  
  3. class Foo
  4. {
  5. private $content = '{% include file="anotherTemplate.tpl" %}';
  6. private $funcSeparatorL = '{%';
  7. private $funcSeparatorR = '%}';
  8.  
  9. public function replace()
  10. {
  11. . $this -> funcSeparatorL
  12. . '\s*include file="(.*)\.(.*)".*'
  13. . $this->funcSeparatorR
  14. . '/', $this -> content) );
  15. }
  16.  
  17. }
  18.  
  19. $foo = new Foo();
  20. $foo->replace();
Success #stdin #stdout 0.01s 24144KB
stdin
Standard input is empty
stdout
int(1)