Implicit Evaluation with PHP

Implicit Evaluation with PHP Archives: Tutorial

next page ·

4 May 2007

Benchmarking PHP Threads

All threads can now both hear and report on conditions. A problem with the original send/recieve mechanism made threads hang the controlling thread while long operations were occurring.

continue reading... » One Comment

3 May 2007

Communicating with threads in PHP

Earlier this week, I suggested PHP could be multithreaded. The sample I provided was very simple and at least one reader quickly wondered how to communicate with threads.

continue reading... » 5 Comments

1 May 2007

Multi-threading strategies in PHP

PHP does not have threading anywhere in its massive core. We can, however, fake it by relying on the underlying operating system instead of PHP. This article will show you how.

continue reading... » 10 Comments

22 February 2007

Generating SQL Insert Queries

Its possible to generate a well formed SQL query with one line of PHP by capitalizing on lambda-style functional support.

continue reading... » 2 Comments

9 February 2007

The Implicit Isset

A guide discussing when to use isset and when to assume.

continue reading... » 0 Comments

30 January 2007

PHP as a Lambda Language

PHP is an imperative language which supports object-oriented programming. However, it supports a number of paradigms closer to what you would expect Lisp or Scheme to allow. I’ve discussed parts of this before, but its time to put together a definitive primer. You’ll learn ways to create entire functions at run time, as well as applying them to entire arrays in a single pass. PHP will seem more LISP-like than it ever has before.

continue reading... » 7 Comments

23 January 2007

What is $_REQUEST, or the difference between $_REQUEST, $_GET and $_POST

PHP provides you a number of “super-global” variables. These include $_GET, $_POST, $_COOKIE, $_SESSION, $_SERVER, $_ENV, $_FILES and $_REQUEST. Most of these are fairly self-explainatory. $_GET are the variables passed by forms with a GET method or after the end of the path such as example.com/search.php?GETARG1=GETVAL1&foo=bar. $_POST is any variable submitted by a form with […]

continue reading... » One Comment

18 January 2007

Loops in PHP

PHP gives programmers many varieties of loops to work with. Despite an overwhelming selection, each is tailored, really, to just one scenario.

continue reading... » One Comment

1 January 2007

Recursive Data Structures in PHP

Welcome to the Jungle
Today, I was helping a friend implement a recursive category model. There is a top level category and each category contains items and sub-categories.
It’s easy to illustrate on the web:

Top Level Category

Item 1.1
Item 1.2
Subcategory 1.3

Item 3.1
Item 3.2

Subcategory 1.4

Subcategory 4.1

Subcategory 4.1.1

Item 4.1.1.1
Item 4.1.1.2

Item 4.1.2

Somehow, your web browser can take a piece of text […]

continue reading... » 0 Comments

22 December 2006

Determining if method is a static class method or dynamic object method

Up until PHP5, there was no way to designate a function as static or instantiated. The difference is small, but important. Object methods can only be called through an instantiated object and have access to a class’s member variables. A static class method does not have access to object data but also needs not be […]

continue reading... » 0 Comments

next page ·