Skip to content

Instantly share code, notes, and snippets.

Nikita Popov nikic

Block or report user

Report or block nikic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nikic / gist:1188670
Created Sep 2, 2011 — forked from ircmaxell/gist:1188649
PHP example on variable variables - without needing them
View gist:1188670
function bar($a, $b, $c) {
foreach (compact('a', 'b', 'c') as $key => $value) {
$form[$key] = array(
'#type' => 'hidden',
'#value' => $value,
nikic / gist:4162505
Created Nov 28, 2012
Regex to validate (IPv4) CIDR notation (with capture)
View gist:4162505
View gist:04fce01e69ae5b7b44f8
require './vendor/autoload.php';
// The code samples to parse.
// => bool(false)
$code = '<?php class Foo {public $bar;}';
// => bool(true)
You can’t perform that action at this time.