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

PHP: casts read better than math tricks #67

Merged
merged 1 commit into from
Dec 13, 2020

Conversation

igorsantos07
Copy link
Contributor

Straightforward suggestion - better readability and a best practice to avoid using type juggling just for the sake of it.

@brazzy brazzy merged commit 1515bfc into brazzy:master Dec 13, 2020
@brazzy
Copy link
Owner

brazzy commented Dec 13, 2020

I think explicit casting may not have existed when I was still doing PHP development 😁

@igorsantos07 igorsantos07 deleted the patch-1 branch December 13, 2020 16:05
@igorsantos07
Copy link
Contributor Author

Not entirely sure, and settype() is also ancient, but one thing is certain: back in the days, docs and the spread word on php was definitely darker than nowadays haha

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.

None yet

2 participants