PHP code example of dunglas / phpdoc-to-typehint
1. Go to this page and download the library: Download dunglas/phpdoc-to-typehint 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/ */
dunglas / phpdoc-to-typehint example snippets
/**
* @param int|null $a
* @param string $b
*
* @return float
*/
function bar($a, $b, bool $c, callable $d = null)
{
return 0.0;
}
/**
* @param int|null $a
* @param string $b
*
* @return float
*/
function bar(int $a = null, string $b, bool $c, callable $d = null) : float
{
return 0.0;
}