PHP code example of digitalrevolution / utils

1. Go to this page and download the library: Download digitalrevolution/utils 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/ */

    

digitalrevolution / utils example snippets


$value = Assert::notNull($this->repository->find(123));

true > 'true'
false > 'false'
null > 'null'
123 > '123'
1.23 > '1.23'
'abc' > 'abc'
'' > 'empty-string',
[] > 'empty-array'
[1, 2, 3] > 'array-list(3)'
['foo' => 'bar'] => 'keyed-array(1)'
StringableObject => 'value (StringableObject)'
stdClass => 'stdClass'
resource => 'resource (stream)'