For basic coding I will recommend you phone since all people can't afford a laptop or a PC because of its higher range.
But if it goes to big web project then laptop or PC must be your first priority since they can be a better time management making programs in phone is just a type of time wasting according to me as I suffer lot of problems when I try to code with my phone [small projects]
But some people can make big projects in mobile itself.
This thread might be useful if you want to you code with your phone
For simple code phone is better
But when you want to write code of a big Project you will use IDE(DEVOLOPMENT ENVOIRNOMENT)and you can not use
IDE in smart phone example of IDE is
Devc++ and code block