Fix php cli (-S option) inconsistent port parsing

Add port range verification of listening port with -S option for the php cli.
This fixes inconsistent listening port due to unverified cast from long to short
with htons(3).
Fix #53092 - dns_get_record does not return false on dns server failure
Changed based on comments and make its behaviour equal to the Windows version
Added more useful warning messages
Fix php cli (-S option) inconsistent port parsing

Add port range verification of listening port with -S option for the php cli.
This fixes inconsistent listening port due to unverified cast from long to short
with htons(3).
Fix #53092 - dns_get_record does not return false on dns server failure
Changed based on comments and make its behaviour equal to the Windows version
Added more useful warning messages
Merge branch 'PHP-5.6'

* PHP-5.6:
  Added more useful warning messages
  Changed based on comments and make its behaviour equal to the Windows version
  Fix #53092 - dns_get_record does not return false on dns server failure
  Fix php cli (-S option) inconsistent port parsing