Thanks for the reply rakuci.
I saw the page u specified but there also oldpassword is used to bind, not with the ldap_mod_replace.
My requirement is like ldap_mod_replace($userdn,$oldpwd,$newpwd).
In C# we can change the password by delete&add method and DirectoryServices library gives a function to specify the old and new pwd.
I thought I wil get the same in PHP.
Now I changed my directory structure so that I can change the pwd without old pwd.
Thanks again🙂