“Top 100 PHP functions” is a list of the top 100 most frequently used PHP functions, from the analysis of the 1,900 open source projects.  If you are still learning PHP, this list is a good overview of what you’ll see the most in real life projects.
Category: Web work
These days, most of my work is very related to the online world. Building web sites, reviewing web applications, integrating with web services, coordinating people who are far away from each other, etc. Whenever I find a new tool or service or an innovative, interesting idea about working online, I share it in this category.
15 Tips to Enhance your Github Flow
“15 Tips to Enhance your Github Flow” has lots and lots of good advice for anyone working with GitHub. Tips vary from PR templates all the way to automated dependency management and updates. Really useful!
Capture and Report JavaScript Errors with window.onerror
“Capture and Report JavaScript Errors with window.onerror” tutorial shows an easy way to capture, log and troubleshoot client-side errors:
onerror
 is a special browser event that fires whenever an uncaught JavaScript errorhas been thrown. It’s one of the easiest ways to log client-side errors and report them to your servers. It’s also one of the major mechanisms by which Sentry’s client JavaScript integration (raven-js) works.
window.onerror = function(msg, url, lineNo, columnNo, error) { // ... handle error ... return false; }
Reboot and wait for reboot to complete in Ansible playbook
Jeff Geerling shares a handy tip on how to implement the configure-reboot-configure pattern in an Ansible playbook.
--- - name: Do something that requires a reboot when it results in a change. ... register: task_result - name: Reboot immediately if there was a change. shell: "sleep 5 && reboot" async: 1 poll: 0 when: task_result is changed - name: Wait for the reboot to complete if there was a change. wait_for_connection: connect_timeout: 20 sleep: 5 delay: 5 timeout: 300 when: task_result is changed ...
Weird operators in PHP
“Weird operators in PHP” covers a variety of awkward and weird operators in PHP. I don’t think I’ll ever write any code using any of these. But in case I come across any code in the future, that utilizes them, I should be sure to search back in the archives of this blog. Here’s an example to get you started:
X-fighters
In case you want to add some firepower to the previous fleet, you can summon X-fighters to the PHP source : +-0-+. The following code adds 3 to $a.
$a = $a +-0-+ 3;