# Error ‘php.exe’ is not recognized as an internal or external command when calling phpunit on Windows XP/Vista/7

This may be caused by the PHP_PEAR_PHP_BIN environment variable not being set correctly.

To fix this go to Advanced System Settings in Control Panel/System & Maintenance/System.

Select Environment Variables.

Find variable PHP_PEAR_PHP_BIN and change the value from ./php.exe to the correct path\to\php.exe on your system.

# Configure a phpunit.xml file in Eclipse PDT on Windows

In Eclipse PDT, select Run > External Tools > External Tools Configurations…

Click on the New launch configuration icon.

Give it a name. “PHPUnitConfig” for example.

Below is a screenshot of sample settings. Modify according to your evironment.

On the Main tab, under Location set the path to your php.exe file.

Set Working Directory to: ${workspace_loc} Set Arguments to: C:\wamp\bin\php\php5.3.0\phpunit --configuration${workspace_loc}\${resource_path} Make sure to set the path to the installation location of phpunit. Select your phpunit.xml file in the PHP Explorer panel and from the main menu, select Run > External Tools > PHPUnitConfig. # Reference the next sibling node in a SimpleXMLElement object in PHP To reference the next sibling nodes in a SimpleXMLElement object in PHP you can use the xpath axes “following-sibling” as shown below: $nextSibling = $element->xpath("following-sibling::ElementName"); To reference the first sibling following the element: $firstSiblingElement = \$nextSibling[0];

Reference: XPath Axes

# Microsoft Launches Free Tool WebMatrix

WebMatrix makes development with ASP .NET much easier for beginners. Like PHP it allows for code snippets to be included within an html page. Learn more about this new tool from Microsoft.

WebMatrix

# Facebook Uses HipHop To Transform PHP to C++

On the Facebook Developers site, Haiping Zhao writes about how Facebook uses HipHop to transform PHP code to C++ and compiles them using g++. In his article titled, HipHop for PHP: Move Fast, he mentions:

HipHop for PHP isn’t technically a compiler itself. Rather it is a source code transformer. HipHop programmatically transforms your PHP source code into highly optimized C++ and then uses g++ to compile it. HipHop executes the source code in a semantically equivalent manner and sacrifices some rarely used features — such as eval() — in exchange for improved performance. HipHop includes a code transformer, a reimplementation of PHP’s runtime system, and a rewrite of many common PHP Extensions to take advantage of these performance optimizations.

In his article he describes how this tool helps to allow Facebook to scale to millions of users. He also mentions that HipHop has been released using the open source PHP license.

# How To View Column Names For A Table In T-SQL

SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = '<TABLE NAME>'
ORDER BY ORDINAL_POSITION