3v4l.org

run code in 200+ 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 - 7.2.0
***************** p.id_projet