Universally IMEI can be checked by same code. Dial *#06# and any phone including iPhone will show you a 15 digit serial number called IMEI which is unique phone identification number. To check IMEI on iPhone there are 3 methods available.
Check iPhone IMEI by Dial
Open Phone menu on iPhone if you can access to menu or click on emergency call and dial *#06# and it will display IMEI
Check iPhone IMEI under menu
if you are able to access menu, this method is most used worldwide. Go to setting menu and select option General and click on About. You will notified here all information about your iPhone including iPhone Serial number and IMEI number.
Check iPhone on locked iPhone (On Activation screen)
Locked iPhones or activation screen does not allow user to dial any number as well it also does not allow to open any menu. To check IMEI on such case just lock iPhone using sleep button and again press sleep button. When you see slide to activate option, just tap on (i) button above Slide to Activation option.
You can also use your IMEI to detect iPhone Carrier or Operator information.