Skip to content

Instantly share code, notes, and snippets.

View WoZ's full-sized avatar

Dmitry Menshikov WoZ

View GitHub Profile
@WoZ
WoZ / gist:1810148
Created February 12, 2012 18:40 — forked from anonymous/gist:1810066
<?php
// ниже пример, когда существенно превышает длина строки 80 символов
// тут строка короче, но смысл тот же
// Вариант 1
if (! $memcache->waitForUnlock($mKey)
|| ! $b0 = $memcache->get($mKey)
) {
$memcache->log("$mKey unlocked but cache is empty");
$b0 = null;
<?php
// По стандарту так
echo strtr($summaryText, array(
'{start}' => $start,
'{end}' => $end,
'{count}' => $total,
'{page}' => $pagination->currentPage + 1,
'{pages}' => $pagination->pageCount,
));