PHP code example of extalion / php-strict-array
1. Go to this page and download the library: Download extalion/php-strict-array library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
extalion / php-strict-array example snippets
function foo(array $users)
{
foreach ($users as $user) {
if (!$user instanceof User) {
thorw new \InvalidArgumentException();
}
}
...
}
function foo(array_User_ $users)
{
...
}
bash
composer