Last active
June 13, 2024 21:30
-
-
Save liuxd/00cdd43770bd00a6eb6bacc7e81051e2 to your computer and use it in GitHub Desktop.
[in_array() in PHP] #Tricky
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$arr = ['123-123-123', '111-111-111']; | |
$a = 123; | |
var_dump(in_array($a, $arr)); // true | |
var_dump(in_array($a, $arr, true)); // false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment