]> granicus.if.org Git - php/commitdiff
Further changes to regression/bug-verification tests.
authorUlf Wendel <uw@php.net>
Wed, 10 Oct 2007 10:10:59 +0000 (10:10 +0000)
committerUlf Wendel <uw@php.net>
Wed, 10 Oct 2007 10:10:59 +0000 (10:10 +0000)
20 files changed:
ext/mysqli/tests/bug28817.phpt
ext/mysqli/tests/bug29311.phpt
ext/mysqli/tests/bug30967.phpt
ext/mysqli/tests/bug31141.phpt
ext/mysqli/tests/bug31668.phpt
ext/mysqli/tests/bug32405.phpt
ext/mysqli/tests/bug33090.phpt
ext/mysqli/tests/bug33263.phpt
ext/mysqli/tests/bug33491.phpt
ext/mysqli/tests/bug34785.phpt
ext/mysqli/tests/bug34810.phpt
ext/mysqli/tests/bug35103.phpt
ext/mysqli/tests/bug35517.phpt
ext/mysqli/tests/bug35759.phpt
ext/mysqli/tests/bug36420.phpt
ext/mysqli/tests/bug36745.phpt
ext/mysqli/tests/bug36802.phpt
ext/mysqli/tests/bug36949.phpt
ext/mysqli/tests/bug37090.phpt
ext/mysqli/tests/bug38710.phpt

index a52cc6269b1f3f82784e16e248eb63ea49847318..e5fa7d563c8439e6f442a2bf237b17d940d1405a 100644 (file)
@@ -1,7 +1,10 @@
 --TEST--
 Bug #28817 (problems with properties declared in the class extending MySQLi)
 --SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php 
+require_once('skipif.inc'); 
+require_once('skipifconnectfailure.inc');
+?>
 --FILE--
 <?php
        include "connect.inc";
@@ -21,19 +24,19 @@ Bug #28817 (problems with properties declared in the class extending MySQLi)
        var_dump($mysql->p_test);
        @var_dump($mysql->errno);
 
-       $mysql->connect($host, $user, $passwd);
+       $mysql->connect($host, $user, $passwd, $db, $port, $socket);
        $mysql->select_db("nonexistingdb");
 
        var_dump($mysql->errno > 0);
 
-       $mysql->close();        
+       $mysql->close();
 ?>
 --EXPECTF--
 array(2) {
   [0]=>
-  string(3) "foo"
+  %s(3) "foo"
   [1]=>
-  string(3) "bar"
+  %s(3) "bar"
 }
 NULL
-bool(true)
+bool(true)
\ No newline at end of file
index b50de178b2236abb2b21bc7b290d483f7ff79962..0c70f83557539f55ecc28d5c6f1a07859333a987 100644 (file)
@@ -1,48 +1,51 @@
 --TEST--
 constructor test
 --SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+?>
 --FILE--
 <?php
        include "connect.inc";
-       
+
        /* class 1 calls parent constructor */
        class mysql1 extends mysqli {
                function __construct() {
-                       global $host, $user, $passwd;
-                       parent::__construct($host, $user, $passwd, "test");
+                       global $host, $user, $passwd, $db, $port, $socket;
+                       parent::__construct($host, $user, $passwd, $db, $port, $socket);
                }
        }
 
        /* class 2 has an own constructor */
        class mysql2 extends mysqli {
-               
+
                function __construct() {
-                       global $host, $user, $passwd;
-                       $this->connect($host, $user, $passwd, "test");
+                       global $host, $user, $passwd, $db, $port, $socket;
+                       $this->connect($host, $user, $passwd, $db, $port, $socket);
                }
        }
 
        /* class 3 has no constructor */
        class mysql3 extends mysqli {
-               
+
        }
 
-       $foo[0] = new mysql1(); 
-       $foo[1] = new mysql2(); 
-       $foo[2] = new mysql3($host, $user, $passwd, "test");
+       $foo[0] = new mysql1();
+       $foo[1] = new mysql2();
+       $foo[2] = new mysql3($host, $user, $passwd, $db, $port, $socket);
 
 
        for ($i=0; $i < 3; $i++) {
                if (($result = $foo[$i]->query("SELECT DATABASE()"))) {
                        $row = $result->fetch_row();
-                       printf("%d: %s\n", $i, $row[0]);
+                       if ($row[0] != $db)
+                               printf("%d: %s\n", $i, $row[0]);
                        $result->close();
                }
                $foo[$i]->close();
        }
+       print "done!";
 ?>
 --EXPECTF--
-0: test
-1: test
-2: test
+done!
\ No newline at end of file
index 410764a779ec116b42cb70e8030ddd34269d3c92..8051acbdb3e18531a32686f546497b595c3d43c0 100644 (file)
@@ -1,7 +1,10 @@
 --TEST--
 Bug #30967 (problems with properties declared in the class extending the class extending MySQLi)
 --SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php 
+require_once('skipif.inc'); 
+require_once('skipifconnectfailure.inc');
+?>
 --FILE--
 <?php
        include "connect.inc";
@@ -12,12 +15,12 @@ Bug #30967 (problems with properties declared in the class extending the class e
        class mysql2 extends mysql1 {
        }
 
-       $mysql = new mysql2($host, $user, $passwd, "test");
+       $mysql = new mysql2($host, $user, $passwd, $db, $port, $socket);
 
        $mysql->query("THIS DOES NOT WORK");
        printf("%d\n", $mysql->errno);
 
-       $mysql->close();        
+       $mysql->close();
 ?>
 --EXPECTF--
 1064
index 3dc0dda1d54f4c91cdac9c092197954e06d87743..71834742a9da932e0f16398efd84f0df6298a634 100644 (file)
@@ -22,7 +22,7 @@ var_dump($my_test->test);
 --EXPECTF--
 array(2) {
   [0]=>
-  string(3) "foo"
+  %s(3) "foo"
   [1]=>
-  string(3) "bar"
+  %s(3) "bar"
 }
index 6333030339317861517939e24bdc788ebac7dad1..83636b142f561f5bdd276055424b1b8e52d306f4 100644 (file)
@@ -1,15 +1,18 @@
 --TEST--
 Bug #31668 (multi_query works exactly every other time (multi_query was global, now per connection))
 --SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php 
+require_once('skipif.inc'); 
+require_once('skipifconnectfailure.inc');
+?>
 --FILE--
 <?php
        include "connect.inc";
 
-       $mysql = new mysqli($host, $user, $passwd, "test");
+       $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
        $mysql->multi_query('SELECT 1;SELECT 2');
        do {
-               $res = $mysql->store_result();  
+               $res = $mysql->store_result();
                if ($mysql->errno == 0) {
                        while ($arr = $res->fetch_assoc()) {
                                var_dump($arr);
@@ -20,10 +23,10 @@ Bug #31668 (multi_query works exactly every other time (multi_query was global,
        var_dump($mysql->error, __LINE__);
        $mysql->close();
 
-       $mysql = new mysqli($host, $user, $passwd, "test");
+       $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
        $mysql->multi_query('SELECT 1;SELECT 2');
        do {
-               $res = $mysql->store_result();  
+               $res = $mysql->store_result();
                if ($mysql->errno == 0) {
                        while ($arr = $res->fetch_assoc()) {
                                var_dump($arr);
@@ -36,21 +39,21 @@ Bug #31668 (multi_query works exactly every other time (multi_query was global,
 --EXPECTF--
 array(1) {
   [1]=>
-  string(1) "1"
+  %s(1) "1"
 }
 array(1) {
   [2]=>
-  string(1) "2"
+  %s(1) "2"
 }
-string(0) ""
+%s(0) ""
 int(%d)
 array(1) {
   [1]=>
-  string(1) "1"
+  %s(1) "1"
 }
 array(1) {
   [2]=>
-  string(1) "2"
+  %s(1) "2"
 }
-string(0) ""
+%s(0) ""
 int(%d)
index 456a6904837cb9a85781c541a8f02e46d014024e..7754f60a9986aa48abe038046bc13f55ba293e7c 100644 (file)
@@ -1,13 +1,16 @@
 --TEST--
 Bug #32405 (mysqli->fetch() is returning bad data)
 --SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php 
+require_once('skipif.inc'); 
+require_once('skipifconnectfailure.inc');
+?>
 --FILE--
 <?php
        include ("connect.inc");
 
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect($host, $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
        mysqli_select_db($link, "test");
        mysqli_query($link, "SET sql_mode=''");
        
@@ -28,12 +31,12 @@ Bug #32405 (mysqli->fetch() is returning bad data)
        mysqli_query($link,"DROP TABLE test_users");
        mysqli_close($link);
 ?>
---EXPECT--
+--EXPECTF--
 int(1)
-string(5) "user1"
+%s(5) "user1"
 int(2)
-string(5) "user2"
+%s(5) "user2"
 int(3)
-string(5) "user3"
+%s(5) "user3"
 int(4)
-string(5) "user4"
+%s(5) "user4"
index 5cda386e564f0def77633e2cd53402f350bffba7..d7d569698180db257f016f30aed9ad6d882ff3c2 100644 (file)
@@ -1,14 +1,17 @@
 --TEST--
 Bug #33090 (mysql_prepare doesn't return an error)
 --SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php 
+require_once('skipif.inc'); 
+require_once('skipifconnectfailure.inc');
+?>
 --FILE--
 <?php
        include ("connect.inc");
 
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect($host, $user, $passwd);
-       mysqli_select_db($link, "test");
+       $link = mysqli_connect($host, $user, $passwd, null, $port, $socket);
+       mysqli_select_db($link, $db);
 
        if (!($link->prepare("this makes no sense"))) {
                printf("%d\n", $link->errno);
index 55285ae89eabc973e675aba5722d8ffc17d5aaf5..4f2a37c865ddcc950bd13d9f6a15ea603a38e42d 100644 (file)
@@ -1,8 +1,11 @@
 --TEST--
-Bug #33263 (mysqli_real_connect in __construct) 
+Bug #33263 (mysqli_real_connect in __construct)
 --SKIPIF--
-<?php require_once('skipif.inc'); ?>
-<?php require_once('skipifemb.inc'); ?>
+<?php
+require_once('skipif.inc');
+require_once('skipifemb.inc');
+require_once('skipifconnectfailure.inc');
+?>
 --FILE--
 <?php
 
@@ -10,23 +13,26 @@ Bug #33263 (mysqli_real_connect in __construct)
 
        class test extends mysqli
        {
-               public function __construct($host, $user, $passwd, $db) {
+               public function __construct($host, $user, $passwd, $db, $port, $socket) {
                        parent::init();
-                       parent::real_connect($host, $user, $passwd, $db);
+                       parent::real_connect($host, $user, $passwd, $db, $port, $socket);
                }
        }
 
-       $mysql = new test($host, $user, $passwd, "test");
+       $mysql = new test($host, $user, $passwd, $db, $port, $socket);
 
        $stmt = $mysql->prepare("SELECT DATABASE()");
        $stmt->execute();
-       $stmt->bind_result($db);
+       $stmt->bind_result($database);
        $stmt->fetch();
        $stmt->close();
 
-       var_dump($db);
+       if ($database != $db)
+               printf("[001] Expecting '%s' got %s/'%s'.\n",
+                       gettype($database), $database);
 
-       $mysql->close();        
+       $mysql->close();
+       print "done!";
 ?>
---EXPECT--
-string(4) "test"
+--EXPECTF--
+done!
\ No newline at end of file
index 067e489aae4bb7352032f407a35b86e6a6535c62..168ecb038100454246093fea70926b39b7428a14 100644 (file)
@@ -3,7 +3,10 @@ Bug #33491 (extended mysqli class crashes when result is not object)
 --INI--
 error_reporting=4095
 --SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php 
+require_once('skipif.inc'); 
+require_once('skipifconnectfailure.inc');
+?>
 --FILE--
 <?php
 
@@ -15,10 +18,10 @@ class DB extends mysqli
   }
 }
 
-require_once dirname(__FILE__)."/connect.inc";
+require_once("connect.inc");
 
 // Segfault when using the DB class which extends mysqli
-$DB = new DB($host, $user, $passwd, '');
+$DB = new DB($host, $user, $passwd, $db, $port, $socket);
 $DB->query_single('SELECT DATE()');
 
 ?>
index 3fe145a5f7c9e731565746fc03bea005107ab9e9..2130ccaf3a48fb77642b8132be582dae94b6a1e5 100644 (file)
@@ -1,7 +1,10 @@
 --TEST--
 Bug #34785 (Can not properly subclass mysqli_stmt)
 --SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php 
+require_once('skipif.inc'); 
+require_once('skipifconnectfailure.inc');
+?>
 --FILE--
 <?php
        include ("connect.inc");
@@ -21,7 +24,7 @@ Bug #34785 (Can not properly subclass mysqli_stmt)
        }
 
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect($host, $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
        mysqli_query($link, "SET sql_mode=''");
 
        $stmt = new my_stmt($link, "SELECT 'foo' FROM DUAL");
@@ -42,6 +45,6 @@ Bug #34785 (Can not properly subclass mysqli_stmt)
 
        mysqli_close($link);
 ?>
---EXPECT--
-string(3) "foo"
-string(3) "bar"
+--EXPECTF--
+%s(3) "foo"
+%s(3) "bar"
index 58a3bfb6d9aa7220c04bd5575fe83b1c6d3e2db7..3bc959aab879c3d6597592edbcde80f5c1649161 100644 (file)
@@ -1,7 +1,10 @@
 --TEST--
 Bug #34810 (mysqli::init() and others use wrong $this pointer without checks)
 --SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php 
+require_once('skipif.inc'); 
+require_once('skipifconnectfailure.inc');
+?>
 --FILE--
 <?php
 
@@ -9,13 +12,13 @@ class DbConnection {
        public function connect() {
                include "connect.inc";
 
-               $link = mysqli_connect($host, $user, $passwd);
+               $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
                var_dump($link); 
                
                $link = mysqli_init();
                var_dump($link);
                
-               $mysql = new mysqli($host, $user, $passwd, "test");
+               $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
                $mysql->query("DROP TABLE IF EXISTS test_warnings");
                $mysql->query("CREATE TABLE test_warnings (a int not null)");
                $mysql->query("SET sql_mode=''");
index 19f7f3070847a256b511f4af759529a4656e1d16..b94366203a01df8057fc71f69748f290af7c21c0 100644 (file)
@@ -1,7 +1,10 @@
 --TEST--
 Bug #35103 (Bad handling of unsigned bigint)
 --SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php 
+require_once('skipif.inc'); 
+require_once('skipifconnectfailure.inc');
+?>
 --FILE--
 <?php
 
@@ -11,7 +14,7 @@ DROP TABLE test_buint;
 EOSQL;
        include "connect.inc";
 
-       $mysql = new mysqli($host, $user, $passwd, "test");
+       $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
        $mysql->query("DROP TABLE IF EXISTS test_bint");
        $mysql->query("CREATE TABLE test_bint (a bigint(20) default NULL) ENGINE=MYISAM");
        $mysql->query("INSERT INTO test_bint VALUES (9223372036854775807),(-9223372036854775808),(-2147483648),(-2147483649),(-2147483647),(2147483647),(2147483648),(2147483649)");
index 84f6e3ece839033c466221477e65072869d1a7b5..9100ba919a79bf2f6f198dd93b561031e2a167b8 100644 (file)
@@ -1,12 +1,15 @@
 --TEST--
 Bug #35517 (mysqli_stmt_fetch returns NULL)
 --SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php 
+require_once('skipif.inc'); 
+require_once('skipifconnectfailure.inc');
+?>
 --FILE--
 <?php
        include "connect.inc";
 
-       $mysql = new mysqli($host, $user, $passwd, "test");
+       $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
 
        $mysql->query("CREATE TABLE temp (id INT UNSIGNED NOT NULL)");
        $mysql->query("INSERT INTO temp (id) VALUES (3000000897),(3800001532),(3900002281),(3100059612)");
@@ -23,7 +26,7 @@ Bug #35517 (mysqli_stmt_fetch returns NULL)
        $mysql->close();
 ?>
 --EXPECTF--
-string(10) "3000000897"
-string(10) "3800001532"
-string(10) "3900002281"
-string(10) "3100059612"
+%s(10) "3000000897"
+%s(10) "3800001532"
+%s(10) "3900002281"
+%s(10) "3100059612"
index ce598427acc7c41f9c58c7ca55ec7bb61a0940b7..b80ef1580d029b2722420b6ae8cc3b49963ef6ef 100644 (file)
@@ -1,7 +1,10 @@
 --TEST--
 Bug #35759 (mysqli_stmt_bind_result() makes huge allocation when column empty)
 --SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php 
+require_once('skipif.inc'); 
+require_once('skipifconnectfailure.inc');
+?>
 --FILE--
 <?php
 
@@ -14,7 +17,7 @@ EOSQL;
        include "connect.inc";
        $col_num= 1000;
 
-       $mysql = new mysqli($host, $user, $passwd, "test");
+       $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
        $mysql->query("DROP TABLE IF EXISTS blobby");
        $create = "CREATE TABLE blobby (a0 MEDIUMBLOB NOT NULL DEFAULT ''";
        $i= 0;
index 921be8568bca992055a72ecc440bc894406207b6..49804e18aef02a54503e6f2e6de6eeb60f481041 100644 (file)
@@ -1,12 +1,15 @@
 --TEST--
 Bug #36420 (segfault when access result->num_rows after calling result->close())
 --SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php 
+require_once('skipif.inc'); 
+require_once('skipifconnectfailure.inc');
+?>
 --FILE--
 <?php
 
 include "connect.inc";
-$mysqli = mysqli_connect($host, $user, $passwd);
+$mysqli = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
 
 $result = $mysqli->query('select 1');
 
index 980dd893ead563efca7c4414a7c8d83b8fe09578..eef65d8aaecee0c8b29c09a32ab6975a947f0c81 100644 (file)
@@ -1,13 +1,16 @@
 --TEST--
 Bug #36745 (LOAD DATA LOCAL INFILE doesn't return correct error message)
 --SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php 
+require_once('skipif.inc'); 
+require_once('skipifconnectfailure.inc');
+?>
 --FILE--
 <?php
        include ("connect.inc");
 
        /*** test mysqli_connect 127.0.0.1 ***/
-       $mysql = mysqli_connect($host, $user, $passwd, "test");
+       $mysql = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
 
        $mysql->query("DROP TABLE IF EXISTS litest");
        $mysql->query("CREATE TABLE litest (a VARCHAR(20))");
@@ -19,5 +22,5 @@ Bug #36745 (LOAD DATA LOCAL INFILE doesn't return correct error message)
        printf("Done");
 ?>
 --EXPECTF--
-string(%d) "%s"
+%s(%d) "%s"
 Done
index d3fa8b122947e527d4210b7de25baf88f65fef13..b276a0a978fbad47d343bb94f90678a59eeb21ed 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Bug #36802 (crashes with mysql_init)
+Bug #36802 (crashes with with mysqli_set_charset())
 --SKIPIF--
 <?php require_once('skipif.inc'); ?>
 --FILE--
index 9c7156a1f60d92f0cef86e2654cc55ff6bbd1604..9362d7ff3acfa10f8bdd165d51488184c8a3ca1a 100644 (file)
@@ -1,18 +1,20 @@
 --TEST--
 Bug #36949 (invalid internal mysqli objects dtor)
 --SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php 
+require_once('skipif.inc'); 
+require_once('skipifconnectfailure.inc');
+?>
 --FILE--
 <?php
 include "connect.inc";
-
 class A {
 
        private $mysqli;
 
        public function __construct() {
-               global $user, $host, $passwd;
-               $this->mysqli = new mysqli($host, $user, $passwd);
+               global $user, $host, $passwd, $db, $port, $socket;
+               $this->mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket);
                $result = $this->mysqli->query("SELECT NOW() AS my_time FROM DUAL");
                $row = $result->fetch_object();
                echo $row->my_time."<br>\n";
@@ -29,8 +31,8 @@ class B {
        private $mysqli;
 
        public function __construct() {
-               global $user, $host, $passwd;
-               $this->mysqli = new mysqli($host, $user, $passwd);
+               global $user, $host, $passwd, $db, $port, $socket;
+               $this->mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket);
                $result = $this->mysqli->query("SELECT NOW() AS my_time FROM DUAL");
                $row = $result->fetch_object();
                echo $row->my_time."<br>\n";
index fa742495eaf03492bf08b9fa284f2e55834fe5a2..651ba52b5be63cd7f72290d415dc69faedf141b5 100644 (file)
@@ -1,16 +1,21 @@
 --TEST--
 Bug #37090 (mysqli_set_charset return code)
 --SKIPIF--
-<?php require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
 if (!function_exists('mysqli_set_charset')) {
        die('skip mysqli_set_charset() not available');
 }
+if (ini_get('unicode.semantics')) {
+       die("skip Functionality not available in unicode mode");
+}
 ?>
 --FILE--
 <?php
        include "connect.inc";
 
-       $mysql = new mysqli($host, $user, $passwd);
+       $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
 
        $cs = array();
        $cs[] = $mysql->set_charset("latin5");
@@ -23,6 +28,7 @@ if (!function_exists('mysqli_set_charset')) {
        $cs[] = $mysql->character_set_name();
 
        var_dump($cs);
+       print "done!";
 ?>
 --EXPECT--
 array(6) {
@@ -39,3 +45,4 @@ array(6) {
   [5]=>
   string(4) "utf8"
 }
+done!
\ No newline at end of file
index b620568688c7f964de202363236e8f9ca19b466b..490810cbc7f462c35bbc7fac3d9d29f5201e25cf 100755 (executable)
@@ -3,21 +3,22 @@ Bug #38710 (data leakage because of nonexisting boundary checking in statements)
 --SKIPIF--
 <?php 
 require_once('skipif.inc'); 
+require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
 <?php
 include "connect.inc";
 
-$db = new mysqli($host, $user, $passwd, "test");
+$db = new mysqli($host, $user, $passwd, $db, $port, $socket);
 $qry=$db->stmt_init();
 $qry->prepare("SELECT REPEAT('a',100000)");
 $qry->execute();
 $qry->bind_result($text);
 $qry->fetch();
-if ($text !== str_repeat('a', mysqli_get_server_version($db) > 50110? 100000:(mysqli_get_server_version($db)>=50000? 8193:8191))) {
+if ($text !== str_repeat('a', ($IS_MYSQLND || mysqli_get_server_version($db) > 50110)? 100000:(mysqli_get_server_version($db)>=50000? 8193:8191))) {
        var_dump(strlen($text));
 }
 echo "Done";
 ?>
 --EXPECTF--    
-Done
+Done
\ No newline at end of file