3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tab_pieces['piece']['dossier'][0] = 'NAUJXR/201408010652/'; $tab_pieces['piece']['dossier'][1] = 'NAUJXR/201408010652/'; $tab_pieces['piece']['dossier'][2] = 'NAUJXR/201408010652/'; $tab_pieces['piece']['document'][0] = '005.jpg'; $tab_pieces['piece']['document'][1] = '004.jpg'; $tab_pieces['piece']['document'][2] = '007.jpg'; $tab_pieces['piece']['name'][0] = 'onde.jpg'; $tab_pieces['piece']['name'][1] = 'vague.jpg'; $tab_pieces['piece']['name'][2] = 'youpi.jpg'; //echo count( $tab_pieces['piece']['dossier'] ); for ($i=0; $i < count($tab_pieces['piece']['document']); $i++) { if ( in_array( '', $tab_pieces["piece"]["document"] ) ) { echo 'wdfds'; } else { echo 'bah non'; } } ?>
based on 02g51
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
bah nonbah nonbah non