oo.bar=1}  {* another comment *}
{$foo = myfunct(($x+$y)*3)}
{$foo = strlen($bar)}
{$foo.bar.baz=1}, {$foo[]=1}

Smarty "dot" syntax (note: embedded {} are used to address ambiguities):

{$foo.a.b.c}      => $foo['a']['b']['c']
{$foo.a.$b.c}     => $foo['a'][$b]['c']
{$foo.a.{$b+4}.c} => $foo['a'][$b+4]['c']
{$foo.a.{$b.c}}   => $foo['a'][$b['c']]

{$object->method1($x)->method2($y)}</textarea>

<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  lineNumbers: true,
  mode: "sm