phpdoc array type

34

/** @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
}

Comments

Submit
0 Comments