php-cast
Explicit cast with the behavior of implicit weak mode cast (by sj-i)
unify-typing-modes-rfc
PHP RFC: Unify PHP's typing modes (by Girgias)
php-cast | unify-typing-modes-rfc | |
---|---|---|
1 | 4 | |
5 | 19 | |
- | - | |
0.0 | 1.5 | |
over 3 years ago | almost 1 year ago | |
PHP | ||
MIT License | - |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
php-cast
Posts with mentions or reviews of php-cast.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-04-13.
-
Which form of typing is best practice in PHP?
FWIW, I wrote this for the exact same reason. https://github.com/sj-i/php-cast
unify-typing-modes-rfc
Posts with mentions or reviews of unify-typing-modes-rfc.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-04-13.
-
Which form of typing is best practice in PHP?
As I've written about this on a "meta" RFC (which is more a personal tracker of what changed I want to make to the language), strict_types is more or less mandatory on PHP 7, but you can forgo it in PHP 8 for the most part as the biggest wtfs with numeric strings has been more or less "fixed", now you'll still get incompatible float to int conversions, but in PHP 8.1 you'll get a deprecation notice for this.
-
Strict typing in PHP
Depends what you mean by strict typing, is it just the declare statement? IMHO this is less needed in PHP 8 because of various changes (always throws a TypeError, numeric strings are kinda sane now, etc.) which wasn't the case before so you basically needed to use that declare to prevent a ton of bugs ahead of time, and you still need it for a couple of cases I wrote a "meta RFC" (more of a tracker of what RFCs I want to propose) talking about the issues that excessive strict_type=1 usage as done and what still needs to be fixed IMHO for it to be even considerable to drop the declare.
-
Reasons for choosing not to use strict mode?
I've written a "meta" RFC which I have as a draft on GitHub
What are some alternatives?
When comparing php-cast and unify-typing-modes-rfc you can also consider the following projects:
Rector - Instant Upgrades and Automated Refactoring of any PHP 5.3+ code
Params - Framework agnostic validation