Use basename
basename('Home/new_folder/test');
// output: test
As a side note to those who answered explode:
To get the trailing name component of a path you should use basename!
In case your path is something like $str = "this/is/something/"
the end(explode($str));
combo will fail.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…