in php.net the following is written: Classes should be defined before instantiation (and in some cases this is a requirement). can anyone give an example when it is required? because a typical use of it doesn't require, like in this example that works ok:
<?php
$class = "a" ;
$ob = new $class() ;
class a
{
var $city = "new york" ;
}
echo $ob->city ;
?>