This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class DefaultDict extends ArrayObject | |
{ | |
private $ctor; | |
public function __construct($ctor, array $ary = []) | |
{ | |
if (is_array($ctor)) { | |
list($class, $method) = $ctor; | |
if (is_object($class)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . metadata -name .markers\* -print -delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/config.m4 b/config.m4 | |
index 90fa113..0941c28 100644 | |
--- a/config.m4 | |
+++ b/config.m4 | |
@@ -4,6 +4,8 @@ dnl | |
PHP_ARG_ENABLE(oauth, for oauth support, | |
[ --enable-oauth Include oauth support]) | |
+PHP_ARG_WITH(oauth-curl, for oauth cURL support, | |
+[ --with-oauth-curl[[=DIR]] cURL installation prefix], DEFAULT, no) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PHP_ARG_ENABLE(noglobals, for noglobals support, | |
[ --enable-noglobals Include noglobals support], | |
yes, yes) | |
PHP_NEW_EXTENSION(noglobals, noglobals.c, $ext_shared) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Generate a PBKDF2 key derivation of a supplied password | |
* | |
* This is a hash_pbkdf2() implementation for PHP versions 5.3 and 5.4. | |
* @link http://www.php.net/manual/en/function.hash-pbkdf2.php | |
* | |
* @param string $algo | |
* @param string $password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$str = 'password'; | |
$key = 'secret'; | |
function make_blowfish_salt($cost, $key) | |
{ | |
$length = ceil((22 - strlen($key)) * 3 / 4); | |
if ($length > 0) { | |
$rand = file_get_contents('/dev/urandom', false, null, 0, $length); | |
$b64 = base64_encode($rand); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
trait Interceptor | |
{ | |
public function before() | |
{ | |
echo "(before)\n"; | |
} | |
public function after() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// basic short anonymous function syntax like the blocks syntax of clang | |
$f = ^($arg){ var_dump($arg); }; | |
$f('Hello!'); | |
// without argument | |
$f = ^{ var_dump(__FUNCTION__); }; | |
$f(); | |
// with lexical variable(s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PLATFORM_DIR="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform" | |
SDK_DIR="$PLATFORM_DIR/Developer/SDKs/iPhoneOS6.1.sdk" | |
test -f Makefile && make distclean | |
if [ ! -f Zend/_Offsetof.h ]; then | |
cat > Zend/_Offsetof.h <<EOF | |
#ifndef _Offsetof |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/sql/mysqld.cc | |
+++ b/sql/mysqld.cc | |
@@ -6292,7 +6292,7 @@ | |
The connection was refused by TCP wrappers. | |
There are no details (by client IP) available to update the host_cache. | |
*/ | |
- statistic_increment(connection_tcpwrap_errors, &LOCK_status); | |
+ statistic_increment(connection_errors_tcpwrap, &LOCK_status); | |
continue; | |
} |