<?php
error_reporting( E_ALL );

$bar="Hallo";
$i=3;
$tok=1;

$foo = $bar{1};
$foo = $bar{ 1 };
$foo = $bar{ 1+3 };

$foo = $bar{ $tok + 3 }; $foo = $bar{$i};

class mtest {
        var $t='hallo';
        
        function __construct($value) {
                $this->t = $value;
        }
        
        function get() {
                return $this->t;
        }
        
}

$t=new mtest('Hallo Welt');
echo $t->{'t'};
