summaryrefslogtreecommitdiff
path: root/doc/source/features.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/source/features.rst')
-rw-r--r--doc/source/features.rst16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/source/features.rst b/doc/source/features.rst
index e420156..5543696 100644
--- a/doc/source/features.rst
+++ b/doc/source/features.rst
@@ -316,6 +316,22 @@ This feature is largely inspired from the
316`autostrict <https://github.com/krakjoe/autostrict>`_ module from `krakjoe <http://krakjoe.ninja>`__. 316`autostrict <https://github.com/krakjoe/autostrict>`_ module from `krakjoe <http://krakjoe.ninja>`__.
317 317
318 318
319.. _sloppy-comparisons-feature:
320
321Preventing sloppy comparisons
322^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
323
324The aforementioned :ref:`strict mode <global-strict-feature>` only works with
325annotated types and native functions, so it doesn't cover every instances of
326`type juggling <https://secure.php.net/manual/en/language.types.type-juggling.php>`
327during comparisons. Since comparison between different types in PHP is
328`notoriously <https://secure.php.net/manual/en/types.comparisons.php>`__
329difficult to get right, Snuffleupagus offers a way to **always** use the
330``identical`` operator instead of the ``equal`` one (see the `operator section
331<https://secure.php.net/manual/en/language.operators.comparison.php>` for PHP's documentation
332for more details), so that values with different types will always be treated
333as being different.
334
319.. _readonly-exec-feature: 335.. _readonly-exec-feature:
320 336
321Preventing execution of writable PHP files 337Preventing execution of writable PHP files