title: how to get root directory folder name in php instead of path
body: <p>I want to get the root directory folder name in php. I know its possible to get the root directory path using <code>_DIR_</code> but i need the folder name. Do we have a php function that can do this? In case the solution is using regular expressions on directory path, is it compatible in all system environments? eg windows, mac, etc.. Basically i dont  want to get  <code>C:\xampp\htdocs\myProject</code>\ i want <code>myProject</code>.
  Here is what i have tried <code> $rootDirectoryPath= _DIR_; $rootDirectoryFoldername='';</code></p>