can i use a variable variable such as $$var in PHP?
<p>now i have codes just like follows:</p>

<pre><code>class test:
    def do_something():
        pass

test1 = test()
test2 = test()
test3 = test()
test4 = test()
test5 = test()
test6 = test()
test7 = test()
test8 = test()
test9 = test()
...
</code></pre>

<p>now i need invoke each instance's function, just like that:</p>

<pre><code>test1.do_something()
test2.do_something()
test3.do_something()
test4.do_something()
test5.do_something()
test6.do_something()
test7.do_something()
test8.do_something()
test9.do_something()
...
</code></pre>

<p>too many classes, so i thought may be a for loop can complete the work:</p>

<pre><code>for i in range(1, 30):
    ("test" + str(i)).do_something()
</code></pre>

<p>of course it doesnt work, for string doesnt have do_something() fucntion, can anyone have any idea to realize the function? any help appreciated! </p>
