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 | |
function justIntegers($val) { | |
return is_int($val); | |
} | |
$array = ['a', 1, 'b', 2]; | |
print_r(array_filter($array, "justIntegers")); |
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
;; Added by Package.el. This must come before configurations of | |
;; installed packages. Don't delete this line. If you don't want it, | |
;; just comment it out by adding a semicolon to the start of the line. | |
;; You may delete these explanatory comments. | |
(package-initialize) | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. |
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
// attempt to find the user with the given FQML global ID | |
$user = User::findByIdentifier($employee->FqmlGlobalId); | |
// ... | |
// If there is no user found | |
if (!($user instanceof User)) { | |
$user = new User(); | |
$user->fqml_global_id = $employee->FqmlGlobalId; |