Re: The new run-tests.php...
| From: | Ulf Wendel | Date: | Fri, 03 Jul 2009 08:11:16 +0000 |
| Subject: | Re: The new run-tests.php... | ||
| References: | 1 2 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-65176@lists.php.net to get a copy of this message | ||
zoe schrieb:
Oh, easy. PHP6 wants you to use "print $e->getMessage()" instead of "print $e". I am not familiar enough with the PHP syntax to judge if that is a PHP 6 issue or a valid PHP 6 syntax change. nixnutz@ulflinux:~/src/phpruntests> /home/nixnutz/src/login/php6/sapi/cli/php -r ' $e = new Exception("foo"); print $e;' Catchable fatal error: Method Exception::__toString() must return a string value in Command line code on line 1 nixnutz@ulflinux:~/src/phpruntests> /home/nixnutz/src/login/php5/sapi/cli/php -r ' $e = new Exception("foo"); print $e;' exception 'Exception' with message 'foo' in Command line code:1 Stack trace: #0 {main} Another detail about handling options with PHP 6. When I do "run-tests.php --help test.phpt" it will run the test but not print the help message. With PHP 5.3 its the other way around, which meets my expectations. With PHP 5.3 you get the help message but the test won't be run. But hey, you said already, run-tests.php has not been ported/tested to PHP 6 yet... UlfPHP 6: works in general In general you can use run-tests.php with PHP 6. --help and other options cause an error. Plain vanilla test runs work fine. Catchable fatal error: Method Exception::__toString() must return a string value in /home/nixnutz/src/phpruntests/src/run-tests.php on line 16