php: Pass $userData parameter to callback

Also check if $callback is callable on registration
php: Use common pattern for example directory names
php: Update changelog
csharp: Reduce visibility of internal functions and classes