<?php
class Tester {
public function calculate($var_1,$var_2,$var_3) {
$product = var_3($var_1,$var_2);
echo $product;
}
public function returnProduct($var_1,$var_2) {
return $var_1*$var_2;
}
}
$obj = new Tester();
$obj->calculate(100,2,$obj->returnProduct);
Warning: Undefined property: Tester::$returnProduct in /in/PYpor on line 14
Fatal error: Uncaught Error: Call to undefined function var_3() in /in/PYpor:4
Stack trace:
#0 /in/PYpor(14): Tester->calculate(100, 2, NULL)
#1 {main}
thrown in /in/PYpor on line 4
Process exited with code 255.
Notice: Undefined property: Tester::$returnProduct in /in/PYpor on line 14
Fatal error: Uncaught Error: Call to undefined function var_3() in /in/PYpor:4
Stack trace:
#0 /in/PYpor(14): Tester->calculate(100, 2, NULL)
#1 {main}
thrown in /in/PYpor on line 4
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 7.4.26
Fatal error: Uncaught Error: Call to undefined function var_3() in /in/PYpor:4
Stack trace:
#0 /in/PYpor(14): Tester->calculate(100, 2, NULL)
#1 {main}
thrown in /in/PYpor on line 4
Process exited with code 255.
Notice: Undefined property: Tester::$returnProduct in /in/PYpor on line 14
Fatal error: Call to undefined function var_3() in /in/PYpor on line 4
Process exited with code 255.
Notice: Undefined property: Tester::$returnProduct in /in/PYpor on line 14
Fatal error: Call to undefined function var_3() in /in/PYpor on line 4
Process exited with code 255.
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/PYpor on line 3
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/PYpor on line 3
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/PYpor on line 3
Process exited with code 255.