xref: /PHP-8.2/ext/dba/tests/skipif.inc (revision b5a14e6c)
1<?php
2    if (!sizeof(dba_handlers())) die('skip no handlers installed');
3    if (!isset($handler)) {
4        $handlers = dba_handlers();
5        if (in_array('flatfile', $handlers)) {
6            $handler = 'flatfile';
7        } else {
8            $handlers = array_diff($handlers, array('cdb', 'cdb_make')); /* these can only read OR write */
9            if (count($handlers)==0) {
10                die('skip no handler available that can be used for the test');
11            }
12            $handler = array_shift($handlers);
13        }
14    } else {
15        if (!in_array($handler, dba_handlers())) {
16            $HND = strtoupper($handler);
17            die("skip $HND handler not available");
18        }
19    }
20    $HND = strtoupper($handler);
21?>
22