The array_fill() function in PHP allows an array to be populated (i.e. filled) with a particular value.
$a = array_fill(3, 5, 'php'); print_r($a); /* Array (  => php  => php  => php  => php  => php ) */
In Ruby this is not really possible because Ruby arrays must have their keys filled in the correct order, i.e. you cant skip assigning values to keys in a Ruby array. As such, the next best thing is to fill those values with nil, or use a hash instead.
a = [nil] * 3 + ['php'] * 5; puts a; # => [nil, nil, nil, 'php', 'php', 'php', 'php', 'php']