PHP string Unicode encoding and correct truncation method

When PHP and other languages call each other to transfer data, we often encounter the problem of string coding. For example, I recently developed an RPC service using go language. When PHP is used as the client call, JSON is used for the transmitted object data_ Encode for serialization, Source string: > Test 41 > {"json":['test json te ...

Posted by kaitan on Sat, 18 Dec 2021 16:44:41 +0100

Configuration in Sysctl in Kuberntes (PHP FPM concurrency can only be 300)

Background: Deploy applications in kubernetes cluster and conduct stress testing on applications. jmeter's stress test is about 300 requests per second (18000 requests are collected in elasticsearch every minute). Check the log with nginx's error log: ​ But my cpu memory resources are not full. Through the search engine, it is found that the ...

Posted by rxero on Sat, 18 Dec 2021 02:26:57 +0100

nginx of lnmp architecture

What is lnmp architecture LNMP refers to a group of free software acronyms commonly used together to run dynamic websites or servers L refers to Linux, N refers to Nginx, M generally refers to MySQL, MariaDB, P generally refers to PHP, Perl or Python LNMP represents the website server architecture of Nginx+MySQL+PHP under Linux system L ...

Posted by dino345 on Fri, 17 Dec 2021 00:18:18 +0100

Using select and poll/epoll of IO multiplexing to talk about network chat room

IO multiplexing: The IO multiplexing model is based on the demultiplexing function select provided by the kernel. Using the select function can avoid the problem of polling and waiting in the synchronous non blocking IO model. select This function is used to monitor the change of file descriptor - read / write or exception Parameters ...

Posted by kaszu on Thu, 16 Dec 2021 22:18:45 +0100

Docker compose build Lnmp environment (with dockerfile download)

preface Compose is a tool for defining and running multi container Docker applications. With compose, you can use the YML file to configure all the services required by your application. Then, with one command, you can create and start all services from the YML configuration file. As a PHP developer, Lnmp environment is often where we work an ...

Posted by MercuryBlue on Thu, 16 Dec 2021 12:49:55 +0100

Learn an extension Taint for detecting dangerous functions in PHP

In daily development, security has always been one of the key contents we want to study. In security, the most important point is our input data. All attacks and ultra vires occur from a inadvertently left request vulnerability. Of course, many frameworks have solved most of the security problems for us, but there are always unexpected places w ...

Posted by atokatim on Tue, 14 Dec 2021 04:43:17 +0100

After learning Python, what projects can you practice?

Many friends asked me if there were any good projects to practice after learning Python.In fact, projects are mainly based on needs. But for a beginner, many complex projects cannot be completed independently, so the blogger chose a project that is very suitable for beginners. The content is not very complex, but it is very interesting. I belie ...

Posted by Eric_Ryk on Fri, 10 Dec 2021 08:12:18 +0100

PHP8. enum analysis of 1

PHP8. After the release, there are many things to pay attention to in an enumenum is basically a restricted class. Let's look at its syntax firstenum_declaration_statement: T_ENUM { $<num>$ = CG(zend_lineno); } T_STRING enum_backing_type implements_list backup_doc_comment '{' class_statement_list '}' { $$ = zen ...

Posted by neoboffins on Thu, 09 Dec 2021 07:53:07 +0100

A joint encryption solution using RSA asymmetric encryption and AES symmetric encryption and process recovery

        With the development of the Internet environment, a series of security problems caused by network security problems will lead to the disclosure of trade secrets, economic losses of enterprises / individuals, and even cyber crime, or endanger national security.         In the current development ...

Posted by immunity on Wed, 08 Dec 2021 09:59:28 +0100

You should now start using the 10 PHP 8.1 features

PHP 8.1 is now available with new features and performance improvements -- the most exciting is the new JIT compiler. It was recently released on November 25, 2021. I'll demonstrate in detail the top 10 features provided by PHP 8.1 so that you can start using them in your projects and improve your PHP experience. Beginners and experienced deve ...

Posted by icecube on Mon, 06 Dec 2021 19:50:12 +0100