Today, a bool parameter takes any scalar you pass it. 2, 0.5 and the string "false" all quietly become true. It works the other way too: false passed to a string parameter becomes "". This RFC from Theodore Brown would make these conversions emit a deprecation notice in PHP 8.7, then throw a TypeError in PHP 9.0. It only applies when strict_types is off.

Why change it

Other types already push back. Since PHP 8.0, passing "1abc" to an int parameter throws a TypeError. Since PHP 8.1, passing 0.1 to one is deprecated. bool never got the same check, so swapped arguments and failure values slip through without a sound.

The RFC's header() example shows how:

// header(string $header, bool $replace = true, int $response_code = 0)
header('Location: /new-url', 301);
// 301 becomes true for $replace, $response_code stays 0, so PHP sends 302

A false returned on failure is just as quiet. If json_encode() fails inside a function declared to return string, you get "" back instead of an error.

Show me

function setEnabled(bool $enabled): void {}

setEnabled(1);       // true, allowed
setEnabled('0');     // false, allowed
setEnabled(2);       // true, deprecated
setEnabled(0.0);     // false, deprecated
setEnabled('false'); // true, deprecated
setEnabled('');      // false, deprecated

function setName(string $name): void {}

setName(true);  // "1", deprecated
setName(false); // "", deprecated

The notice names the value, as in Deprecated: Implicit conversion from string "false" to bool.

What it means for existing code

Only type declarations change: parameters, return values and typed properties. The integers 0 and 1 and the strings "0" and "1" still convert to bool with no notice, since databases and query strings use them. if, echo, string concatenation, (bool) casts and filter_var() work as before. Files with strict_types=1 already reject these values.

The fixes are usually small. Compare explicitly ($value === 'yes'), parse with filter_var($value, FILTER_VALIDATE_BOOLEAN), check for false before passing a return value on, or cast with (bool) $value when truthiness is what you mean.

The author ran the change against the php-src, Symfony and Laravel test suites. Only 0.4% of Symfony's tests and 0.6% of Laravel's emitted the new notice. Of the places that need to change, almost half in Symfony and more than two thirds in Laravel are bugs.

Where it stands

Theodore Brown announced the RFC on internals on November 29, 2026. It targets PHP 8.7, and there's an implementation pull request. Two earlier attempts were declined: Stricter implicit boolean coercions went 3 to 14 in 2022, and a 2025 RFC that also deprecated 0 and 1 went 10 to 11. In early feedback, Rowan Tommins asked for "" to stay accepted as false, since PHP itself turns false into "".

No vote has been scheduled yet. It needs a two-thirds majority to pass.