Category: PHP

  • Isolating Side Effects Using Isolation Sets

    Isolate side effects by using isolation sets, sets of potentially-pure and fall-through functions that cleanly and simply separate a program’s logic from its side effects.

  • Making Concurrent cURL Requests Using PHP’s curl_multi* Functions

    The cURL library proves a valuable resource for developers needing to make use of common URL-based protocols (e.g., HTTP, FTP, etc.) for exchanging data. PHP provides a set of curl* wrapper functions in an extension that nicely integrates cURL’s functionality. When you have to make multiple requests in a script, it’s often more efficient to […]

  • Fall-Through Functions

    Fall-through functions, which are simple functions that lack branching constructs (e.g., if/then, switch, etc.), provide the ability to isolate side effects in your codebase.

  • XSS Prevention in Four Simple Steps

    Preventing Cross Site Scripting (XSS) attacks is a daunting task for developers. In short, XSS attacks are an injection attack in which data that is structurally significant in the current context changes the intended semantics and/or functionality. While there are great resources online that walk you through prevention techniques (one of the best security resources […]