first commit

This commit is contained in:
Ariyutta
2026-08-07 10:47:09 +07:00
commit 1c094fbe7f
11630 changed files with 1580900 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
## PHP 8.4
- PHP 8.4 has new array functions that will make code simpler whenever we don't use Laravel's collections:
- `array_find(array $array, callable $callback): mixed` - Find first matching element.
- `array_find_key(array $array, callable $callback): int|string|null` - Find first matching key.
- `array_any(array $array, callable $callback): bool` - Check if any element satisfies a callback function.
- `array_all(array $array, callable $callback): bool` - Check if all elements satisfy a callback function.
### Cleaner Chaining on New Instances
- No extra parentheses are needed when chaining on new object instances:
<code-snippet name="New Object Chaining Example" lang="php">
// Before PHP 8.4
$response = (new JsonResponse(['data' => $data]))->setStatusCode(201);
// After PHP 8.4
$response = new JsonResponse(['data' => $data])->setStatusCode(201);
</code-snippet>