note 113035 deleted from function.in-array by sobak
| From: | sobak@php.net | Date: | Sat, 25 Feb 2017 06:04:15 +0000 |
| Subject: | note 113035 deleted from function.in-array by sobak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208839@lists.php.net to get a copy of this message | ||
Note Submitter: Artur K
----
As an addition to beingmrkennys note:
<?php
var_dump(in_array('012', array('12'))); //returns true
var_dump(in_array('012', array('12'), true)); //returns false
?>
Seems like PHP is making some cast. So use the strict parameter.