Re: PEAR & Zend Engine 2
| From: | Tomas V.V.Cox | Date: | Thu, 11 Jul 2002 11:56:25 +0000 |
| Subject: | Re: PEAR & Zend Engine 2 | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-7656@lists.php.net to get a copy of this message | ||
Sebastian Bergmann wrote:
>
> I'd like to implement PHPUnit_Assert::assertSame(), but this requires
> Zend Engine 2.
>
> Any way I can add a check to the method and bail out if used with Zend
> Engine 1?
In the lastest PEAR.php version there is the (bool) PEAR_ZE2 constant,
added by Stig some days ago.
The detection code:
define('PEAR_ZE2', (function_exists('version_compare') &&
version_compare(zend_version(), "2-dev", "ge")));
Tomas V.V.Cox