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 | |
abstract class Lorem { | |
public static function paragraphs($nparagraphs) { | |
$paragraphs = []; | |
for($p = 0; $p < $nparagraphs; ++$p) { | |
$nsentences = random_int(3, 8); | |
$sentences = []; | |
for($s = 0; $s < $nsentences; ++$s) { | |
$frags = []; |
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 | |
function generateRandomString($length = 10) { | |
$characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
$charactersLength = strlen($characters); | |
$randomString = ''; | |
for ($i = 0; $i < $length; $i++) { | |
$randomString .= $characters[rand(0, $charactersLength - 1)]; | |
} | |
return $randomString; | |
} |
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 | |
function minifier($code) { | |
$search = array( | |
// Remove whitespaces after tags | |
'/\>[^\S ]+/s', | |
// Remove whitespaces before tags | |
'/[^\S ]+\</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
<?xml version="1.0" encoding="UTF-8" ?> | |
<!DOCTYPE html> | |
<html b:css='false' b:defaultwidgetversion='2' b:layoutsVersion='3' b:responsive='true' b:templateUrl='indie.xml' b:templateVersion='1.3.0' expr:dir='data:blog.languageDirection' expr:lang='data:blog.locale.language' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'> | |
<b:attr name='xmlns' value=''/> | |
<b:attr name='xmlns:b' value=''/> | |
<b:attr name='xmlns:expr' value=''/> | |
<b:attr name='xmlns:data' value=''/> | |
<!-- |