This is only a summary. For a full list of changes see the NEWS file.
Feature | RFC / announcement | Author |
---|---|---|
Bundled ZendOptimizer+ as OPcache | https://wiki.php.net/rfc/optimizerplus | zeev |
This is only a summary. For a full list of changes see the NEWS file.
Feature | RFC / announcement | Author |
---|---|---|
Bundled ZendOptimizer+ as OPcache | https://wiki.php.net/rfc/optimizerplus | zeev |
<?php | |
class AdminerColors | |
{ | |
function head() | |
{ | |
static $colors = array( | |
'127.0.0.1' => '#ED1C24', | |
'localhost' => '#009245', |
var MultiGetSet = function(opt){ | |
var getType = function(o) { | |
return ({}).toString.call(o).match(/\s([a-zA-Z]+)/)[1].toLowerCase() | |
}; | |
if(!opt.public || !opt.private) | |
return opt.public; | |
if(opt.handler && opt.handler.init) |
<?php | |
/** | |
* @author Filip Procházka <filip@prochazka.su> | |
*/ | |
abstract class BasePresenter extends Nette\Application\UI\Presenter | |
{ | |
/** | |
* @var \Img\ImagePipe |
<?php | |
use Nette\Latte\Compiler; | |
use Nette\Latte\MacroNode; | |
use Nette\Latte\PhpWriter; | |
class Macros extends \Nette\Latte\Macros\MacroSet { | |
public static function install(Compiler $compiler) { |
<?php | |
use Atrox\Matcher; | |
use Atrox\Curl; | |
use Atrox\Async; | |
$userListMatcher = Matcher::multi('//table[@class="ui-table-list"]//tr', (object) [ | |
'url' => Matcher::single('td/a/@href')->map(function ($x) { return "http://www.csfd.cz$x"; }), | |
'points' => Matcher::single('td[3]')->asInt(), | |
'ratings' => Matcher::single('td[4]')->asInt(), |
<?php | |
ob_start(function($s, $flag) { | |
if ($flag & PHP_OUTPUT_HANDLER_START) { | |
$e = new \Exception; | |
$s = nl2br("Output started here:\n{$e->getTraceAsString()}\n\n") . $s; | |
} | |
return $s; | |
}, 2); |
<?php | |
class Keys { | |
const KEY_NULL = "\xEE\x80\x80"; | |
const KEY_CANCEL = "\xEE\x80\x81"; | |
const KEY_HELP = "\xEE\x80\x82"; | |
const KEY_BACKSPACE = "\xEE\x80\x83"; | |
const KEY_TAB = "\xEE\x80\x84"; | |
const KEY_CLEAR = "\xEE\x80\x85"; | |
const KEY_RETURN = "\xEE\x80\x86"; | |
const KEY_ENTER = "\xEE\x80\x87"; |
On GitHub I provide example or Cooperative Multitasking components on a single site served by Nette Framework. These components need to process several network requests to render themselves, which is normally slow.
This example takes advantage of yield operator (available since PHP 5.5) to switch between tasks, Flow as scheduler and Rect as parallel http client.
This post introduces the Flow framework and cooperative multitasking in general.
// push new URL into GA pageview tracker | |
$.nette.ext('ga', { | |
success: function (payload) { | |
if (payload.url) { | |
_gaq.push(['_trackPageview', payload.url]); | |
} | |
} | |
}); |