This file contains hidden or 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 | |
/** | |
* Class UnsafeClientIpProvider | |
*/ | |
class UnsafeClientIpProvider | |
{ | |
/** | |
* @var array |
This file contains hidden or 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 | |
//answer for https://www.testdome.com/questions/php/file-owners/11840?visibility=17&skillId=5 | |
class FileOwners | |
{ | |
public static function groupByOwners($files) | |
{ | |
$result=array(); | |
foreach($files as $key=>$value) | |
{ | |
$result[$value][]=$key; |
This file contains hidden or 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 dias_feriados($ano = null) | |
{ | |
if (empty($ano)) { | |
$ano = intval(date('Y')); | |
} | |
$pascoa = easter_date($ano); // Limite de 1970 ou após 2037 da easter_date PHP consulta http://www.php.net/manual/pt_BR/function.easter-date.php | |
$dia_pascoa = date('j', $pascoa); |