This repository has been archived on 2020-06-07. You can view files and clone it, but cannot push or open issues or pull requests.
php-armadillo/tests/016-debug-info.phpt

31 lines
497 B
PHP

--TEST--
Test for methods `__toString()` and `__debugInfo()`.
--SKIPIF--
<?php
require_once 'includes/loaded.php';
is_php_arma_loaded();
?>
--FILE--
<?php
$cx = Arma\cx_double(1., 2.);
$mat = Arma\IMat::fromString('1 2; 3 4');
echo $cx, ' ', $mat, PHP_EOL;
var_dump(strval($cx));
var_dump(strval($mat));
var_dump($mat);
?>
--EXPECT--
(1,2) 1 2;3 4
string(5) "(1,2)"
string(7) "1 2;3 4"
object(Arma\IMat)#2 (3) {
["nRows"]=>
int(2)
["nCols"]=>
int(2)
["data"]=>
string(7) "1 2;3 4"
}