When using PHP, you might want to work with $gimme values inside PHP, as well as pass on PHP variables to the template. In order to do this, you need to assign the variables first, then you can access them inside PHP. Important: use backticks ` in the assign function. Here's a little example:
Assigning a variable in the template to use with PHP
In order to pass a variable, you must use $var = $template->getTemplateVars('var'); instead of $var= $template->get_template_vars('var') inside {{ php }}{{ /php }}