HipHop
doesn't define all the same constants that PHP does. I mean, hiphop is like a re-implementation of PHP, where some things got lost, and other changed.
For example, the PDO constants like PDO::PARAM_INT
in HipHop are defined the old way, ie PDO_PARAM_INT
.
Also, if I remember correctly, the hiphop implementation for urlencode
was like php's raw_urlencode
(ie. encoding spaces as %20
as raw_urlencode
does in PHP, instead of encoding them to +
as PHP's urlencode
).
Also HipHop is not implementing a exactly PHP 5.2, because there is some support for namespaces (that came out in PHP 5.3), but they are buggy and not recommended to be use.
In short, you may have to patch some things in your code. For example, you could add to your bootstrap code something like:
<?php
if (!is_defined('JSON_ERROR_NONE')) define('JSON_ERROR_NONE', 0);
// same thing with other JSON_* constants