The router is probably set up to provide the iPad with a static IP, so it works. If you have not assigned a network static IP for the iPhone in the router settings then you need to do that first. You have to reserve and assign each specific IP and device you wish to be static in the network before you can assign that IP on the device.
It has nothing to do with iOS versions or device. You have to setup the network first, then give the reserved static IP to the device. Otherwise, the network simply does not recognize that IP as reserved for a static IP, and the DHCP server overrides the setting on the device.
Check your wifi router's settings and make sure the IP you are trying to use is set aside as a static IP in the router's table. Otherwise, it's never going to work. A device cannot arbitrarily assign itself a static IP on a network. It can only use a static IP if that specific IP has been set aside and reserved for it in the router's settings.