Simple and safe random getters to copy-paste
string randomBytes( int $length )
int randomInt ( int $min , int $max )
string randomUuid ( void )| xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
| Starting BigCrush Starting BigCrush | |
| Version: TestU01 1.2.3 Version: TestU01 1.2.3 | |
| xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
| *********************************************************** *********************************************************** | |
| Test smarsa_SerialOver calling smultin_MultinomialOver Test smarsa_SerialOver calling smultin_MultinomialOver | |
| *********************************************************** *********************************************************** |
| <?php | |
| $a = [1, 3]; | |
| foreach ($a as $v) { | |
| var_dump($v); | |
| $a[1] = 9; | |
| } |
| --- | |
| - name: Add APT repo key | |
| apt_key: | |
| url: "https://download.newrelic.com/548C16BF.gpg" | |
| id: "548C16BF" | |
| state: "present" | |
| - name: Add APT repo | |
| apt_repository: |
The implementation of mt_rand() has changed in PHP 7.1.0beta1
Among other things, bugs #71152 and #45184 were fixed.
I ran the output through this version of dieharder and this version of PractRand. It is hard to test a PHP binary with TestU01 because it has no facility to accept input from stdin.
| <?php | |
| /** | |
| * A global Persister "static" class isolates the location of any persistence logic from its users. | |
| * In this example, persitence logic for UserMovieRating objects is located in this class but it | |
| * could be moved around ad hoc. | |
| */ | |
| class Persister | |
| { | |
| private static function _UserMovieRatingSave(UserMovieRating $object) |
| <?php | |
| function slug(string $string, int $width = 100) : string | |
| { | |
| $string = Normalizer::normalize($string); | |
| $string = trim(preg_replace('/[^\pL\p{Nd}]+/u', ' ', $string)); | |
| $string = strtr($string, ' ', '-'); | |
| return mb_strimwidth($string, 0, $width, '', 'UTF-8'); |
| create table t ( | |
| id int primary key, | |
| r_id int, | |
| c tinyint(1) default 0 | |
| ); | |
| create table r ( | |
| id int primary key, | |
| c tinyint(1) default 0 |
| <?php | |
| namespace v2\helpers; | |
| use yii\helpers\Console; | |
| /** | |
| * Error code constane names, values, and descriptions are taken from | |
| * OpenBSD's sysexits(3) man page http://man.openbsd.org/sysexits | |
| */ |
The custom web application My App, in addition to its web server request-driven work, has three daemons (able, baker and charlie) and three jobs (dog, easy and fox) that run (cron-like) on a pre-defined schedule.