|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-08-17 14:21 UTC] ryosuke_i_628 at yahoo dot co dot jp
[2016-08-17 14:27 UTC] ryosuke_i_628 at yahoo dot co dot jp
[2016-08-17 14:32 UTC] imbibinebe at gmail dot com
[2016-08-17 15:34 UTC] cmb@php.net
-Status: Open
+Status: Not a bug
-Type: Feature/Change Request
+Type: Bug
-Assigned To:
+Assigned To: cmb
[2016-08-17 15:34 UTC] cmb@php.net
[2016-08-17 15:50 UTC] imbibinebe at gmail dot com
[2016-08-17 16:05 UTC] cmb@php.net
-Summary: in_array confusing strings and integers
+Summary: change default of $strict parameter of in_array()
-Status: Not a bug
+Status: Re-Opened
-Type: Bug
+Type: Feature/Change Request
[2016-08-17 16:05 UTC] cmb@php.net
[2016-08-17 16:06 UTC] cmb@php.net
-Assigned To: cmb
+Assigned To:
[2016-08-17 19:06 UTC] ryosuke_i_628 at yahoo dot co dot jp
[2017-08-05 04:59 UTC] stas@php.net
-Status: Re-Opened
+Status: Suspended
[2017-08-05 04:59 UTC] stas@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 02:00:01 2025 UTC |
Description: ------------ using PHP Version 5.6.14-0+deb8u1 on a debian operating system, here is what I get with the following testing script. I think that 'Expected result' should be obtained without using the third parameter of in_array ([, bool $strict = FALSE ]) otherwise it is very confusing. Test script: --------------- echo 'test1:'.(in_array('string',[0,1])?'true':'false'); echo 'test2:'.(in_array('string',[1])?'true':'false'); echo 'test3:'.(in_array('string',[0])?'true':'false'); Expected result: ---------------- test1:false test2:false test3:false Actual result: -------------- test1:true test2:false test3:true