Skip to content

Instantly share code, notes, and snippets.

View mente's full-sized avatar

Alex Vasilenko mente

View GitHub Profile
@mente
mente / config.log
Created January 27, 2015 00:43
drbd-utils 8.9.2rc2 compilation
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by DRBD configure 8.9.2rc2, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ ./configure --prefix=/usr --without-83support --with-pacemaker
## --------- ##
## Platform. ##
@mente
mente / _script.php
Created July 13, 2015 14:37
Testing "array soft-copy" in PHP5.6
<?php
$byValue = function (array $value) {
$z = $value[2];
};
$byValueWrite = function (array $value) {
$value[] = 1;
array_pop($value);
};
@mente
mente / igbinary_reproduce.php
Last active October 6, 2016 18:02
igbinary segfault reproduce on php7
<?php
$result = [];
for ($i = 0; $i < 40; $i++) {
$inner = new stdClass;
$inner->a = $i % 25;
$result[0][$inner->a][$i] = $inner;
$result[1][] = $inner;
}
@mente
mente / prophecy-reproduce.php
Created October 18, 2016 20:24
Reproduce of phpunit not asserting expectations of prophecy mocks created in data provider
<?php
class RandomClassWithMock
{
public function methodToMock()
{
return 42;
}
}