<?php

$specimem='string:{$vector|escape:"javascript"}';

$reference="\\`Hello, \\\$\\{name}!\\`";

set_include_path('/usr/share/php/smarty3/');

require('Smarty.class.php');

$tpl = new Smarty();
$test = $tpl->createTemplate($specimem);

$tpl->assign('vector', "`Hello, \${name}!`");

$output =$tpl->fetch($test);

print("EXPECTED: $reference\n");
print("ACTUALLY: $output\n");

if(0!=strcmp($output,$reference)) {
  print("NOT EQUAL\n");
  exit(1);
}

