php - Weird l/r/trim() behaviour -


i'm experiencing issue trim('/','/musla-ktora-lieci/'); returns empty string. works in same way trim functions - trim(), ltrim() , rtrim().

php:

php 5.5.20 (cli) (built: feb 25 2015 23:30:53)  copyright (c) 1997-2014 php group zend engine v2.5.0, copyright (c) 1998-2014 zend technologies 

what doing wrong?

trim('/','/musla-ktora-lieci/'); 

for heaven's sake parameters in wrong order

string trim ( string $str [, string $character_mask = " \t\n\r\0\x0b" ] )

and

what doing wrong?

not reading manual in case of unexpected behavior.

echo trim('/musla-ktora-lieci/','/');   // musla-ktora-lieci 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -