Tagged “php”
-
TIL how NGINX knows to look for index.html vs index.php servers nginx php
What happens when visitor hits /foo/bar URL?
-
TIL php-fpm php webdev servers
PHP runs as a separated service when using PHP-FPM. By using this PHP version as language interpreter, requests are processed through a TCP/IP socket; so that the Nginx web server only handles the HTTP requests and PHP-FPM interprets the PHP code. The fact of having two separate services is key for increasing efficiency.
-
TIL the difference between single-threaded & multi-threaded architecture php javascript performance
For web dev, we don't need it. We're not bottle-necked by the processing power. We're instead bottlenecked by the ability to read files/databases. We can simulate multi-threading (and improve our app's performance) using async/await.
-
TIL HTTP "No-cache" headers cache server php apache
Using PHP and apache .htaccess file to force reload
-
TIL Never deserializing untrusted data php security vulnerability json
This happened the most in PHP, because for some reason, PHP developers love to serialize/deserialize objects instead of using JSON, but I’d say almost every case we saw where a server was deserializing a client object and parsing it led to a horrible exploit.
-
TIL match expression (like switch) php clean-code
Use the match($var) method to filter the results to exactly what you want.
-
TIL Optional Chaining in PHP8 php js
Optional Chaining in PHP looks very similar to optional chaining in JS
-
TIL the difference of Closures in Javascript vs PHP php javascript closure
I never knew PHP and Javascript closures were different.
-
TIL an easy way to populate an data array php javascript
Bonus - I just had to do this in PHP as well, so you get TWO languages for the price of one TIL!
-
TIL that PHP has an abandoned Gender Library php lolz
This extension, in short, tries to guess the gender of first names.
-
TIL How to Summon WordPress in random PHP files wordpress php
How to use WordPress Helper functions outside of WordPress
-
TIL about how to quickly add a WP Theme customizer Option wordpress php
You can do a lot of theme customization that auto-loads the page with every setting change. It's a really nice feature.
-
TIL how to get WordPress functions working in VSCode vscode php
Right out of the box, PHP Intelephense Extension for VSCode will give errors for WordPress code. How to fix.
-
TIL About various ways to declare WP Options/Settings Page wordpress php
After a lot of research, I found two approaches for writing WP option pages with code.
See all tags.