Bangkejia (www.Bkjia.com) tutorialToday a netizen sent me an email asking me that it has opened a php extension. The release version can run, but this The debug version cannot be run.
In fact, the basic principle is very simple. The core of PHP is in php5ts.dll. If you are using the debug version, you must call php5ts_debug.dll. This dll is not officially provided by PHP, but you can get it by recompiling PHP. Of course, recompiling PHP is a difficult task under Windows.
Also, the php.exe file must also be a debug version, otherwise the following error will be reported:
以下为引用的内容: PHP Warning: PHP Startup: vehicles: Unable to initialize module Module compiled with module API=20060613, debug=1, thread-safety=1 PHP compiled with module API=20060613, debug=0, thread-safety=1 These options need to match |
Friends who develop PHP extensions must pay attention.
Also, by the way, why is it that PHP is obviously slower than Java, but many times when the same function is written on a web page, PHP is faster? It is very simple. PHP functions are written in C. Sometimes , a lot of logic and operations are encapsulated inside. Therefore, PHP displays faster.
For example, try PHP's word segmentation expansion and Java's word segmentation software. They are also imitated by the Chinese Academy of Sciences' word segmentation. The algorithms are basically the same. It takes about 5s for Java to load the dictionary, while the PHP extension written in C only takes about 0.5s. Therefore, if you want to develop enterprise-level applications, friends who study PHP, it is still beneficial to learn some C extension knowledge. Of course, the basics of C language should be better.