Completed p2 in PHP