3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(1,2); $query = 'found {{$_the[\'test\']}}'; $_the['test'] = 'var'; preg_match('/({{\$(.*)}})/',$query,$matches); var_dump($matches[2]); var_dump(${$matches[2]}); $new = preg_replace('/({{\$(.*)}})/',${$matches[2]},$query); echo $new;

preferences:
29.52 ms | 402 KiB | 5 Q