Wild Wild Wolf

Developer. Because Superhero is not an official job title.

Menu

Uncategorized

PHP: A Good Algorithm Is Not Always Better

PHP: A Good Algorithm Is Not Always Better

I was looking how to improve performance of Slim’s Http\Cookies::parseHeader() function: as a C developer I find it rather non-optimal because it uses regular expressions and excessive memory allocations. I wondered it it is possible to use the same optimizations that I would use in C and if it gives any benefit.

wwa May 9, 2018May 22, 2018 Uncategorized No Comments Read more

Eclipse Can Break Your Code

Eclipse Can Break Your Code

I have spent an hour today debugging a weird issue: PHPUnit complained that it tried to call an undefined function PHPUnit\Framework\Assert\assertEquals(). Because right now I am working with custom PHP extensions, I suspected that my code somehow corrupted PHP’s internal data structures. But reality prepared me a surprise.

wwa May 7, 2018May 7, 2018 Uncategorized No Comments Read more

One More Bug in PHP

One More Bug in PHP

For the second time in a row, I find a bug in PHP. This time PHP segfaults due to memory corruption during the request shutdown phase.

wwa May 5, 2018May 5, 2018 Uncategorized No Comments Read more

Found yet Another Memory Leak in PHP

Found yet Another Memory Leak in PHP

When testing your own PHP extensions, it is very important not to miss any memory leaks. Wherever Valgrind shows a memory leak, you need to check your code for bugs. However, sometimes you can find a memory leak in the PHP Core.

wwa May 5, 2018May 22, 2018 Uncategorized No Comments Read more

PHP 7.2 and Valgrind

PHP 7.2 and Valgrind

When `valgrind php` shows lots of errors like “Conditional jump or move depends on uninitialised value(s)”, chances are that the PHP and PCRE extension were built without Valgrind support.

wwa May 4, 2018May 5, 2018 Uncategorized No Comments Read more

How To: Integrate LCov with PHPUnit to Test PHP Extensions

How To: Integrate LCov with PHPUnit to Test PHP Extensions

When writing or debugging PHP extensions, it is very useful to have test coverage. It is also very interesting to know what test covers which files, similar to what PHPUnit generates for PHP.

wwa May 3, 2018May 3, 2018 Uncategorized No Comments Read more

Performance in PHP: Pimple Container

Performance in PHP: Pimple Container

From time to time you have to deal with someone else’s code. And the code you have to deal with sometimes surprises you. For example, Pimple, a small Dependency Injection Container for PHP; recent versions of which, according to README, are more focused on performance. Learning something new is always interesting and sometimes funny, and therefore I started to read the code.

wwa May 2, 2018May 2, 2018 Uncategorized No Comments Read more
  • Next »

Recent Posts

  • SQL Diff Using SQLite Session API
  • How to Enforce Read-Only Mounting of USB Drives
  • How to Make System Logs Append-Only
  • Yoast SEO: How to Use a Custom Stylesheet for Sitemaps
  • Newer Is Not Necessarily Better: Updated Yoast SEO to 8.3

Recent Comments

    Archives

    • November 2018
    • October 2018
    • September 2018
    • August 2018
    • July 2018
    • June 2018
    • May 2018

    Categories

    • Random Thoughts
    • Server Administration
    • Uncategorized

    Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
    Copyright © 2019 Wild Wild Wolf. Powered by WordPress. Theme: Spacious by ThemeGrill.