1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

array_keys is probably faster

This commit is contained in:
Aidan Woods 2017-05-02 01:25:33 +01:00
parent 6d0156d707
commit e4bb12329e
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9

View File

@ -1530,9 +1530,9 @@ class Parsedown
}
}
$onEventAttributes = preg_grep('/^on/i', array_flip($Element['attributes']));
$onEventAttributeKeys = preg_grep('/^on/i', array_keys($Element['attributes']));
foreach ($onEventAttributes as $att)
foreach ($onEventAttributeKeys as $att)
{
unset($Element['attributes'][$att]);
}