<?php
class ParentClass
{
private static $_OBJECTS;
public static function Get()
{
self::$_OBJECTS[1] = new ChildClass();
return self::$_OBJECTS[1];
}
}
class ChildClass extends ParentClass
{
public $Manager;
function __construct()
{
$this->Manager = $this;
}
public static function &GetCurrent()
{
return ChildClass::Get();
}
public static function &Get()
{
return parent::Get();
}
}
$staff = ChildClass::GetCurrent();
Strict Standards: Declaration of ChildClass::Get() should be compatible with that of ParentClass::Get() in /in/lhUY0 on line 32
Notice: Only variable references should be returned by reference in /in/lhUY0 on line 30
Output for 5.0.5
Strict Standards: Declaration of ChildClass::Get() should be compatible with that of ParentClass::Get() in /in/lhUY0 on line 32
Strict Standards: Only variable references should be returned by reference in /in/lhUY0 on line 30
Output for 5.0.0 - 5.0.4
Strict Standards: Declaration of ChildClass::Get() should be compatible with that of ParentClass::Get() in /in/lhUY0 on line 32
Strict Standards: Only variable references should be returned by reference in /in/lhUY0 on line 30
Strict Standards: Only variable references should be returned by reference in /in/lhUY0 on line 25
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/lhUY0 on line 5
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/lhUY0 on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/lhUY0 on line 5
Process exited with code 255.