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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -