added PHP function