Undocumented feature in trim()

There is a kind of an undocumented feature in PHPs trim function. One may set an argument to be trimmed by something:

<?php
$path = \”/this/goes/to/the/path/\”;
echo trim($path, \’/\’);
?>
this/goes/to/the/path

I found that in a script of Rasmus.

Leave a Reply