note 43520 deleted from function.array-intersect by cmb
| From: | cmb@php.net | Date: | Sun, 09 Feb 2020 08:31:08 +0000 |
| Subject: | note 43520 deleted from function.array-intersect by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-214070@lists.php.net to get a copy of this message | ||
Note Submitter: tompittlik at disfinite dot net
----
Just a small mod to ben's code to make it work properly:
<?php
if(sort(array_unique($b + $a)) === sort($b))
// $a is legit
}
?>
This is useful for checking for illegal characters in a username.