<?php
abstract class A
{
/**
* @return A $this
*/
public function fa()
{
echo 'AAAAA'.PHP_EOL;
return $this;
}
}
class B extends A {
/**
* @return B $this
*/
public function fb()
{
echo 'BBBB'.PHP_EOL;
return $this;
}
}
$obj = new B();
$obj->fa()
->fb();
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/sHdiT on line 10
AAAAAPHP_EOL
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/sHdiT on line 21
BBBBPHP_EOL
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_CLASS in /in/sHdiT on line 3
Process exited with code 255.