Medium
What is the result of the following example?
<?php
class BookRepository
{
public function findBy(array $criteria = [], array $orderBy = []): array
{
return [];
}
}
$bookRepository = new BookRepository();
$bookList = $bookRepository->findBy(orderBy: ['title' => 'ASC'], ['category' => 1]);
echo count($bookList) === 0 ? "Nothing" : "Some books";
Author: W3D TeamStatus: PublishedQuestion passed 956 times
Edit
4
Community Evaluations