3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test = array('foo', 'bar', 'all', 'your', 'base', 'are', 'belong', 'to', 'us'); foreach ($test as $val) { if (strpos($val, 'a') !== false) { print($val . PHP_EOL); } }
based on hNfJc
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.2.0
bar all base are
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/cAJGF on line 5 barPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/cAJGF on line 5 allPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/cAJGF on line 5 basePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/cAJGF on line 5 arePHP_EOL