@@ -2971,7 +2971,7 @@ public function resolveIdentical(Expr\BinaryOp\Identical $expr, Scope $scope, Ty
29712971 /**
29722972 * When $castExpr casts $valueExpr to an int and back to a string — i.e. the
29732973 * `(string) (int) $valueExpr` round-trip (in any combination of the (string)/(int)
2974- * casts and the strval()/intval() function forms ) — returns $valueExpr so the
2974+ * casts) — returns $valueExpr so the
29752975 * comparison `$castExpr === $valueExpr` can narrow it to a decimal / non-decimal
29762976 * integer string. This is the canonical "decimal integer string" round-trip that
29772977 * ConstantStringType::isDecimalIntegerString() checks with `(string) (int) $value === $value`.
@@ -3008,24 +3008,14 @@ private function getDecimalIntegerStringRoundTripExpr(Expr $castExpr, Expr $valu
30083008 }
30093009
30103010 /**
3011- * Strips a single (string)/(int) cast or strval()/intval() call , returning its inner expression.
3011+ * Strips a single (string)/(int) cast, returning its inner expression.
30123012 */
30133013 private function getCastInnerExpr (Expr $ expr ): ?Expr
30143014 {
30153015 if ($ expr instanceof Expr \Cast \String_ || $ expr instanceof Expr \Cast \Int_) {
30163016 return $ expr ->expr ;
30173017 }
30183018
3019- if (
3020- $ expr instanceof FuncCall
3021- && $ expr ->name instanceof Name
3022- && !$ expr ->isFirstClassCallable ()
3023- && in_array (strtolower ($ expr ->name ->toString ()), ['strval ' , 'intval ' ], true )
3024- && count ($ expr ->getArgs ()) === 1
3025- ) {
3026- return $ expr ->getArgs ()[0 ]->value ;
3027- }
3028-
30293019 return null ;
30303020 }
30313021
@@ -3291,7 +3281,7 @@ private function resolveNormalizedIdentical(Expr\BinaryOp\Identical $expr, Scope
32913281 }
32923282 }
32933283
3294- // (string) (int) $x === $x (and the strval(intval()) equivalents)
3284+ // (string) (int) $x === $x
32953285 if (!$ context ->null ()) {
32963286 $ decimalValueExpr = $ this ->getDecimalIntegerStringRoundTripExpr ($ unwrappedLeftExpr , $ unwrappedRightExpr , $ scope )
32973287 ?? $ this ->getDecimalIntegerStringRoundTripExpr ($ unwrappedRightExpr , $ unwrappedLeftExpr , $ scope );
0 commit comments