ab initio molecular dynamics simulations were performed to systematically investigate the short-to-medium-range structural characteristics of P atoms in Pd43Ni43P14 and Pd40Ni40P20 glass-forming liquids for understanding the correlation between structure and the composition-dependent properties. It is found that P atoms in Pd43Ni43P14 liquid prefer the local configurations with larger coordination number (CN), such as <0,2,8,0>. However, P atoms in Pd40Ni40P20 liquid tend to form clusters with smaller CN, such as <0,3,6,0>. More importantly, the major P-centered clusters in two liquids are found to resemble those in different crystal phases, which is key to understanding the physical origin of glass forming ability in these glass-forming alloys. Surprisingly, P atoms in Pd43Ni43P14 liquid show more significant medium-range structural ordering than those in Pd40Ni40P20 liquid. To understand the effect of P content on the short-to-medium-range structural characteristics in the glass-forming liquids, a saturation degree model was proposed for the maximum fraction of P atoms without direct P-P bonds populated. This finding provides new insights into the composition-sensitive properties in (Pd0.5Ni0.5)(100-x)P-x glass-forming alloys. (C) 2020 Elsevier B.V. All rights reserved.