.. _ruleset-changed-behavior: Changed Behavior ++++++++++++++++ Ruleset with all rules that identify changed behavior across PHP versions. This means that some syntax behave differently, depending on PHP version. Total : 609 analysis * :ref:`ambiguous-array-index` * :ref:`array-index` * :ref:`true-false-inconsistant-case` * :ref:`magic-constant-usage` * :ref:`php-constant-usage` * :ref:`caught-exceptions` * :ref:`defined-exceptions` * :ref:`ext-apc` * :ref:`ext-bcmath` * :ref:`ext-bzip2` * :ref:`ext-calendar` * :ref:`ext-sqlite` * :ref:`ext-sqlite3` * :ref:`closures-glossary` * :ref:`recursive-functions` * :ref:`empty-interfaces` * :ref:`interfaces-usage` * :ref:`interfaces-names` * :ref:`php-interfaces` * :ref:`aliases` * :ref:`namespaces-glossary` * :ref:`autoloading` * :ref:`use-lower-case-for-parent,-static-and-self` * :ref:`goto-names` * :ref:`labels` * :ref:`functions-removed-in-php-5.4` * :ref:`for-using-functioncall` * :ref:`no-plus-one` * :ref:`throws-an-assignement` * :ref:`\_\_tostring()-throws-exception` * :ref:`binary-glossary` * :ref:`email-addresses` * :ref:`http-status-code` * :ref:`all-strings` * :ref:`interface-arguments` * :ref:`variable-references` * :ref:`abstract-class-usage` * :ref:`variable-constants` * :ref:`empty-traits` * :ref:`redefined-php-traits` * :ref:`traits-usage` * :ref:`trait-names` * :ref:`short-syntax-for-arrays` * :ref:`unused-use` * :ref:`use-with-fully-qualified-name` * :ref:`used-use` * :ref:`ext-array` * :ref:`non-lowercase-keywords` * :ref:`abstract-static-methods` * :ref:`interface-methods` * :ref:`trait-methods` * :ref:`invalid-constant-name` * :ref:`multiple-constant-definition` * :ref:`wrong-optional-parameter` * :ref:`use-===-null` * :ref:`$this-is-not-an-array` * :ref:`cast-usage` * :ref:`closure-may-use-$this` * :ref:`while(list()-=-each())` * :ref:`several-instructions-on-the-same-line` * :ref:`function-subscripting,-old-style` * :ref:`$this-belongs-to-classes-or-traits` * :ref:`non-constant-index-in-array` * :ref:`undefined-constants` * :ref:`custom-constant-usage` * :ref:`is-an-extension-interface` * :ref:`is-an-extension-constant` * :ref:`bracketless-blocks` * :ref:`undefined-class-constants` * :ref:`used-private-methods` * :ref:`unused-private-methods` * :ref:`crypt()-without-salt` * :ref:`mcrypt\_create\_iv()-with-default-values` * :ref:`native-alias-functions-usage` * :ref:`unresolved-classes` * :ref:`**-for-exponent` * :ref:`useless-constructor` * :ref:`unresolved-use` * :ref:`unused-constants` * :ref:`undefined-static-or-self` * :ref:`parent,-static-or-self-outside-class` * :ref:`is-extension-trait` * :ref:`dynamically-called-classes` * :ref:`conditioned-function` * :ref:`method-is-a-generator` * :ref:`use-password\_hash()` * :ref:`dereferencing-string-and-arrays` * :ref:`empty-with-expression` * :ref:`use-const-and-functions` * :ref:`constant-scalar-expressions` * :ref:`unreachable-code` * :ref:`must-return-methods` * :ref:`interpolation` * :ref:`empty-slots-in-arrays` * :ref:`method-is-not-for-fluent-interface` * :ref:`php-handlers-usage` * :ref:`unused-methods` * :ref:`used-methods` * :ref:`overwritten-exceptions` * :ref:`direct-injection` * :ref:`return-void-` * :ref:`return-with-parenthesis` * :ref:`unused-classes` * :ref:`used-classes` * :ref:`is-php-constant` * :ref:`sensitive-argument` * :ref:`undefined-properties` * :ref:`short-open-tags` * :ref:`lone-blocks` * :ref:`avoid-sleep()-usleep()` * :ref:`php-keywords-as-names` * :ref:`const-with-array` * :ref:`namespaces` * :ref:`repeated-print()` * :ref:`constants-created-outside-its-namespace` * :ref:`fully-qualified-constants` * :ref:`use-this` * :ref:`ext-apache` * :ref:`slow-functions` * :ref:`useless-final` * :ref:`no-array\_merge()-in-loops` * :ref:`unresolved-instanceof` * :ref:`unthrown-exception` * :ref:`magic-visibility` * :ref:`no-parenthesis-for-language-construct` * :ref:`unused-label` * :ref:`methodcall-on-new` * :ref:`used-interfaces` * :ref:`unused-interfaces` * :ref:`useless-interfaces` * :ref:`undefined-interfaces` * :ref:`ext-apcu` * :ref:`should-use-prepared-statement` * :ref:`class-const-with-array` * :ref:`unresolved-catch` * :ref:`reserved-keywords-in-php-7` * :ref:`could-be-a-static-variable` * :ref:`empty-namespace` * :ref:`could-use-short-assignation` * :ref:`useless-abstract-class` * :ref:`scalar-typehint-usage` * :ref:`return-typehint-usage` * :ref:`global-import` * :ref:`pre-increment` * :ref:`ext-amqp` * :ref:`ext-php-ast` * :ref:`indices-are-int-or-string` * :ref:`isset()-with-constant` * :ref:`is-global-constant` * :ref:`coalesce` * :ref:`list-with-array-appends` * :ref:`simple-global-variable` * :ref:`parenthesis-as-parameter` * :ref:`foreach-don't-change-pointer` * :ref:`unicode-escape-partial` * :ref:`directives-usage` * :ref:`eval()-without-try` * :ref:`no-list-with-string` * :ref:`usort-sorting-in-php-7.0` * :ref:`func\_get\_arg()-modified` * :ref:`register-globals` * :ref:`avoid-get\_class()` * :ref:`used-trait` * :ref:`unused-traits` * :ref:`wrong-parameter-type` * :ref:`redefined-methods` * :ref:`redefined-class-constants` * :ref:`redefined-default` * :ref:`wrong-fopen()-mode` * :ref:`confusing-names` * :ref:`php-bugfixes` * :ref:`preg\_match\_all()-flag` * :ref:`safe-curl-options` * :ref:`already-parents-interface` * :ref:`use-random\_int()` * :ref:`cant-use-return-value-in-write-context` * :ref:`set\_exception\_handler()-warning` * :ref:`using-$this-outside-a-class` * :ref:`pear-usage` * :ref:`undefined-trait` * :ref:`no-choice` * :ref:`exception-order` * :ref:`uncaught-exceptions` * :ref:`undefined-caught-exceptions` * :ref:`gprc-aliases` * :ref:`indirect-injection` * :ref:`list-with-keys` * :ref:`throw-functioncall` * :ref:`use-instanceof` * :ref:`make-one-call-with-array` * :ref:`list-short-syntax` * :ref:`defined-parent-mp` * :ref:`multiple-exceptions-catch()` * :ref:`used-protected-method` * :ref:`unused-protected-methods` * :ref:`no-count-with-0` * :ref:`dependant-trait` * :ref:`hidden-use-expression` * :ref:`could-use-alias` * :ref:`should-make-alias` * :ref:`multiple-identical-trait-or-interface` * :ref:`multiple-alias-definitions` * :ref:`use-class-operator` * :ref:`don't-echo-error` * :ref:`time()-vs-strtotime()` * :ref:`unitialized-properties` * :ref:`php-7.1-microseconds` * :ref:`getting-last-element` * :ref:`rethrown-exceptions` * :ref:`avoid-array\_push()` * :ref:`$globals-or-global` * :ref:`close-tags-consistency` * :ref:`fetch-one-row-format` * :ref:`avoid-glob()-usage` * :ref:`could-be-protected-property` * :ref:`raised-access-level` * :ref:`class-function-confusion` * :ref:`forgotten-thrown` * :ref:`multiple-alias-definitions-per-file` * :ref:`\_\_dir\_\_-then-slash` * :ref:`self,-parent,-static-outside-class` * :ref:`used-once-property` * :ref:`should-use-session\_regenerateid()` * :ref:`strange-name-for-constants` * :ref:`could-be-typehinted-callable` * :ref:`encoded-simple-letters` * :ref:`too-many-finds` * :ref:`set-cookie-safe-arguments` * :ref:`new-constants-in-php-7.2` * :ref:`group-use-declaration` * :ref:`displays-text` * :ref:`no-class-in-global` * :ref:`crc32()-might-be-negative` * :ref:`use-debug` * :ref:`could-typehint` * :ref:`di-cyclic-dependencies` * :ref:`too-many-injections` * :ref:`dependency-injection` * :ref:`courier-anti-pattern` * :ref:`could-make-a-function` * :ref:`forgotten-interface` * :ref:`manipulates-nan` * :ref:`manipulates-inf` * :ref:`mkdir-default` * :ref:`strict\_types-preference` * :ref:`declare-strict\_types-usage` * :ref:`encoding-usage` * :ref:`group-use-trailing-comma` * :ref:`logical-operators-favorite` * :ref:`isset-multiple-arguments` * :ref:`no-magic-method-with-array` * :ref:`avoid-concat-in-loop` * :ref:`no-substr-minus-one` * :ref:`logical-to-in\_array` * :ref:`shell-favorite` * :ref:`could-be-protected-class-constant` * :ref:`could-be-protected-method` * :ref:`pathinfo()-returns-may-vary` * :ref:`is-actually-zero` * :ref:`session-lazy-write` * :ref:`session-variables` * :ref:`cookies-variables` * :ref:`date-formats` * :ref:`simple-switch-and-match` * :ref:`substring-first` * :ref:`use-list-with-foreach` * :ref:`crypto-usage` * :ref:`php-7.2-new-class` * :ref:`avoid-set\_error\_handler-$context-argument` * :ref:`hash-will-use-objects` * :ref:`maybe-missing-new` * :ref:`use-php7-encapsed-strings` * :ref:`type-array-index` * :ref:`dl()-usage` * :ref:`invalid-regex` * :ref:`use-named-boolean-in-argument-definition` * :ref:`not-a-scalar-type` * :ref:`sqlite3-requires-single-quotes` * :ref:`no-net-for-xml-load` * :ref:`useless-referenced-argument` * :ref:`double-array\_flip()` * :ref:`foreach-on-object` * :ref:`dynamic-library-loading` * :ref:`php-7.3-last-empty-argument` * :ref:`use-recursive-count()` * :ref:`processing-collector` * :ref:`missing-parenthesis` * :ref:`strpos()-too-much` * :ref:`do-in-base` * :ref:`weak-typing` * :ref:`cache-variable-outside-loop` * :ref:`use-the-blind-var` * :ref:`nonexistent-variable-in-compact()` * :ref:`mismatch-type-and-default` * :ref:`flexible-heredoc` * :ref:`comparisons-orientation` * :ref:`could-be-static-closure` * :ref:`move\_uploaded\_file-instead-of-copy` * :ref:`can't-throw-throwable` * :ref:`abstract-or-implements` * :ref:`ambiguous-visibilities` * :ref:`hash-algorithms-incompatible-with-php-7.1-` * :ref:`undefined-class` * :ref:`php-7.0-scalar-typehints` * :ref:`php-7.1-scalar-typehints` * :ref:`php-7.2-scalar-typehints` * :ref:`locally-used-property-in-trait` * :ref:`handle-arrays-with-callback` * :ref:`use-is\_countable` * :ref:`detect-current-class` * :ref:`avoid-real` * :ref:`const-or-define-preference` * :ref:`constant-case-preference` * :ref:`assert-function-is-reserved` * :ref:`must-call-parent-constructor` * :ref:`undefined-insteadof` * :ref:`method-collision-traits` * :ref:`closure-could-be-a-callback` * :ref:`add-default-value` * :ref:`filter\_input()-as-a-source` * :ref:`invalid-pack-format` * :ref:`repeated-interface` * :ref:`no-reference-for-static-property` * :ref:`printf-format-inventory` * :ref:`php-exception` * :ref:`unreachable-class-constant` * :ref:`avoid-self-in-interface` * :ref:`safe-http-headers` * :ref:`useless-method-alias` * :ref:`isset()-on-the-whole-array` * :ref:`self-using-trait` * :ref:`multiple-usage-of-same-trait` * :ref:`possible-missing-subpattern` * :ref:`array\_key\_exists()-speedup` * :ref:`ext-pcov` * :ref:`constant-dynamic-creation` * :ref:`an-oop-factory` * :ref:`type-must-be-returned` * :ref:`inconsistent-variable-usage` * :ref:`self-transforming-variables` * :ref:`caught-variable` * :ref:`implode-one-arg` * :ref:`insecure-integer-validation` * :ref:`incoming-values` * :ref:`useless-default-argument` * :ref:`trait-not-found` * :ref:`concat-and-addition` * :ref:`minus-one-on-error` * :ref:`autoappend` * :ref:`memoize-magiccall` * :ref:`regex-on-arrays` * :ref:`always-use-function-with-array\_key\_exists()` * :ref:`curl\_version()-has-no-argument` * :ref:`unused-class-constant` * :ref:`could-use-trait` * :ref:`generator-cannot-return` * :ref:`methods-that-should-not-be-used` * :ref:`use-array-functions` * :ref:`avoid-mb\_dectect\_encoding()` * :ref:`mb\_strrpos()-third-argument` * :ref:`array\_key\_exists()-works-on-arrays` * :ref:`reflection-export()-is-deprecated` * :ref:`numeric-literal-separator` * :ref:`class-without-parent` * :ref:`serialize-magic-method` * :ref:`scalar-are-not-arrays` * :ref:`php-native-reference-variable` * :ref:`create-compact-variables` * :ref:`propagate-constants` * :ref:`no-ent\_ignore` * :ref:`overwritten-properties` * :ref:`set-clone-link` * :ref:`create-magic-property` * :ref:`set-parent-definition` * :ref:`make-class-method-definition` * :ref:`create-default-values` * :ref:`makes-class-constant-definition` * :ref:`set-class-remote-definition-with-injection` * :ref:`solve-trait-methods` * :ref:`follow-closure-definition` * :ref:`implode()-arguments-order` * :ref:`hash-algorithms-incompatible-with-php-7.4-` * :ref:`no-spread-for-hash` * :ref:`set-class-remote-definition-with-return-typehint` * :ref:`set-class-remote-definition-with-local-new` * :ref:`set-class-remote-definition-with-typehint` * :ref:`set-class-remote-definition-with-global` * :ref:`set-class-property-definition-with-typehint` * :ref:`set-array-class-definition` * :ref:`set-class-method-remote-definition` * :ref:`use-arrow-functions` * :ref:`environment-variable-usage` * :ref:`indentation-levels` * :ref:`nested-ternary-without-parenthesis` * :ref:`cyclomatic-complexity` * :ref:`use-array\_slice()` * :ref:`comparison-is-always-the-same` * :ref:`interfaces-is-not-implemented` * :ref:`no-literal-for-reference` * :ref:`interfaces-don't-ensure-properties` * :ref:`duplicate-literal` * :ref:`no-weak-ssl-crypto` * :ref:`no-mb\_substr-in-loop` * :ref:`collect-parameter-counts` * :ref:`collect-local-variable-counts` * :ref:`use-the-case-value` * :ref:`too-many-dereferencing` * :ref:`can't-implement-traversable` * :ref:`is\_a()-with-string` * :ref:`filter-to-add\_slashes()` * :ref:`typehinting-stats` * :ref:`wrong-case-namespaces` * :ref:`create-foreach-default` * :ref:`merge-if-then` * :ref:`inclusions` * :ref:`typehint-order` * :ref:`new-order` * :ref:`links-between-parameter-and-argument` * :ref:`exceeding-typehint` * :ref:`collect-class-interface-counts` * :ref:`collect-class-depth` * :ref:`collect-class-children-count` * :ref:`coalesce-equal` * :ref:`possible-interfaces` * :ref:`php-8.0-only-typehints` * :ref:`uninitialized-property` * :ref:`throw-was-an-expression` * :ref:`unused-trait-in-class` * :ref:`keep-files-access-restricted` * :ref:`possible-alias-confusion` * :ref:`collect-property-counts` * :ref:`collect-method-counts` * :ref:`safe-phpvariables` * :ref:`extended-typehints` * :ref:`double-object-assignation` * :ref:`call-order` * :ref:`array\_merge-needs-array-of-arrays` * :ref:`abstract-away` * :ref:`large-try-block` * :ref:`catch-with-undefined-variable` * :ref:`fossilized-methods-list` * :ref:`collect-static-class-changes` * :ref:`use-php-attributes` * :ref:`use-nullsafe-operator` * :ref:`collect-readability` * :ref:`collect-class-traits-counts` * :ref:`collect-native-calls-per-expressions` * :ref:`function-with-dynamic-code` * :ref:`$php\_errormsg-usage` * :ref:`mismatch-parameter-name` * :ref:`multiple-declaration-of-strict\_types` * :ref:`assumptions` * :ref:`collect-use-counts` * :ref:`useless-typehint` * :ref:`negative-start-index-in-array` * :ref:`php-ext-stub-property-and-method` * :ref:`optimize-explode()` * :ref:`unused-exception-variable` * :ref:`cancelled-parameter` * :ref:`missing-\_\_isset()-method` * :ref:`long-preparation-for-throw` * :ref:`modify-immutable` * :ref:`avoid-get\_object\_vars()` * :ref:`cannot-use-static-for-closure` * :ref:`only-first-byte-` * :ref:`restrict-global-usage` * :ref:`inherited-static-variable` * :ref:`htmlentities-using-default-flag` * :ref:`openssl-encrypt-default-algorithm-change` * :ref:`php-native-class-type-compatibility` * :ref:`missing-attribute-attribute` * :ref:`$files-full\_path` * :ref:`no-null-for-native-php-functions` * :ref:`calling-static-trait-method` * :ref:`php-native-interfaces-and-return-type` * :ref:`final-constant` * :ref:`never-typehint-usage` * :ref:`php-8.1-typehints` * :ref:`php-8.0-typehints` * :ref:`never-keyword` * :ref:`float-conversion-as-index` * :ref:`nested-attributes` * :ref:`promoted-properties` * :ref:`null-type-favorite` * :ref:`variable-anf-property-typehint` * :ref:`extends-stdclass` * :ref:`scope-resolution-operator` * :ref:`cant-overload-constants` * :ref:`variable-is-a-local-constant` * :ref:`this-could-be-iterable` * :ref:`abstract-class-constants` * :ref:`check-division-by-zero` * :ref:`getter-and-setter` * :ref:`multiple-similar-calls` * :ref:`use-file-append` * :ref:`readonly-usage` * :ref:`missing-visibility` * :ref:`could-use-existing-constant` * :ref:`collect-dependency-extension` * :ref:`public-reach-to-private-methods` * :ref:`unreachable-method` * :ref:`string-int-comparison` * :ref:`add-return-typehint` * :ref:`create-magic-method` * :ref:`php-8.1-resources-turned-into-objects` * :ref:`do-not-cast-to-int` * :ref:`constant-scalar-expression` * :ref:`no-readonly-assignation-in-global` * :ref:`could-set-property-default` * :ref:`no-private-abstract-method-in-trait` * :ref:`typehints-couldberesource` * :ref:`new-functions-in-php-8.2` * :ref:`ip` * :ref:`could-inject-parameter` * :ref:`date()-versus-datetime-preference` * :ref:`unused-public-methods` * :ref:`solve-trait-constants` * :ref:`no-keyword-in-namespace` * :ref:`ambiguous-types-with-variables` * :ref:`set-chaining-exception` * :ref:`could-use-class-operator` * :ref:`mbstring-unknown-encodings` * :ref:`named-argument-and-variadic` * :ref:`coalesce-and-ternary-operators-order` * :ref:`useless-assignation-of-promoted-property` * :ref:`method-property-confusion` * :ref:`could-use-namespace-magic-constant` * :ref:`incompatible-types-with-incoming-values` * :ref:`method-usage` * :ref:`empty-loop` * :ref:`too-many-extractions` * :ref:`possible-typeerror` * :ref:`collect-calls` * :ref:`set-method-fnp` * :ref:`type-dodging` * :ref:`skip-empty-array` * :ref:`weak-type-with-array` * :ref:`filter-not-raw` * :ref:`collect-setlocale` * :ref:`no-max-on-empty-array` * :ref:`no-empty-string-with-explode()` * :ref:`array-access-on-literal-array` * :ref:`strpos()-with-integers` * :ref:`unvalidated-data-cached-in-session` * :ref:`ellipsis-merge` * :ref:`new-functions-in-php-8.3` * :ref:`missing-assignation-in-branches` * :ref:`short-ternary` * :ref:`deprecated-mb\_string-encodings` * :ref:`pre-calculate-use` * :ref:`init-then-update` * :ref:`different-constructors` * :ref:`misused-yield` * :ref:`substr()-in-loops` * :ref:`php-8.3-new-classes` * :ref:`recalled-condition` * :ref:`incompatible-property-between-class-and-trait` * :ref:`could-be-array\_combine()` * :ref:`comparison-on-different-types` * :ref:`no-null-for-index` * :ref:`useless-try` * :ref:`class-injection-count` * :ref:`collect-property-usage` * :ref:`collect-structures` * :ref:`collect-catch-calls` * :ref:`identical-case-in-switch` * :ref:`standalonetype-true-false-null` * :ref:`constants-in-traits` * :ref:`short-or-complete-comparison` * :ref:`could-use-yield-from` * :ref:`static-variable-can-default-to-arbitrary-expression` * :ref:`multiline-expressions` * :ref:`append-and-assign-arrays` * :ref:`property-cannot-be-readonly` * :ref:`static-variable-initialisation` * :ref:`collect-graph-triplets` * :ref:`don't-use-the-type-as-variable-name` * :ref:`count()-to-array-append` * :ref:`useless-trailing-comma` * :ref:`reserved-methods` * :ref:`void-is-not-a-reference` * :ref:`non-integer-nor-string-as-index` * :ref:`php-native-attributes` * :ref:`injectable-version` * :ref:`multiple-property-declaration` * :ref:`could-cast-to-array` * :ref:`check-after-null-safe-operator` * :ref:`no-null-with-null-safe-operator` * :ref:`invalid-cast` * :ref:`could-use-strcontains()` * :ref:`could-drop-variable` * :ref:`could-be-readonly-property` * :ref:`try-without-catch` * :ref:`wrong-precedence-in-expression` * :ref:`only-variable-passed-by-reference` * :ref:`property-export` * :ref:`file\_put\_contents-using-array-argument` * :ref:`useless-nullsafe-operator` * :ref:`nested-match` * :ref:`useless-short-ternary` * :ref:`combined-calls` * :ref:`empty-json-error` * :ref:`useless-coalesce` * :ref:`count()-is-not-negative` * :ref:`exit-without-argument` * :ref:`php-8.1-new-types` * :ref:`php-8.2-new-types` * :ref:`variable-parameter-ambiguity-in-arrow-function` * :ref:`strpos()-less-than-one` Specs _____ +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Short name | ChangedBehavior | +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Community Edition `_, `Exakat Cloud `_ | +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+