3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php foreach (array('Kisi', 0, 1) as $key) { echo "KEY: ".$key.PHP_EOL; $tag = is_numeric($key) ? 'Kisi' : $key; echo "TAG: ".$tag.PHP_EOL; }
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.1.0
KEY: Kisi TAG: Kisi KEY: 0 TAG: Kisi KEY: 1 TAG: Kisi
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/GXgSZ on line 4 KEY: KisiPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/GXgSZ on line 8 TAG: KisiPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/GXgSZ on line 4 KEY: 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/GXgSZ on line 8 TAG: KisiPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/GXgSZ on line 4 KEY: 1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/GXgSZ on line 8 TAG: KisiPHP_EOL