-
Your Password Hashing Algorithm Is Bad And You Should Feel Bad
No Where md5() = sha1(), base64_encode(), etc. This type of password hashing is still widespread and susceptible to rainbow table attacks. Yes (Source) Uses bcrypt, this particular implementation auto-magically hardens itself over time. How to use You are responsible for new \Pdo(), $condition, maybe asking the user to make their ‘password’ not suck. Read the snippet and reason about it. Don’t just copy/paste, it won’t work. Keep on…
-
PHP and Go, Together at Last!
This blog post is about Spiral Framework and Roadrunner Server. I’ll briefly talk about what they are, then show how to compile a custom Roadrunner server, start developing with Spiral, using Docker. Explain Like I’m 5 PHP Developers Roadrunner works by creating a HTTP server with Golang’s excellent net/http package, and using Goridge as a bridge to pass PSR7 Request and Responses between…
-
Pcov Is Better than Phpdbg and Xdebug for Code Coverage
pcov is faster, uses less memory, is more accurate than phdbg. Phpdbg Pcov Caveat, only works with PHPUnit 8+… Or does it? How to switch to pcov if you are stuck with PHPUnit 7 If you are doing this: Or this: Simply change to: And you’re done.
-
Phpdbg Is Much Faster Than Xdebug For Code Coverage
I work on a project that uses Travis CI to test and build against three jobs. (PHP 7.0, 7.1, 7.2) I recently ran into a roadblock where Travis would fail with “No output has been received” on the job that did code coverage using Xdebug. A screenshot of the last successful build before the failure: Only…
-
Building a Simple API using Opulence PHP
This tutorial will show you how to code a simple JSON API using Opulence PHP. We will install Opulence’s skeleton project using composer, then create a ‘user’ database entity, and finally we will match CRUD (Create, Read, Update, Delete) to POST, GET, PUT, and DELETE. Prerequisites: PHP7, Composer, MySQL. Installing Create an Opulence project with the following command:…
-
Install PHP7 and Composer on Windows 10
PHP7 is a general purpose scripting language well suited for web development. Composer is the defacto package manager for PHP7. This tutorial will show you how to install PHP7 and Composer on Windows 10 for use in a command prompt. A common misconception is that you need a web server like IIS, Apache, or Nginx…
-
Install Phalcon PHP On Windows 10
A common misconception is that you need a web server like IIS, Apache, or Nginx to get started with PHP7 development. In fact, PHP7 has its own built in web server that you can invoke at the command prompt. Many modern PHP frameworks support this, such as Phalcon PHP. PHP7 and Composer on Windows 10…
