Homec4science

Add functions for grabbing the first and last keys from an array.

Authored by Koolvin <korvin@concrete5.org> on Apr 9 2012, 01:46.

Description

Add functions for grabbing the first and last keys from an array.

Summary:
head_key($array);
and
last_key($array);

Test Plan:

<?php
$arr = array('Herp'=>1,'Derp',2);
echo head_key($arr);
echo last_key($arr);

Reviewers: epriestley

CC: aran

Differential Revision: https://secure.phabricator.com/D2161

Details

Committed
Koolvin <korvin@concrete5.org>Apr 9 2012, 05:45
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU6776d421a00a: Add PhutilAggregateException
Branches
Unknown
Tags
Unknown

Event Timeline

Koolvin <korvin@concrete5.org> committed rPHU649effde2891: Add functions for grabbing the first and last keys from an array. (authored by Koolvin <korvin@concrete5.org>).Apr 9 2012, 05:45