summaryrefslogtreecommitdiff
path: root/test/php
diff options
context:
space:
mode:
authorMark Slee <mcslee@apache.org>2007-11-13 04:00:29 +0000
committerMark Slee <mcslee@apache.org>2007-11-13 04:00:29 +0000
commit5b743079da3b0f817545d7e0574222a5c16fc2a9 (patch)
tree16e0768d3a13702182643c7e00d1c4909132de81 /test/php
parentc0c88ee8056427f66451e527f791b31f7485b4ca (diff)
downloadthrift-5b743079da3b0f817545d7e0574222a5c16fc2a9.tar.gz
Thrift PHP generation Redux
Summary: Chopping the amount of code generated by Thrift for PHP services by two orders of magnitude (approx 25% of the previous size). This is done via putting more logic in a dynamic base class and taking it out of the generated code. Hopefully this wins back the CPU cycles paid just to load code from APC at the cost of a marginal increase in dynamic execution runtime. Reviewed By: sgrimm, dreiss Test Plan: Ran all the tests in trunk/test/php, also tested the API generate code and Falcon, etc. in my sandbox git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665328 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/php')
-rw-r--r--test/php/Makefile4
-rw-r--r--test/php/TestClient.php14
2 files changed, 13 insertions, 5 deletions
diff --git a/test/php/Makefile b/test/php/Makefile
index 57c621c5b..6cc52333a 100644
--- a/test/php/Makefile
+++ b/test/php/Makefile
@@ -1,5 +1,5 @@
# Makefile for Thrift test project.
-#
+#
# Author:
# Mark Slee <mcslee@facebook.com>
@@ -16,7 +16,7 @@ normal: stubs
inline: stubs-inline
stubs: ../ThriftTest.thrift
- $(THRIFT) --php ../ThriftTest.thrift
+ $(THRIFT) --phpl ../ThriftTest.thrift
stubs-inline: ../ThriftTest.thrift
$(THRIFT) --phpi ../ThriftTest.thrift
diff --git a/test/php/TestClient.php b/test/php/TestClient.php
index 07068e403..a508512a2 100644
--- a/test/php/TestClient.php
+++ b/test/php/TestClient.php
@@ -22,10 +22,18 @@ require_once $GLOBALS['THRIFT_ROOT'].'/transport/TSocketPool.php';
/** Include the socket layer */
require_once $GLOBALS['THRIFT_ROOT'].'/transport/TBufferedTransport.php';
+echo '==============================='."\n";
+echo ' SAFE TO IGNORE THESE IN TEST'."\n";
+echo '==============================='."\n";
+
/** Include the generated code */
require_once $GEN_DIR.'/ThriftTest.php';
require_once $GEN_DIR.'/ThriftTest_types.php';
+echo '==============================='."\n";
+echo ' END OF SAFE ERRORS SECTION'."\n";
+echo '==============================='."\n\n";
+
$host = 'localhost';
$port = 9090;
@@ -70,7 +78,7 @@ print_r(" = void\n");
print_r("testString(\"Test\")");
$s = $testClient->testString("Test");
print_r(" = \"$s\"\n");
-
+
/**
* BYTE TEST
*/
@@ -296,7 +304,7 @@ foreach ($whoa as $key => $val) {
}
}
print_r("}, ");
-
+
$xtructs = $v2->xtructs;
print_r("{");
if (is_array($xtructs)) {
@@ -306,7 +314,7 @@ foreach ($whoa as $key => $val) {
}
}
print_r("}");
-
+
print_r("}, ");
}
print_r("}, ");