I got this error
PHP Fatal error: Call-time pass-by-reference has been removed on line 14
<?php
class MyClass
{
public function Sum($a, $b)
{
$sum = $a+$b;
echo "Sum($a, $b) = $sum";
}
}
// position [0] is the script's file name
array_shift(&$argv);
$className = array_shift(&$argv);
$funcName = array_shift(&$argv);
echo "Calling '$className::$funcName'...\n";
call_user_func_array(array($className, $funcName), $argv);
?>
and here is what I use in my command line
E:\>php testClass.php MyClass Sum 2 3
as I following this link
What have I done wrong here ? I am new to PHP but trying to slowly learn. Please suggest. Thanks,