3v4l.org

run code in 300+ PHP versions simultaneously
<?php function fox( $a) { return $a . 'fox!'; } function dog( $b) { return $b . 'dog!'; } $a = 'A'; $b = 'B'; $string = 'The quick brown {{fox($a);}} jumped over the lazy {{dog($b);}}.'; $regex = '/{{([^}]+)+}}/e'; $result = preg_replace( $regex, '$1', $string); var_dump( $matches);

preferences:
40.56 ms | 402 KiB | 5 Q