Skip to content

Instantly share code, notes, and snippets.

View edorian's full-sized avatar

Volker Dusch edorian

View GitHub Profile
php-8.5.0RC2.tar.bz2
SHA256 hash: 850dda2016231d27fc33bbc13c26e9957ec9aa1dae7aefb3eaf75cba4eb9aa71
PGP signature:
-----BEGIN PGP SIGNATURE-----
iHUEABYKAB0WIQRJ2a9rxyqA1mkXGciqI/W+nHCX1AUCaOUNVwAKCRCqI/W+nHCX
1KbeAP4qN1AfEmihf6GfxKnZWztNggv4akmEOWZzFMcVKwTyrwD/fuuOtfvfGJdx
OC9d0UqAsNDc6xwmK4f7kQk1oT4IlQs=
=CZm9
-----END PGP SIGNATURE-----
php-8.5.0beta3.tar.bz2
SHA256 hash: 897593d9fe0f5f6dd782e1e187323c407ef937a9e860e3552d3548621c260cc8
PGP signature:
-----BEGIN PGP SIGNATURE-----
iHUEABYKAB0WIQRJ2a9rxyqA1mkXGciqI/W+nHCX1AUCaMAPmQAKCRCqI/W+nHCX
1EHJAP9tq14E2ZDzhfroUroIUIli7dIwIHhomHZIrm0Mc/K7OwEAtV5OP1TH7LQ5
Wtvctgo4MPdaljPi0LKb/ysEFG9HJAU=
=QkG7
-----END PGP SIGNATURE-----
php-8.5.0beta1.tar.bz2
SHA256 hash: 3b9712d3dc33c05271c02c23b7edcfd86651660d7aa3b10e912597c8f35ab1a2
PGP signature:
-----BEGIN PGP SIGNATURE-----
iHUEABYKAB0WIQRJ2a9rxyqA1mkXGciqI/W+nHCX1AUCaJtSFwAKCRCqI/W+nHCX
1DrLAP4+qXIX2y255F/GL+ooriDf8919heSFuuosAH0PIaRxMgEA94mmtCMJDE8J
sZQsjdBhcMGCcHHbU1y4Yh9DBVC/xgg=
=SzVp
-----END PGP SIGNATURE-----
php-8.5.0alpha2.tar.bz2
SHA256 hash: 3394e354cb8f7757bba10d666504d7b1b6e74fd2ed623cd6a1580408c85e5fcb
PGP signature:
-----BEGIN PGP SIGNATURE-----
iHUEABYKAB0WIQRJ2a9rxyqA1mkXGciqI/W+nHCX1AUCaHZFwgAKCRCqI/W+nHCX
1PbFAP9x/zjXXJ9vFq0gBl0p5Gqbj8TA5+Xw1QaYsdGUB7+EgAEAiVnyWOr4Ljw3
2a+Awortili0hq5Dnoe4xoqX+ltkSQE=
=/kak
-----END PGP SIGNATURE-----
@edorian
edorian / extract.php
Last active February 6, 2025 17:51
Extract programm listings from php-doc-en
<?php
extractProgramListings($_SERVER['argv'][1]);
function extractProgramListings($path) {
if (is_file($path)) {
$files = [$path];
} else {
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path));
}
@edorian
edorian / download.js
Created June 3, 2024 11:36
GitHub container registry download numbers
// Extract data for the "last 30 day downloads" svg
svg = document.querySelector('#repo-content-turbo-frame > div > div > div > div.d-flex.flex-column.flex-md-row.mt-n1.mt-2.gutter-condensed.gutter-lg.flex-column > div.col-12.col-md-3.flex-shrink-0 > div:nth-child(3) > div.container-lg.my-3.d-flex.clearfix > div.lh-condensed.d-inline-flex.flex-column.flex-items-baseline.tooltipped.tooltipped-s.mt-3 > svg');
rows = [];
svg.childNodes.forEach((element) => {
if(element.tagName === 'rect') {
rows.push([element.getAttribute('data-date'), element.getAttribute('data-merge-count')]);
}
});
@edorian
edorian / blog.md
Last active February 10, 2023 13:43
PHP Prozess hanging in curl when using Guzzle or Symfony HttpClient

PHP Prozess hanging in curl when using Guzzle or Symfony HttpClient

A couple of month ago we ran into an issue with hanging PHP processes during/after HTTP calls.

Today another friend of mine ran into that issue, so here some notes in the hopes that this might be helpful to someone :)

Diagnose

strace the hanging process and see if it hangs in rt_sigaction

Reading symbols from /usr/sbin/apache2...Reading symbols from /usr/lib/debug/.build-id/e7/c779eae1fb3fd9eaed94cc75d596e785bc121f.debug...done.
done.
[New LWP 7136]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/sbin/apache2 -k start'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f00c236f000 in _emalloc () from /usr/lib/apache2/modules/libphp7.2.so
(gdb) bt
#0 0x00007f00c236f000 in _emalloc () from /usr/lib/apache2/modules/libphp7.2.so
@edorian
edorian / fizzBuzzGen.php
Created June 28, 2018 18:08
step() feels very inelegant
<?php
$fizz = function() {
while(true) {
yield '';
yield '';
yield 'Fizz';
}
};
@edorian
edorian / BaseTest.php
Created May 22, 2018 16:18
PHPCS integration testing
<?php
use PHPUnit\Framework\TestCase;
abstract class BaseTest extends TestCase {
public function testSniff() {
$sniff = substr(get_class($this), 0, -4);
$output = [];
$phpcs = __DIR__ . '/../../vendor/bin/phpcs';