v3.21.1

Equity-based compensation - Additional Information (Detail) - USD ($) $ / shares in Units, $ in Thousands | 3 Months Ended | 12 Months Ended |  |
--- | --- | --- | --- | ---
Jan. 31, 2021 | Jan. 31, 2020 | Jan. 31, 2021 | Jan. 31, 2020 | Jan. 31, 2019 | Jun. 30, 2019 | Jan. 31, 2018
Share-based Compensation Arrangement by Share-based Payment Award [Line Items] |  |  |  |  |  |  |
Granted (in shares) |  |  | 0 | 1,230,382 |  |  |
Intrinsic value |  |  | $ 33,575 | $ 13,960 | $ 1,355 |  |
Unrecognized compensation cost to stock option | $ 3,972 |  | $ 3,972 |  |  |  |
Stock Options |  |  |  |  |  |  |
Share-based Compensation Arrangement by Share-based Payment Award [Line Items] |  |  |  |  |  |  |
Maximum term |  |  | 10 years |  |  |  |
Vesting term |  |  | 4 years |  |  |  |
Percentage of vest option |  |  | 25.00% |  |  |  |
Stock-based compensation expense |  |  | $ 2,703 | $ 2,780 | $ 1,447 |  |
Weighted average term for recognition (in years) |  |  | 1 year 9 months 25 days |  |  |  |
Incremental expense associated with the modification of stock options |  |  | $ 385 |  |  |  |
Weighted average fair market value of grants (in USD per share) |  |  |  | $ 4.99 | $ 3.47 |  |
ESPP |  |  |  |  |  |  |
Share-based Compensation Arrangement by Share-based Payment Award [Line Items] |  |  |  |  |  |  |
Shares available for future grant (in shares) | 855,873 |  | 855,873 |  |  |  |
Restricted Stock Units (RSUs) |  |  |  |  |  |  |
Share-based Compensation Arrangement by Share-based Payment Award [Line Items] |  |  |  |  |  |  |
Maximum term |  |  | 7 years |  |  |  |
Vesting term |  |  | 4 years |  |  |  |
Stock-based compensation expense |  |  | $ 10,693 | $ 3,356 |  |  |
Weighted average term for recognition (in years) |  |  | 3 years 3 months 18 days |  |  |  |
Shares granted (in shares) |  |  | 972,271 | 1,493,678 | 0 |  |
Unrecognized compensation costs | $ 48,588 |  | $ 48,588 |  |  |  |
Shares available to vest (in shares) | 2,053,038 | 1,447,418 | 2,053,038 | 1,447,418 | 20,164 |  |
Restricted Stock Units (RSUs) | Executive Officer |  |  |  |  |  |  |
Share-based Compensation Arrangement by Share-based Payment Award [Line Items] |  |  |  |  |  |  |
Shares granted (in shares) |  |  | 0 |  |  |  |
Restricted Stock Units (RSUs) | Vital Score |  |  |  |  |  |  |
Share-based Compensation Arrangement by Share-based Payment Award [Line Items] |  |  |  |  |  |  |
Stock-based compensation expense |  |  | $ 33 | $ 40 |  |  |
Unrecognized compensation costs | $ 58 |  | $ 58 |  |  |  |
Weighted average fair market value of grants (in USD per share) |  |  | $ 32.78 | $ 21.31 |  |  |
Restricted Stock Units (RSUs) | Share-based Payment Arrangement, Year 1 |  |  |  |  |  |  |
Share-based Compensation Arrangement by Share-based Payment Award [Line Items] |  |  |  |  |  |  |
Percentage of vest option |  |  | 10.00% |  |  |  |
Restricted Stock Units (RSUs) | Share-based Payment Arrangement, Year 2 |  |  |  |  |  |  |
Share-based Compensation Arrangement by Share-based Payment Award [Line Items] |  |  |  |  |  |  |
Percentage of vest option |  |  | 20.00% |  |  |  |
Restricted Stock Units (RSUs) | Share-based Payment Arrangement, Year 3 |  |  |  |  |  |  |
Share-based Compensation Arrangement by Share-based Payment Award [Line Items] |  |  |  |  |  |  |
Percentage of vest option |  |  | 30.00% |  |  |  |
Restricted Stock Units (RSUs) | Share-based Payment Arrangement, Year 4 |  |  |  |  |  |  |
Share-based Compensation Arrangement by Share-based Payment Award [Line Items] |  |  |  |  |  |  |
Percentage of vest option |  |  | 40.00% |  |  |  |
Performance based restricted stock units |  |  |  |  |  |  |
Share-based Compensation Arrangement by Share-based Payment Award [Line Items] |  |  |  |  |  |  |
Percentage of vest option | 100.00% |  |  |  |  |  |
Stock-based compensation expense |  |  | $ 93 |  |  |  |
Weighted average term for recognition (in years) |  |  | 3 years |  |  |  |
Shares granted (in shares) |  | 70,806 |  |  |  |  |
Unrecognized compensation costs | $ 5,882 |  | $ 5,882 |  |  |  |
Weighted average fair market value of grants (in USD per share) |  |  | $ 84.38 |  |  |  |
Shares available to vest (in shares) |  | 141,612 |  | 141,612 |  |  |
Performance based restricted stock units | Minimum |  |  |  |  |  |  |
Share-based Compensation Arrangement by Share-based Payment Award [Line Items] |  |  |  |  |  |  |
Percentage of vest option | 0.00% |  |  |  |  |  |
Performance based restricted stock units | Maximum |  |  |  |  |  |  |
Share-based Compensation Arrangement by Share-based Payment Award [Line Items] |  |  |  |  |  |  |
Percentage of vest option | 200.00% |  |  |  |  |  |
2018 Stock Option Plan |  |  |  |  |  |  |
Share-based Compensation Arrangement by Share-based Payment Award [Line Items] |  |  |  |  |  |  |
Number of shares available for issuance (in shares) |  |  |  |  |  |  | 3,048,490
2019 Stock Option And Incentive Plan |  |  |  |  |  |  |
Share-based Compensation Arrangement by Share-based Payment Award [Line Items] |  |  |  |  |  |  |
Common stock reserve for future issuance (in shares) |  |  |  |  |  | 2,139,683 |
Percentage increase in shares reserved for future issuance |  |  | 5.00% |  |  |  |
Shares available for future grant (in shares) | 2,256,810 |  | 2,256,810 |  |  |  |
Employee Stock Purchase Plan |  |  |  |  |  |  |
Share-based Compensation Arrangement by Share-based Payment Award [Line Items] |  |  |  |  |  |  |
Shares available for future grant (in shares) | 855,873 |  | 855,873 |  |  |  |

X
- Definition Percentage Increase In Number of Shares Reserved For Future Issuance + References No definition available. + Details
Name: | phr_PercentageIncreaseInNumberOfSharesReservedForFutureIssuance
Namespace Prefix: | phr_
Data Type: | num:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Amount of expense for award under share-based payment arrangement. Excludes amount capitalized. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 1 -Subparagraph (b) -URI http://asc.fasb.org/extlink&oid=120381028&loc=d3e5047-113901 Reference 2: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SAB Topic 14.F) -URI http://asc.fasb.org/extlink&oid=115993241&loc=d3e301413-122809 Reference 3: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (h)(1)(i) -URI http://asc.fasb.org/extlink&oid=120381028&loc=d3e5070-113901 + Details
Name: | us-gaap_AllocatedShareBasedCompensationExpense
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Definition Aggregate number of common shares reserved for future issuance. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02.29) -URI http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682 + Details
Name: | us-gaap_CommonStockCapitalSharesReservedForFutureIssuance
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | instant

X
- Definition Weighted-average period over which cost not yet recognized is expected to be recognized for award under share-based payment arrangement, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (i) -URI http://asc.fasb.org/extlink&oid=120381028&loc=d3e5070-113901 + Details
Name: | us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1
Namespace Prefix: | us-gaap_
Data Type: | xbrli:durationItemType
Balance Type: | na
Period Type: | duration

X
- Definition Amount of cost to be recognized for nonvested award under share-based payment arrangement. Excludes share and unit options. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (i) -URI http://asc.fasb.org/extlink&oid=120381028&loc=d3e5070-113901 + Details
Name: | us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedShareBasedAwardsOtherThanOptions
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Amount of cost to be recognized for option under share-based payment arrangement. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (i) -URI http://asc.fasb.org/extlink&oid=120381028&loc=d3e5070-113901 + Details
Name: | us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedStockOptions
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Period over which grantee's right to exercise award under share-based payment arrangement is no longer contingent on satisfaction of service or performance condition, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days. Includes, but is not limited to, combination of market, performance or service condition. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (a)(1) -URI http://asc.fasb.org/extlink&oid=120381028&loc=d3e5070-113901 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1
Namespace Prefix: | us-gaap_
Data Type: | xbrli:durationItemType
Balance Type: | na
Period Type: | duration

X
- Definition The number of grants made during the period on other than stock (or unit) option plans (for example, phantom stock or unit plan, stock or unit appreciation rights plan, performance target plan). + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (c)(2)(iii)(1) -URI http://asc.fasb.org/extlink&oid=120381028&loc=d3e5070-113901 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | duration

X
- Definition The number of non-vested equity-based payment instruments, excluding stock (or unit) options, that validly exist and are outstanding as of the balance sheet date. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (c)(2)(i)-(ii) -URI http://asc.fasb.org/extlink&oid=120381028&loc=d3e5070-113901 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | instant

X
- Definition Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table. + References No definition available. + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition Number of shares authorized for issuance under share-based payment arrangement. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (a)(3) -URI http://asc.fasb.org/extlink&oid=120381028&loc=d3e5070-113901 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | instant

X
- Definition The difference between the maximum number of shares (or other type of equity) authorized for issuance under the plan (including the effects of amendments and adjustments), and the sum of: 1) the number of shares (or other type of equity) already issued upon exercise of options or other equity-based awards under the plan; and 2) shares (or other type of equity) reserved for issuance on granting of outstanding awards, net of cancellations and forfeitures, if applicable. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -URI http://asc.fasb.org/extlink&oid=120381028&loc=d3e5070-113901 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | instant

X
- Definition Amount of accumulated difference between fair value of underlying shares on dates of exercise and exercise price on options exercised (or share units converted) into shares. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (d)(2) -URI http://asc.fasb.org/extlink&oid=120381028&loc=d3e5070-113901 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Definition Gross number of share options (or share units) granted during the period. + References No definition available. + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | duration

X
- Definition The weighted average grant-date fair value of options granted during the reporting period as calculated by applying the disclosed option pricing methodology. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (d)(1) -URI http://asc.fasb.org/extlink&oid=120381028&loc=d3e5070-113901 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue
Namespace Prefix: | us-gaap_
Data Type: | num:perShareItemType
Balance Type: | na
Period Type: | duration

X
- Definition An excess of the fair value of the modified award over the fair value of the award immediately before the modification. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (h)(2)(iii) -URI http://asc.fasb.org/extlink&oid=120381028&loc=d3e5070-113901 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardPlanModificationIncrementalCompensationCost
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Definition Percentage of vesting of award under share-based payment arrangement. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (a)(1) -URI http://asc.fasb.org/extlink&oid=120381028&loc=d3e5070-113901 + Details
Name: | us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardAwardVestingRightsPercentage
Namespace Prefix: | us-gaap_
Data Type: | num:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Period from grant date that an equity-based award expires, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (a)(2) -URI http://asc.fasb.org/extlink&oid=120381028&loc=d3e5070-113901 + Details
Name: | us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod
Namespace Prefix: | us-gaap_
Data Type: | xbrli:durationItemType
Balance Type: | na
Period Type: | duration

X
- Details
Name: | us-gaap_AwardTypeAxis=us-gaap_EmployeeStockOptionMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_AwardTypeAxis=us-gaap_EmployeeStockMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_AwardTypeAxis=us-gaap_RestrictedStockUnitsRSUMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | srt_TitleOfIndividualAxis=srt_ExecutiveOfficerMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_BusinessAcquisitionAxis=phr_VitalScoreIncMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_VestingAxis=us-gaap_ShareBasedCompensationAwardTrancheOneMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_VestingAxis=us-gaap_ShareBasedCompensationAwardTrancheTwoMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_VestingAxis=us-gaap_ShareBasedCompensationAwardTrancheThreeMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_VestingAxis=phr_ShareBasedCompensationAwardTrancheFourMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_AwardTypeAxis=us-gaap_PerformanceSharesMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | srt_RangeAxis=srt_MinimumMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | srt_RangeAxis=srt_MaximumMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_PlanNameAxis=phr_TwoThousandEighteenStockOptionPlanMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_PlanNameAxis=phr_TwoThousandAndNineteenStockOptionAndIncentivePlanMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_PlanNameAxis=phr_EmployeeStockPurchasePlanMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |