<?php class Test { public $val3 = "I'm val3";} $i = 3;$obj = new Test;echo $obj->{'val' . $i};
Standard input is empty
I'm val3
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!