This story was told by my colleague. She had a CentOS 7 server with a bunch of WordPress installations, and she needed to update them all. She obviously did not want to do that manually and preferred to use wp-cli.
How Slow Are C++ Exceptions?
In Systematic Error Handling in C++ Andrei Alexandrescu claims that C++ exceptions are very slow. And though I have no doubts because I know the internals of exception handling, it is interesting to see some proofs yourself by benchmarking how fast or slow exceptions are.
How to Get the Source of an Uncaught Exception in C++
Sometimes, unexpected things happen. Your program throws an unexpected exception, which is caught by the framework, which loudly complains but provides no hints as to where this happened. You need to find the source of the exception, and this article will explain one of the possible ways to do that.
PHP Extensions: How to Make make Rebuild Dependencies Correctly
One of the things I hate in the PHP Build System is that Makefile‘s it generates cannot handle the cases when a header file changes. In a perfect world, any change to a header file would cause all files depending
PHP Extensions and C++
This article describes some gotchas you may face if you need to use C++ in your extension.
PHP: call_user_func_array vs Dynamic Call
PHP 5.6 introduced the splat operator, which unpacks arrays or objects implementing Traversable interfaces into argument lists. Its most evident application is to call functions without having to resort to call_user_func_array(). So, which method is faster?
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.
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.
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.
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.