Is it illegal to assign some object to static property?
I am getting HTTP 500 error in below code.
require_once('class.linkedlist.php');
class SinglyLinkedlistTester {
public static $ll = new Linklist();
}
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfil the request.
Note: No issue with non object like string,int assignment to static variable. As an example,
public static $ll = 5; //no issue
Also there is no code issue in class.linkedlist.php.