Is this a php variable variable bug? -


is there logical explanation this?

<?php   $$a = 'hello world';   echo $$a; //displays hello world   echo $$aa; //displays hello world   echo $$aaa; //displays hello world   ?> 

if try

$$a = 'hello world'; echo $$a; //displays hello world echo $$aa; //displays hello world echo $$aaa; //displays hello world   die( "<pre>" . print_r( get_defined_vars(), true ) . "</pre>" ); 

you can see has registed variable no name yes, according php's naming conventions, bug


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -