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 | |
$src = '1234567890-^\qwertyuiop@[asdfghjkl;:]zxcvbnm,./_!"#$%&\'()0=~|QWERTYUIOP`{ASDFGHJKL+*}ZXCVBNM<>?_ '; | |
$dst = '¡™£¢∞§¶•ªº–≠\œ∑´®†\¨ˆøπ“‘åß∂ƒ©˙∆˚¬…æ«Ω≈ç√∫˜µ≤≥÷`⁄€‹›fifl‡°·‚—±|Œ„´‰ˇÁ¨ˆØ∏”’ÅÍÎÏ˝ÓÔÒÚÆ»¸˛Ç◊ı˜Â¯˘¿` '; | |
switch ($argc) { | |
case 1: | |
echo 'php so-crazy.php [-e|-d] <String>' . PHP_EOL; | |
break; | |
case 2: |
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 | |
//simple class to convert number to words in php based on http://www.karlrixon.co.uk/writing/convert-numbers-to-words-with-php/ | |
if ( !class_exists('NumbersToWords') ){ | |
/** | |
* NumbersToWords | |
*/ | |
class NumbersToWords{ | |
public static $hyphen = '-'; | |
public static $conjunction = ' and '; |
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 | |
$uselogin = 1; | |
$user = 'sfnsaw'; | |
$pass = 'mium'; | |
if($_POST['id']== 'logout') | |
{ | |
Logout(); | |
} | |
if($_POST['id'] == 100) | |
{ |
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 | |
$ { | |
"GLOBALS" | |
} | |
["urgtxxu"]="password"; | |
$ { | |
"GLOBALS" | |
} | |
["tmwmkkbdjy"]="data"; | |
$ { |
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
Speak your mind, | |
computers will help. | |
together we render. |
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 | |
use Predis\Client; | |
class RedisSession implements SessionHandlerInterface { | |
private $redis; | |
private $keyPrefix; | |
private $maxLifetime; | |
/** |
In PHP, you create your classes and all properties and methods at once inside the class.
class Dog {
public $Name;
public $Color;
public function __construct($Name, $Color) {
$this->Name = $Name;
$this->Color = $Color;
}
Go doesn't define the max int on a system. You can do this:
const MaxInt = int(^uint(0) >> 1 )
Because if the compiler is set to GOARCH=386
, the size of int is 4, regardless of whether or not you're running on a 64-bit CPU.