1
0
mirror of https://github.com/danog/amp.git synced 2024-12-14 02:17:26 +01:00
amp/lib/Deferred.php

18 lines
663 B
PHP
Raw Normal View History

2015-05-19 06:21:33 +02:00
<?php
namespace Amp;
2015-07-22 19:12:14 +02:00
// @codeCoverageIgnoreStart
2015-05-28 04:03:08 +02:00
try {
if (@assert(false)) {
// PHP7 production environment (zend.assertions=0, assert.exception=0)
eval("namespace Amp; final class Deferred implements Promisor, Promise { use PublicPromisor; }");
} else {
// PHP < 7 or dev environment (zend.assertions=1, assert.exception=0)
final class Deferred implements Promisor { use PrivatePromisor; }
}
} catch (\AssertionException $e) {
// PHP7 dev environment (zend.assertions=1, assert.exception=1)
eval("namespace Amp; final class Deferred implements Promisor { use PrivatePromisor; }");
2015-05-19 06:21:33 +02:00
}
2015-07-22 19:12:14 +02:00
// @codeCoverageIgnoreEnd