|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-01-22 06:13 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
-Package: Unknown/Other Function
+Package: Strings related
[2021-01-22 06:13 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 12:00:01 2025 UTC |
Description: ------------ str_contains() asserts that 'test' string contains null str_contains() asserts that 'test' string contains empty string php -r "var_dump(str_contains('test', null));" bool(true) php -r "var_dump(str_contains('test', ''));" bool(true) Test script: --------------- var_dump(str_contains('test', null)); var_dump(str_contains('test', '')); Expected result: ---------------- In test script I expect to see false value for both code lines Actual result: -------------- In test script I see true value for both code lines