3v4l.org

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

preferences:
45.71 ms | 402 KiB | 5 Q