Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs to mention the "new" strict switch statements #1342

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

lexidor
Copy link
Contributor

@lexidor lexidor commented May 28, 2023

fixes #1196

Fixes:

  • Fix CI
  • Updates the docs site to use a support hhvm version (4.168)
  • Makes hsl examples exempt from the <a href="#examples"> requirement.
    • This is a hack. I should ideally find out why the link is not generated, but I couldn't figure that one out easily.
  • Update the switch example to use the "new" strict == comparison rules.
  • Mention it is a bad idea to switch over types which compare differently with === than with ==.

lexidor added 3 commits May 29, 2023 01:40
These pages are auto generated.
I don't see an obvious way to add an example link.
Old switch used type juggling.
Sitch still uses `==`, which is weaker than `===`.
See https://docs.hhvm.com/hack/expressions-and-operators/equality
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update switch docs for new == rules
2 participants