Skip to content

Micro Optimizations - Round #2#608

Merged
cmb69 merged 3 commits intophp:masterfrom
Ayesh:modernize/micro-optimizations-2
Jul 3, 2022
Merged

Micro Optimizations - Round #2#608
cmb69 merged 3 commits intophp:masterfrom
Ayesh:modernize/micro-optimizations-2

Conversation

@Ayesh
Copy link
Member

@Ayesh Ayesh commented Jul 3, 2022

Follow-up to #603, includes a few more optimizations.

Thank you.

Ayesh added 3 commits July 3, 2022 23:28
`const` is quite faster because of the compile-time optimizations. Because the replaced statements are not declaring constant conditionally, it's safe to use `const` in all of these places.
Copy link
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

<?php

$refresh = isset($_GET['refresh']) ? true : false;
$refresh = isset($_GET['refresh']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for removing this nonsense! :)

@cmb69 cmb69 merged commit d40890d into php:master Jul 3, 2022
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