Câu hỏi
Giải thích một closure trong PHP là gì và tại sao nó sử dụng mã định danh “use”?
Hãy xem xét đoạn mã dưới đây:
```php public function getTotal($tax) { $total = 0.00;
$callback = function ($quantity, $product) use ($tax, &$total) { $pricePerItem = constant(CLASS . "::PRICE_" . strtoupper($product)); $total += (...