update demo in PHP5.2