Note: The results of this function are cached. See clearstatcache() for more details.php.net/manual/en/function.is-file.php
$website = "https://api.telegram.org/bot".$botToken;
$update = file_get_contents($website);
$update = json_decode($update, TRUE);
print_r($update);
Как мы сложную задачу разбиваем на маленькие, которые легко решить, так же эти элементы необходимо отделить друг от другаДля этого используются пространства имён.
string date ( string $format [, int $timestamp = time() ] )
$first = DateTime::createFromFormat('d.m.Y', '01.01.2016');
$second = DateTime::createFromFormat('d.m.Y', '25.12.2015');
var_dump($first < $second);
var_dump(strtotime('01.01.2016') < strtotime('25.12.2015'));
public function __get($name) {
return $this->objects[$name];
}
$obj = [
'a' => function(){ return 1; },
'b' => [
'ba' => function(){ return 2; },
'bb' => [
'bba' => function(){ return 3; }
]
]
];
$obj['a']();
$obj['b']['ba']();
$obj['b']['bb']['bba']();
знаю что есть mb_substr, но не буду же я везде менять эту функцию, так?Ну, если не будете - mbstring.func_overload.
The + operator returns the right-hand array appended to the left-hand array; for keys that exist in both arrays, the elements from the left-hand array will be used, and the matching elements from the right-hand array will be ignored.www.php.net/manual/en/language.operators.array.php
$subject = "яблоко красное и [зеленое] яблоко и еще [одно] красное яблоко и [еще] одно яблоко, зеленое";
$pattern = '/\[(.+?)\]/';
preg_match_all($pattern, substr($subject,3), $matches);
print_r($matches);
W - ISO-8601 week number of year, weeks starting on Monday (added in PHP 4.1.0)
o - ISO-8601 year number. This has the same value as Y, except that if the ISO week number (W) belongs to the previous or next year, that year is used instead. (added in PHP 5.1.0)