3v4l.org

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