Answers for "phpdoc array of strings"

PHP
0

phpdoc array of strings

/** @var string[] $strs Array of strings */
$strs = array();
Posted by: Guest on March-02-2022
0

phpdoc array type

/** @var int[] $nums This is an array of counters */
$nums = array(0, 0, 0);

foreach($nums as $num)
{
  // i.e. here $num will be typed "int" automatically
}
Posted by: Guest on March-02-2022

Browse Popular Code Answers by Language