I am trying to execute the code in the below, but it returns nothing after second refresh of page. WHY?
- Code: Select all
session_start();
if(1==1){
class A{
public function getT(){
return "ttext ttext ttext";
}
}
if(isset($_SESSION['classA']))
echo $_SESSION['classA']->getT();
$_SESSION['classA'] = new A();
echo $_SESSION['classA']->getT();
}
Thanks.


