I've not used PEAR before, and so I'm probably doing something dumb. I've installed the Math_Matrix library, but when I include it I just get an error. My entire code is this:
<?php
$path = '/home/PEAR/Math_Matrix-0.8.0';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
include_once 'Matrix.php';
?>
The error I get is this:
Parse error: syntax error, unexpected T_CLONE, expecting T_STRING in /home/PEAR/Math_Matrix-0.8.0/Matrix.php on line 272
I'm not really sure what to make of that. I guess the explanations I can think of are:
To install it, I did the following:
pear install --alldeps channel://pear.phpunit.de/PHPUnit
pear install --alldeps channel://pear.php.net/Math_Vector-0.6.2
pear install Math_Matrix
From the [Math_Matrix](http://pear.php.net/package/Math_Matrix homepage) I can see that it was last updated in 2003. Since then, PHP has added the clone
keyword, which is conflicting with the clone()
function defined in Matrix.php.
You need to update Matrix.php - a search & replace on "clone" with "clone2" should do it.