Is it possible to assign some object to a static property?
I get an HTTP 500 error below code.
require_once('class.linkedlist.php'); class SinglyLinkedlistTester { public static $ll = new Linklist(); }
HTTP Error 500 (Internal Server Error): An unexpected condition occurred when the server tried to execute the request.
Note. There is no problem with a non-object like a string, assigning an int to a static variable. As an example,
public static $ll = 5;
There is also no problem with the code in the .linkedlist.php class.
PK
source share