Skip to content

Conversation

colshrapnel
Copy link
Contributor

With the new memory management model the Variable declarations part is not relevant anymore. so it's better to be removed.

With the new memory management model the Variable declarations part is not relevant anymore. so it's better to be removed.
@matthewtrask
Copy link
Collaborator

@colshrapnel thanks! A few questions:

  • Does it make sense to leave it and instead add a note about the improved memory management?
  • What version did memory management get better in? I know we are aiming to keep people moving versions, but there are certainly cases of people still using older versions of PHP sadly that we may wanna keep in mind.

@drbyte
Copy link
Contributor

drbyte commented Mar 1, 2021

I agree with the PR. IMO simply removing the section makes sense:

  1. I believe the mention of "the new memory management model" is a reference to PHP 5.0
  2. The advice being removed is more of a micro-optimization IMO, not "Basics".
  3. I'm glad Google deleted their outdated doc (see the WayBack URL being removed by this PR), as a lot of other content in that same page was weak as well.

If there's a strong desire to keep any mention of variable declarations, I'd limit it to something brief like: "Don't create variables you don't need."

Just my 2cents :D

@colshrapnel
Copy link
Contributor Author

@matthewtrask I don't think is worth to keep this section. A question has been asked in /r/php recently and I can feel the confusion it creates, so it's better to avoid it at all.

Regarding the version, initially I thought it was the improvements made by Dmitry in PHP 7 but it seems this one has been made even earlier.

@matthewtrask matthewtrask merged commit 1f65c4b into codeguy:gh-pages Mar 3, 2021
@matthewtrask
Copy link
Collaborator

perfect thank you @colshrapnel!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants