3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $nomChamp = 'p.id_projet'; $positionPrefixe = strpos($nomChamp, '.'); if($positionPrefixe !== false) { $prefixe = substr($nomChamp, 0, $positionPrefixe - 1); $nomChamp = str_replace($prefixe, '', $nomChamp); } print_r($prefixe); echo "*****************\n"; print_r($nomChamp); ?>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
***************** p.id_projet