PHP Foreach Loop Benchmark – Optimize your code & Keep the server happy!

Keep the internet as energy efficient as possible and the easiest ways to reduce your carbon footprint is to optimize your code. The future of humanity and the planet is in your hands! The execution speed is very clear from the image below, each variant is sorted according to the speed of execution, the first […]

PHP Useful

Get HTTP Status Code – PHP Functions

Below are some useful solutions (php functions) for HTTP Status Codes returned in the required page header by servers when loading a web page. global $http_status_code; $http_status_code = [ // ~~~ officially known https codes 100 => ‘Continue’, 101 => ‘Switching Protocols’, 102 => ‘Processing’, // WebDAV; RFC 2518 103 => ‘Early Hints’, // RFC 8297 […]


Common HTTP response status codes

200 OK The request has succeeded and depends on the HTTP method (The most common response code): GET: the resource has been fetched & is transmitted in the message body. HEAD: the entity headers are in the message body. POST/PUT: result of the action is transmitted in the message body. 201 Created Is typically the […]