Deprecated: Return type of TableArray::count() should either be compatible with ArrayIterator::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web313/c0/70/5508370/htdocs/pju24/class/TableArray.php on line 1332 Deprecated: Return type of TableArray::rewind() should either be compatible with ArrayIterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web313/c0/70/5508370/htdocs/pju24/class/TableArray.php on line 1377 Deprecated: Return type of TableArray::current() should either be compatible with ArrayIterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web313/c0/70/5508370/htdocs/pju24/class/TableArray.php on line 1381 Deprecated: Return type of TableArray::key() should either be compatible with ArrayIterator::key(): string|int|null, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web313/c0/70/5508370/htdocs/pju24/class/TableArray.php on line 1386 Deprecated: Return type of TableArray::next() should either be compatible with ArrayIterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web313/c0/70/5508370/htdocs/pju24/class/TableArray.php on line 1393 Deprecated: Return type of TableArray::valid() should either be compatible with ArrayIterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web313/c0/70/5508370/htdocs/pju24/class/TableArray.php on line 1397 Deprecated: Return type of TableArray::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web313/c0/70/5508370/htdocs/pju24/class/TableArray.php on line 1323 Test phpcheck.class.tablearray.php phpcheck.class.tablearray.php Total: 175 Tests, 4 Errors ->first, ↻all
PHPCheck V1.66, OS: Linux, Machine: el8_9.x86_64, PHP-Version: 8.2.18 (64 Bit), Time: 104.723 ms (AVG: 0.598 ms), Memory: 14.0M (512M)
CommentLineCodeResultTest
select SQLite Table 2475 $sql "SELECT * from tab WHERE no IN(6,7,356,956)";
$stmt $db->query($sql);
$result $stmt->fetchAll(PDO::FETCH_ASSOC);
$expected=[
  [
'id' => '346''no' => '356'],
  [
'id' => '946''no' => '956'],
];
$t->checkEqual($result$expected); 
[0.222 ms]
array ( 0 => array ( 'id' => 346, 'no' => 356, ), 1 => array ( 'id' => 946, 'no' ..
Error
select SQLite Table and FETCH_KEY_PAIR 2485 $sql "SELECT * from tab WHERE no IN(6,7,356,956)";
$stmt $db->query($sql);
$result $stmt->fetchAll(PDO::FETCH_KEY_PAIR);
$expected=[ 346 => '356'946 => '956'];
$t->checkEqual($result$expected); 
[0.197 ms]
array ( 346 => 356, 946 => 956, )
Error
Create from PDO Statement 2492 $sql "SELECT * from tab WHERE no IN(6,7,356,956)";
$stmt $db->query($sql);
$tabArr TableArray::create($stmt);
$result $tabArr->fetchAll();
$expected=[
  [
'id' => '346''no' => '356'],
  [
'id' => '946''no' => '956'],
];
$t->checkEqual($result$expected); 
[0.223 ms]
array ( 0 => array ( 'id' => 346, 'no' => 356, ), 1 => array ( 'id' => 946, 'no' ..
Error
Multiple fetch 2503 $result $tabArr->fetchKeyValue('id','no');
$expected=[ 346 => '356'946 => '956'];
$t->checkEqual($result$expected); 
[0.005 ms]
array ( 346 => 356, 946 => 956, )
Error