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 938 times
Edit
3
Community Evaluations