1<?php
2function skipif(bool $want_expat) {
3    ob_start();
4    echo phpinfo(INFO_MODULES);
5    $output = ob_get_clean();
6    if ($want_expat !== str_contains($output, 'EXPAT')) {
7        die('skip test is for ' . ($want_expat ? 'Expat' : 'libxml'));
8    }
9}
10