Fix pure php implementation for 32-bit machine. (#2282)

diff --git a/tests.sh b/tests.sh
index fb7044f..1335c06 100755
--- a/tests.sh
+++ b/tests.sh
@@ -358,6 +358,16 @@
   ln -sfn "/usr/local/php-${VERSION}-zts/bin/phpize" $PHPIZE
 }
 
+use_php_bc() {
+  VERSION=$1
+  PHP=`which php`
+  PHP_CONFIG=`which php-config`
+  PHPIZE=`which phpize`
+  ln -sfn "/usr/local/php-${VERSION}-bc/bin/php" $PHP
+  ln -sfn "/usr/local/php-${VERSION}-bc/bin/php-config" $PHP_CONFIG
+  ln -sfn "/usr/local/php-${VERSION}-bc/bin/phpize" $PHPIZE
+}
+
 build_php5.5() {
   use_php 5.5
   rm -rf vendor
@@ -376,6 +386,13 @@
   cd php/tests && /bin/bash ./test.sh && cd ../..
 }
 
+build_php5.5_32() {
+  use_php_bc 5.5
+  rm -rf vendor
+  cp -r /usr/local/vendor-5.5 vendor
+  ./vendor/bin/phpunit
+}
+
 build_php5.6() {
   use_php 5.6
   rm -rf vendor
@@ -429,6 +446,10 @@
   build_php5.5_zts_c
 }
 
+build_php_all_32() {
+  build_php5.5_32
+}
+
 # Note: travis currently does not support testing more than one language so the
 # .travis.yml cheats and claims to only be cpp.  If they add multiple language
 # support, this should probably get updated to install steps and/or