Skip to content

Instantly share code, notes, and snippets.

View 3F's full-sized avatar
🗃️
⏳ . . .

Denis Kuzmin 3F

🗃️
⏳ . . .
View GitHub Profile
@3F
3F / gist:8863945
Created February 7, 2014 14:48
PHP Generators. e.g.: getSymbol
$str = "learning trails provide you with everything you need to..";
foreach(Util::getSymbol($str, 0) as $cur){
echo Util::charToHex($cur); // 6C6561726E696E672074...
}
...
/**
* @param string $str
* @param int $start
@3F
3F / gist:8357145
Last active January 2, 2016 20:29
Java7, PHP 5.5, C++, C# .NET 4 :: Properties & Methods / LSP
// Java
/* *** test1 *** */
class A
{
public String p = "from A";
public String m()
{
return this.p;
}
@3F
3F / gist:8355262
Created January 10, 2014 14:39
Java7 & PHP 5.5. LSP / properties & methods
/* **** JAVA ******************************** */
class A
{
public String p = "from A";
public String m()
{
return this.p; // or simple p
}
}