# PHP Arrays =?= Linked Lists?

**URL:** <https://forum.kirupa.com/t/php-arrays-linked-lists/244544>\
**Category:** programming\
**Created:** [November 19, 2007, 5:24pm UTC](https://forum.kirupa.com/t/php-arrays-linked-lists/244544 "2007-11-19T17:24:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yeldarb](https://avatars.discourse-cdn.com/v4/letter/y/51bf81/32.png) [@Yeldarb](https://forum.kirupa.com/u/Yeldarb)\
**Post date:** [November 19, 2007, 5:24pm UTC](https://forum.kirupa.com/t/php-arrays-linked-lists/244544/1 "2007-11-19T17:24:48Z")

</div>

Ar arrays in PHP actually Linked Lists?

What I’m really asking is whether or not it’s a constant time operation to resize an array or is it constant time to do an array lookup.

```auto

$myArray = array();
$myArray[] = "first";
$myArray[] = "second";
$myArray[] = "third";

```

Does it have to reallocate and copy the stuff over each time to store it in the array?  
And does $myArray[2] have to traverse the array to find the value or is it constant time?
