user-documentation
user-documentation copied to clipboard
Update docs for HHVM 4.156
From https://github.com/hhvm/hhvm.com/pull/199.
Serialize with Options
- [ ] "
HH\serialize_with_options
now supports adisallowObjects
option, which disallows serialization of objects except for legacy Hack Collections."
Open question: We never talk about serializing anywhere in the docs. Should we? Or could just start by adding an options section in https://docs.hhvm.com/hack/reference/function/HH.serialize_with_options/ with disallowObjects
, though I'm not sure what other options there are.
Literals with Underscores
- [x] Numeric literals can now contain underscores to improve code readability; for example, $x = 1_234_567_890; sets $x to the integer 1234567890." Added here: https://github.com/hhvm/user-documentation/pull/1197
Breaking: Lambdas in Anonymous functions
- [ ] "lambdas contained within an anonymous function will no longer implicitly capture variables from the parent scope of the anonymous function, unless the variable is in the anonymous function's
use
clause"
Possible areas to update:
- https://docs.hhvm.com/hack/functions/anonymous-functions#legacy-php-style-syntax, and
- https://docs.hhvm.com/hack/expression-trees/syntax-supported#local-variables