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 ImageEditor { | |
static public function | |
MakeImageSquare(Imagick $Image, int $Square): | |
Imagick { | |
// $Image->CropThumbnailImage($Square,$Square); | |
// this method has a terrible habit of breaking every 3rd release. |
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
Function DoSomeShit(Actor Who) | |
{do some shit with the specified actor. } | |
If(Who == None) | |
Who = Game.GetPlayer() | |
EndIf | |
;; ... | |
Return |
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 | |
/* | |
C:\Users\bob\Desktop>php plzwait.php | |
1450303435.52 | |
1450303436.0004 | |
*/ | |
function WaitForPerigee() { | |
// wait until the last possible moment so that we have as much of the |
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 | |
public function | |
OnConstruct() { | |
$this->Get->Page(function(int $p):int { | |
if($p < 1) return 1; | |
else return $p; | |
}); | |
return; |
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 | |
public function | |
QueryBlender(array $Input): string { | |
/*// | |
use the QueryMerger to output a final string of the merged query. | |
//*/ | |
return http_build_query($this->QueryMerger($Input)); |
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 Whatevs { | |
public function | |
__ToString() { | |
/*// | |
try to generate the string we need, else show a fallback. | |
//*/ |
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 | |
/*// | |
this comparing two methods of writing templates. i was indecisive about which | |
style i should use when using datastore capable objects in templates. to decide | |
which way i like i decided to let the numbers speak for themselves. | |
so we have this datastore and to dump it into an html template takes 3 lines of | |
code regardless of which way i do it. |
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
<div> | |
<?php if($Shits): ?> | |
<ul> | |
<?php foreach($Shits as $Shit): ?> | |
<li><?php echo $Shit ?></li> | |
<?php endforeach; ?> | |
</ul> | |
<?php else: ?> | |
<div>Aint No Shit</div> | |
<?php endif; ?> |
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
<ul class="TextAlignCenter"> | |
<?php $element->Items->Each(function($Value){ ?> | |
<li><?php echo $Value->Name ?></li> | |
<?php }); ?> | |
</ul> |
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
function Whatever() { | |
return <<< EOF | |
<div class="All"> | |
<div class="OfThe"> | |
HTML | |
</div> | |
</div> | |
EOF; |