Copied Python test cases to PHP