Palo Alto Networks Inc. swung to a fiscal second-quarter loss as higher expenses, particularly in sales and marketing, offset stronger revenue at the Internet security company.

However, adjusted per-share earnings and revenue topped analysts' estimates.

Palo Alto Networks, which went public in July, makes hardware and software for computer-network security. Its products

...<continues, see below>