Entity information:
INCOME TAXES
Income Taxes—Loss before provision for income taxes by fiscal year consisted of the following (in thousands):
 
Fiscal Year Ended July 31,
 
2015
 
2016
 
2017
Domestic
$
(84,327
)
 
$
(104,339
)
 
$
(350,759
)
Foreign
(40,256
)
 
(61,968
)
 
(102,569
)
Loss before provision for income taxes
$
(124,583
)
 
$
(166,307
)
 
$
(453,328
)

Provision for income taxes by fiscal year consisted of the following (in thousands):
 
Fiscal Year Ended July 31,
 
2015
 
2016
 
2017
Current:
 
 
 
 
 
State and local
$
56

 
$
140

 
$
193

Foreign
1,655

 
3,047

 
8,027

Total current taxes
1,711

 
3,187

 
8,220

Deferred:
 
 
 
 
 
U.S. federal

 

 
(1,342
)
State and local

 

 
13

Foreign
(167
)
 
(995
)
 
(2,208
)
Total deferred taxes
(167
)
 
(995
)
 
(3,537
)
Provision for income taxes
$
1,544

 
$
2,192

 
$
4,683


The income tax provision differs from the amount of income tax determined by applying the applicable U.S. federal statutory income tax rate of 34% to pretax loss. The reconciliation of the statutory federal income tax and the Company’s effective income tax is as follows (in thousands):
 
Fiscal Year Ended July 31,
 
2015
 
2016
 
2017
U.S. federal income tax at statutory rate
$
(42,351
)
 
$
(56,545
)
 
$
(153,965
)
Change in valuation allowance
24,030

 
31,700

 
102,549

Effect of foreign operations
15,168

 
23,121

 
27,652

Stock-based compensation
2,152

 
3,655

 
6,701

Warrant revaluation
2,100

 
(681
)
 
7,185

Non-deductible expenses
389

 
802

 
1,693

State income taxes
56

 
140

 
206

Transfer pricing adjustments

 

 
11,822

Other

 

 
840

Total
$
1,544

 
$
2,192

 
$
4,683


During the year ended July 31, 2017, the Company’s provision for income taxes was primarily attributable to foreign tax provision in certain foreign jurisdictions in which it conducts business.
During the year ended July 31, 2016, the Company early adopted ASU 2015-17 on a prospective basis. As a result of this adoption, the Company decreased $3.3 million of its non-current deferred tax assets, which are included within other assets—non-current, and $3.3 million of its current deferred tax liabilities, which are included within accrued expenses and other liabilities, on its consolidated balance sheet upon adoption. The Company did not retrospectively adjust prior periods.

The temporary differences that give rise to significant portions of deferred tax assets and liabilities are as follows (in thousands):
 
As of July 31,
 
2016
 
2017
Deferred tax assets:
 
 
 
Net operating loss carryforward
$
81,546

 
$
135,929

Deferred revenue
9,935

 
37,274

Tax credit carryforward
7,304

 
13,100

Property and equipment

 
1,118

Accruals and reserves
1,938

 
7,427

Stock compensation expense
5,780

 
27,512

Total deferred tax assets
106,503

 
222,360

Deferred tax liabilities:
 
 
 
Deferred commission expense
(13,483
)
 
(22,535
)
Other
(424
)
 
(558
)
Total deferred tax liabilities
(13,907
)
 
(23,093
)
Valuation allowance
(91,346
)
 
(196,091
)
Net deferred tax assets
$
1,250

 
$
3,176

Total net deferred tax assets and liabilities included in the Company’s consolidated balance sheets are as follows (in thousands): 
 
As of July 31,
 
2016
 
2017
Non-current deferred tax assets
$
1,250

 
$
3,176

Current deferred tax liabilities

 

Net deferred tax assets
$
1,250

 
$
3,176


Management believes that, based on available evidence, both positive and negative, it is more likely than not that the U.S. deferred tax assets will not be utilized, such that a full valuation allowance has been recorded.
The valuation allowance for deferred tax assets was $196.1 million as of July 31, 2017. The net change in the total valuation allowance for the years ended July 31, 2016 and 2017 was an increase of $36.7 million and $104.7 million, respectively.
As of July 31, 2017, the Company had approximately $453.5 million of federal net operating loss carryforwards and $282.4 million of state net operating loss carryforwards available to reduce future taxable income, which will begin to expire in 2030.
In addition, the Company had approximately $11.6 million of federal research credit carryforwards and $11.6 million of state research credit carryforwards. The federal credits will begin to expire in 2030 and the state credits can be carried forward indefinitely.
Utilization of the net operating loss and tax credits carryforwards may be subject to an annual limitation due to the ownership change limitations provided by the Internal Revenue Code of 1986, as amended, and similar state provisions. Any annual limitation may result in the expiration of net operating losses and credits before utilization. If an ownership change occurred, utilization of the net operating loss and tax credit carryforwards could be significantly reduced.

As of July 31, 2017, the Company held an aggregate of $58.9 million in cash and cash equivalents in the Company’s foreign subsidiaries, of which $49.5 million was denominated in U.S. dollars. None of the Company’s short-term investments was held in its foreign subsidiaries as of July 31, 2017. The Company attributes revenue, costs and expenses to domestic and foreign components based on the terms of its agreements with its subsidiaries. The Company does not provide for federal income taxes on the undistributed earnings of its foreign subsidiaries, as such earnings are to be reinvested offshore indefinitely. The income tax liability would be insignificant if these earnings were to be repatriated.
The Company recognizes uncertain tax positions in the financial statements if that position is more likely than not of being sustained on audit, based on the technical merits of the position. A reconciliation of the Company’s unrecognized tax benefits, excluding accrued interest and penalties, is as follows (in thousands):
 
Fiscal Year Ended July 31,
 
2016
 
2017
Balance at the beginning of the year
$
28,311

 
$
19,711

Increases related to current year tax positions
1,654

 
22,571

Increases related to prior year tax positions
972

 
373

Decreases related to prior year tax positions
(3,942
)
 

Settlements with tax authorities
(7,284
)
 

Balance at the end of the year
$
19,711

 
$
42,655


    
During the fiscal year ended July 31, 2017, the increase in unrecognized tax positions was primarily attributable to federal and state research and development credits, intercompany charges and business acquisitions in fiscal year 2017.
During the fiscal year ended July 31, 2016, the $3.9 million decrease in unrecognized tax benefits was due to the issuance of a California Supreme Court opinion on December 31, 2015 disallowing taxpayers to use the three-factor apportionment formula pursuant to the Multistate Tax Compact, which the Company previously elected. The California Supreme Court decision resulted in an adjustment to the Company’s deferred tax assets and a corresponding adjustment to the valuation allowance but did not impact provision for income taxes in the Company’s statement of operations. In addition, the $7.3 million decrease in unrecognized tax benefits during the year ended July 31, 2016 was due to the resolution of an uncertain tax position with a foreign tax authority, of which $0.4 million impacted the Company’s effective tax rate and the remaining amount resulted in an adjustment to the Company’s deferred tax assets and a corresponding adjustment to the valuation allowance.
As of July 31, 2017, if uncertain tax positions are fully recognized in the future, $1.6 million would impact the effective tax rate, and the remaining amount would result in adjustments to deferred tax assets and corresponding adjustments to the valuation allowance.
The Company recognizes interest and/or penalties related to income tax matters as a component of income tax expense. As of July 31, 2017, the Company had recognized immaterial accrued interest and penalties related to uncertain tax positions.
The Company files income tax returns in the U.S. federal jurisdiction as well as various U.S. states and foreign jurisdictions. The tax years 2009 and forward remain open to examination by the major jurisdictions in which the Company is subject to tax. These fiscal years outside the normal statute of limitation remain open to audit by tax authorities due to tax attributes generated in those early years, which have been carried forward and may be audited in subsequent years when utilized. The Company is subject to the continuous examination of income tax returns by various tax authorities. The Company regularly assesses the likelihood of adverse outcomes resulting from these examinations to determine the adequacy of the provision for income taxes. The Company believes that adequate amounts have been reserved for any adjustments that may ultimately result from these examinations and does not anticipate a significant impact to the gross unrecognized tax benefits within the next 12 months related to these years.