更新日: 2026-07-13
AIによって、エンジニアが扱える範囲は広がった。
従来は実装経験を中心に説明すればよかったが、現在は次の工程まで一人で扱える。
| <?php | |
| $input = [ | |
| 'email' => 'taro@example.com', // valid | |
| 'age' => '17', // invalid: less than 18 | |
| 'title' => 'Hello', // sanitized | |
| 'message' => '', // invalid: empty string | |
| ]; | |
| $app_spec = [ |
| <?php | |
| declare(strict_types=1); | |
| require __DIR__ . '/filter_helpers.php'; | |
| $age = filter_validate_var('20', 'int', [ | |
| 'options' => [ | |
| 'min_range' => 18, | |
| 'max_range' => 120, |
| <?php | |
| $input = [ | |
| 'email' => 'taro@example.com', | |
| 'age' => '17', | |
| 'title' => '<b>Hello</b>', | |
| 'message' => '', | |
| ]; | |
| $app_spec = [ |
| <?php | |
| $input = [ | |
| 'email' => 'taro@example.com', | |
| 'age' => '17', | |
| 'message' => '', | |
| ]; | |
| $descriptors = array_replace( | |
| filter_validation_descriptors([ |
| <?php | |
| declare(strict_types=1); | |
| $input = [ | |
| 'email' => 'taro@example.com', | |
| 'age' => '17', | |
| 'message' => '', | |
| ]; |