From ab14e16930fe5b13f35238179bb918e5862e2518 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 13 Jan 2008 14:35:43 -0800 Subject: [PATCH] Removing the PHP tests because we have now implemented our conclusions --- php520-test/Dates.php | 35 ---------------- php520-test/PDO.php | 87 --------------------------------------- php520-test/SimpleXml.php | 45 -------------------- php520-test/results.txt | 14 ------- 4 files changed, 181 deletions(-) delete mode 100644 php520-test/Dates.php delete mode 100644 php520-test/PDO.php delete mode 100644 php520-test/SimpleXml.php delete mode 100644 php520-test/results.txt diff --git a/php520-test/Dates.php b/php520-test/Dates.php deleted file mode 100644 index 2afcb15..0000000 --- a/php520-test/Dates.php +++ /dev/null @@ -1,35 +0,0 @@ -setTimeZone($tz); -echo $date->format('r'); - -?> \ No newline at end of file diff --git a/php520-test/PDO.php b/php520-test/PDO.php deleted file mode 100644 index 09abdb6..0000000 --- a/php520-test/PDO.php +++ /dev/null @@ -1,87 +0,0 @@ -setAttribute(PDO::ATTR_STATEMENT_CLASS, array('MyStatement', array($this))); - } - - public function exec() - { - $args = func_get_args(); - echo 'hi'; - call_user_func_array(array($this, 'parent::exec'), $args); - $this->history[] = func_get_args(); - } - - public function query() - { - echo 'moo'; - $args = func_get_args(); - call_user_func_array(array($this, 'parent::query'), $args); - $this->history[] = $args; - } -} - -class MyStatement extends PDOStatement -{ - private $pdo; - - private function __construct($pdo) - { - $this->pdo = $pdo; - } - - public function execute() - { - $args = func_get_args(); - call_user_func_array(array($this, 'parent::execute'), $args); - $this->pdo->history[] = $this->queryString; - } - - public function query() - { - $args = func_get_args(); - call_user_func_array(array($this, 'parent::query'), $args); - $this->pdo->history[] = $this->queryString; - } -} - -$db = new MyPDO('mysql:host=localhost;dbname=test', 'mysql', 'elssur'); - -$smt = $db->prepare("SELECT * FROM user WHERE userid = :hi"); -$smt->bindValue('hi', null); -// echo $smt; -// $smt->execute(array(1)); - -$smt->execute(); - -print_r($smt->fetch()); - -print_r($db->history); - -?> \ No newline at end of file diff --git a/php520-test/SimpleXml.php b/php520-test/SimpleXml.php deleted file mode 100644 index a441238..0000000 --- a/php520-test/SimpleXml.php +++ /dev/null @@ -1,45 +0,0 @@ -download[1]->date->timestamp->attributes()); - -// utf8 - no header tag -$data = ' - הודעות של צור קשר לא מגיעות לשום מקום -'; -$xml = new SimpleXmlElement($data); -print_r($xml); - -// utf8 -$data = ' - - הודעות של צור קשר לא מגיעות לשום מקום -'; -$xml = new SimpleXmlElement($data); -print_r($xml); - -?> \ No newline at end of file diff --git a/php520-test/results.txt b/php520-test/results.txt deleted file mode 100644 index 616588f..0000000 --- a/php520-test/results.txt +++ /dev/null @@ -1,14 +0,0 @@ -RESULTS OF TESTS: - -SVN $Id$ -================================ - -1) BSXml can be removed in favor of using the SimpleXml extension - -2) PHP's new DateTime/DateTimeZone classes can be used to fully implement date functionality - -3) PDO could replace BSDd however there is no way to view a compiled query with all prepared - variables replaced, which prevents us from doing stats on queries - -4) Exceptions are far more powerful than trigger_error() and should be used instead, alongside - a global uncaught exception handler \ No newline at end of file -- 2.43.5