This file contains hidden or 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
BOØWYなのかBOΦWYなのか |
This file contains hidden or 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
via: http://php.net/ChangeLog-5.php | |
--------Version 5.3.8 | |
--------Version 5.3.7 | |
Upgraded bundled SQLite to version 3.7.7.1. (Scott) | |
Upgraded bundled PCRE to version 8.12. (Scott) | |
Updated crypt_blowfish to 1.2. (CVE-2011-2483) (Solar Designer) (more info) | |
Removed warning when argument of is_a() or is_subclass_of() is not a known class. (Stas) |
This file contains hidden or 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 | |
define('HASH_TYPE', 'sha256'); | |
define('HASH_STRETCH_COUNT', 1000); | |
$username = 'username'; | |
$password = 'password'; | |
var_dump( create_password($username, $password) ); | |
function create_password( $username, $password ) { | |
$salt = hash(HASH_TYPE, $username, true); |
This file contains hidden or 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 | |
function removeNulByte( $param ) { | |
if ( is_array( $param ) ) { | |
$buf = array(); | |
foreach( $param as $key => $val ) { | |
$buf[ removeNulByte($key) ] = removeNulByte( $val ); | |
} | |
return $buf; | |
} else if ( is_string( $param ) ) { |
This file contains hidden or 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
# 変換前(Tab)変換後 | |
愛 変 | |
曖 愛 | |
握 屋 | |
嵐 風 | |
安 女 | |
案 安 | |
野 里予 | |
村 木寸 | |
沙 シ少 |
This file contains hidden or 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 | |
$src = file_get_contents( 'http://www.nttdocomo.co.jp/service/developer/make/content/spec/useragent/' ); | |
$src = mb_convert_encoding( $src, 'UTF-8', 'SJIS-win' ); | |
preg_match_all( '/DoCoMo\/[12]\.\d(\s?)[\/a-zA-Z0-9\(\);\+]+/iu', $src, $matches ); | |
if ( ! count( $matches[0] ) ) { exit; } | |
foreach( $matches[0] as $useragent ) { | |
$flg = preg_match( '/\ADoCoMo\/2\.0.+c(\d+)/', $useragent, $m ) && (int)$m[1] >= 500 ? '○' : '×'; | |
echo "{$flg} {$useragent}\n"; | |
} |
This file contains hidden or 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 = 'abcd123'; | |
$reg = '/^abc/'; | |
if ( preg_match( $reg, $str ) ) { | |
echo 'match!'; | |
} |
This file contains hidden or 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
<button onclick="read()">取得してみる</button> | |
<div id="unkoelm"></div> | |
<script type="text/javascript"> | |
function read(){ | |
var scr = document.createElement('script'); | |
scr.type='application/javascript'; | |
scr.charset='utf-8'; | |
scr.src='https://api.twitter.com/1/help/configuration.json?callback=unko'; | |
document.body.appendChild(scr); | |
} |
This file contains hidden or 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 | |
function unko(&$param){ $param++; } | |
$func = 'unko'; | |
$param1 = 1; | |
$param2 = 1; | |
call_user_func($func, $param1); | |
call_user_func($func, $param1); | |
call_user_func($func, $param1); |
This file contains hidden or 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 Unko { | |
public function morasu( $name ) { | |
return "{$name}はうんこをもらす"; | |
} | |
} | |
$class = 'Unko'; | |
$obj = new $class; | |
echo $obj->morasu( 'お前' ); |