3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $testArray; for ($i = 0; $i <= 100; $i++) { $testArray[] = "This is: ". $i; } foreach ($testArray as $number) { echo $number; echo $testArray[100]; }
Output for 5.6.0 - 7.3.0alpha1
This is: 0This is: 100This is: 1This is: 100This is: 2This is: 100This is: 3This is: 100This is: 4This is: 100This is: 5This is: 100This is: 6This is: 100This is: 7This is: 100This is: 8This is: 100This is: 9This is: 100This is: 10This is: 100This is: 11This is: 100This is: 12This is: 100This is: 13This is: 100This is: 14This is: 100This is: 15This is: 100This is: 16This is: 100This is: 17This is: 100This is: 18This is: 100This is: 19This is: 100This is: 20This is: 100This is: 21This is: 100This is: 22This is: 100This is: 23This is: 100This is: 24This is: 100This is: 25This is: 100This is: 26This is: 100This is: 27This is: 100This is: 28This is: 100This is: 29This is: 100This is: 30This is: 100This is: 31This is: 100This is: 32This is: 100This is: 33This is: 100This is: 34This is: 100This is: 35This is: 100This is: 36This is: 100This is: 37This is: 100This is: 38This is: 100This is: 39This is: 100This is: 40This is: 100This is: 41This is: 100This is: 42This is: 100This is: 43This is: 100This is: 44This is: 100This is: 45This is: 100This is: 46This is: 100This is: 47This is: 100This is: 48This is: 100This is: 49This is: 100This is: 50This is: 100This is: 51This is: 100This is: 52This is: 100This is: 53This is: 100This is: 54This is: 100This is: 55This is: 100This is: 56This is: 100This is: 57This is: 100This is: 58This is: 100This is: 59This is: 100This is: 60This is: 100This is: 61This is: 100This is: 62This is: 100This is: 63This is: 100This is: 64This is: 100This is: 65This is: 100This is: 66This is: 100This is: 67This is: 100This is: 68This is: 100This is: 69This is: 100This is: 70This is: 100This is: 71This is: 100This is: 72This is: 100This is: 73This is: 100This is: 74This is: 100This is: 75This is: 100This is: 76This is: 100This is: 77This is: 100This is: 78This is: 100This is: 79This is: 100This is: 80This is: 100This is: 81This is: 100This is: 82This is: 100This is: 83This is: 100This is: 84This is: 100This is: 85This is: 100This is: 86This is: 100This is: 87This is: 100This is: 88This is: 100This is: 89This is: 100This is: 90This is: 100This is: 91This is: 100This is: 92This is: 100This is: 93This is: 100This is: 94This is: 100This is: 95This is: 100This is: 96This is: 100This is: 97This is: 100This is: 98This is: 100This is: 99This is: 100This is: 100This is: 100