Skip to content

Instantly share code, notes, and snippets.

@jjergus
Last active September 17, 2019 16:44
Show Gist options
  • Save jjergus/5f1bf4de7c1bc0e2911592b5a1cfff6b to your computer and use it in GitHub Desktop.
Save jjergus/5f1bf4de7c1bc0e2911592b5a1cfff6b to your computer and use it in GitHub Desktop.
byref.md

Class methods

  • currently no automated migration provided
  • we could add one, if we implemented proper detection of the Hack type of an arbitrary expression
  • not sure if worth doing, since there's not many of them and nothing seems very commonly used

These have (or will soon have) an optional by-ref arg removed, and a new variant is provided with the equivalent non-optional inout argument:

NumberFormatter::parse -> parseWithPosition
IntlDateFormatter::parse -> parseWithPosition
Memcached::get -> getWithCasToken
Memcached::getByKey -> getByKeyWithCasToken
Memcached::getMulti -> getMultiWithCasTokens
Memcached::getMultiByKey -> getMultiByKeyWithCasTokens

These had an optional by-ref arg which is now (or will soon be) a required inout arg:

NumberFormatter::parseCurrency
IntlTimeZone::getCanonicalID
SpoofChecker::areConfusable
SpoofChecker::isSuspicious

Non-migratable functions

These functions/methods will most likely be (or might have been already) completely removed:

array_walk_recursive
array_walk
call_user_method_array
call_user_method
collectAttributes

ereg
eregi

dnsgetmx

ReflectionParameter::collectAttributes
PDO::bindParam
PDO::bindColumn
SQLite3::bindparam

These functions/methods will most likely have (or might have already) their by-ref arg removed without replacement:

idn_to_ascii
idn_to_utf8
idn_to_unicode
memcache_get
Memcache::get
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment