<?php
$a = new Local();
$a->action();
class Base
{
public function action($return = false)
{
$result = 'farok';
if ($return) {
return $result;
}
echo $result;
}
}
class Vendor extends Base
{
public function action($return = false)
{
// fetch contents without rendering
$result = parent::action(true);
// this would be new:
if ($return) {
return $result;
}
echo $result;
}
}
class Local extends Vendor
{
public function action($return = false)
{
// do some venture specific stuff
// call parent
$result = parent::action(true);
return $result;
}
}
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/cNSGQ on line 8
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/cNSGQ on line 8
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/cNSGQ on line 8
Process exited with code 255.