Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Laravel News:
Command Line Search Tools for Programmers
Oct 30, 2017 @ 09:34:10

On the Laravel News site there's a new post sharing five command line tools that could be helpful for developers and make their workflow a bit simpler.

Over the last several years, I’ve improved my command line searches through a few tools geared towards programmers. These tools help developers find phrases and patterns in text files in an unfamiliar codebase without the complexity of grep.

The following is a list of five command line search tools that will help you as a developer if you are interested in using the command line more for finding code, text, and files quickly without relying on an editor or an IDE. Some of the tools are ‘nix only, but I’ve listed a few that are cross-platform and ridiculously fast!

His list describes the usage and benefits of:

Each includes command examples and, where required, the commands to install the library (as it's not standard for Linux builds).

tagged: commandline tool search programmer tutorial grep ack

Link: https://laravel-news.com/command-line-search-tools-programmers

Lorna Mitchell:
Generating a File List for Phan
Nov 27, 2015 @ 10:38:33

Lorna Mitchell has shared a tip she's found helpful when using the phan static analysis tool for finding only PHP files via a simple grep.

Phan is the PHP Analyzer for PHP 7 code. I've been using it, partly out of curiosity, and partly to look at what the implications of upgrading my various projects will be. [...] I generated my filelist.txt files with a little help from grep - by looking for all files with opening PHP tags in, and putting that list of filenames into a file.

The phan tool is still pretty young but it provides a good example of how to use the new php-ast handling to parse and analyze PHP code.

tagged: phan file list generate quick tip grep static analysis tool

Link: http://www.lornajane.net/posts/2015/generating-a-file-list-for-phan

Robert Basic's Blog:
Benchmarking pages behind a login with ab
Nov 14, 2011 @ 10:12:05

Robert Basic has a recent post showing you how to use the "cookie jar" functionality included with Apache's "ab" benchmarking tool to get behind your PHP-based login with a simple curl and grep combo.

Tonight I decided to relax a bit and what better way of relaxing is there for a geek then to do some bash scripting?! So for fun and no profit I decided to try and benchmark pages with ab, Apache HTTP server benchmarking tool, which are behind a login. Turns out, it’s pretty easy after reading some man pages.

He includes an example of the format of the "cookie jar" and the shell script he used to grab the PHP session ID from it and inject it into the "ab" call. The script is on github.

tagged: benchmark ab apache login phpsessid session tutorial curl grep

Link: