跳到主要内容

PHP

打印日志 var_dump、print_r

isset

函数用于检测变量是否已设置并且非 NULL。

if (isset($A->id)) {
$B->id = $A->id;
}

. 连接符

$suggestions = 'page__' . $wxt_active;

array

$node_admin_paths = array('node/*/edit', 'node/add', 'node/add/*', 'node/*/extend_review_date');

array_merge

array_merge($A, $B);

array_filter

$match = array_filter(
$array,
function ($A) use ($B) {
return $A->getId() == $B;
}
);

array_pop

array_pop($match);

foreach

foreach ($node_admin_paths as $node_admin_path) {
if (drupal_match_path(current_path(), $node_admin_path)) {
$replace_jquery = FALSE;
}
}

strtotime

将英文文本日期时间解析为 Unix 时间戳

strtotime("+5 hours")