<?php
class Foo {
public function bar($baz) {
return strtoupper($baz);
}
public function test() {
return "abc{$this->bar(def)}hij";
}
}
$foo = new Foo();
echo $foo->test();
Fatal error: Uncaught Error: Undefined constant "def" in /in/M3SB9:8
Stack trace:
#0 /in/M3SB9(12): Foo->test()
#1 {main}
thrown in /in/M3SB9 on line 8
Process exited with code 255.
Notice: Use of undefined constant def - assumed 'def' in /in/M3SB9 on line 8
abcDEFhij
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/M3SB9 on line 4
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/M3SB9 on line 4
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/M3SB9 on line 4
Process exited with code 255.