added php and js lib func