Structural stability and electronic properties of GaAs1-xPx (0.0 <= x <= 1.0) nanowires (NWs) in zinc-blende (ZB) (similar to 5 <= diameter <= similar to 21 angstrom) and wurtzite (WZ) (similar to 5 <= diameter <= similar to 29 angstrom) phases are investigated by first-principles calculations based on density functional theory (DFT). GaAs (x = 0.0) and GaP (x = 1.0) compound NWs inWZ phase are found energetically more stable than in ZB structural ones. In the case of GaAs1-xPx alloy NWs, the energetically favorable phase is found size and composition dependent. All the presented NWs have semiconductor characteristics. The quantum size effect is clearly demonstrated for all GaAs1-xPx (0.0 <= x <= 1.0) NWs. The band gaps of ZB and WZ structural GaAs compound NWs with similar to 10 <= diameter <= similar to 21 angstrom similar to 5 <= diameter <= similar to 29 angstrom, respectively are enlarged by the addition of concentrations of phosphorus for obtaining GaAs1-xPx NWs proportional to the x values around 0.25, 0.50 and 0.75.