3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $file = "/var/www/infolegale/delivery/toto.txt"; $path = explode('.', $file); $path[count($path) - 1] = "csv"; $finalPath = implode($path, '.'); echo $finalPath;
based on ZLC8h
Output for 4.3.0 - 7.2.0
/var/www/infolegale/delivery/toto.csv