import py
from _pytest.main import Collector, Item
import os
import sys
import re
import locale
from collections import OrderedDict

from hippy.hippyoption import (
    enable_all_optional_extensions, is_optional_extension_enabled)

enable_all_optional_extensions()

from hippy.config import load_ini

if __name__ == '__main__':
    sys.path.insert(
        0,
        os.path.dirname(
            os.path.dirname(
                os.path.dirname(os.path.abspath(__file__)))))

from prettytable import PrettyTable
from hippy.objspace import ObjSpace
from hippy.constants import E_HIPPY_WARN
from hippy.interpreter import Interpreter
from hippy.error import ExplicitExitException, FatalError
from hippy.objects.instanceobject import global_counter
from hippy.module.session.session import Session
from urlparse import parse_qs
from hippy.objects.reference import W_Reference


slow = "SKIP: Too slow!"
check_sign_only = "check_sign_only"


WIDTH = os.environ.get("COLUMNS", 300)
COL_WIDTH = int(WIDTH) / 2 - 5

IS_TRAVIS = os.getenv('TRAVIS') == 'true'


def parse_phpt(fname):
    skipif_src = []
    ini_section = []
    src = []
    exp = []
    tname = None
    request = {}
    clean = []
    st = None
    IGNORED = 999
    state = {'TEST': -1, 'FILE': 0, 'FILEEOF': 0, 'EXPECT': 1, 'EXPECTF': 1,
             'SKIPIF': 5, 'INI': 2, 'CLEAN': 3, 'CREDITS': IGNORED,
             'CREDIT': IGNORED, 'GET': 6, 'POST': 7, 'COOKIE': 8,
             'XFAIL': 9, 'DESCRIPTION': IGNORED}
    with open(fname) as f:
        lines = f.readlines()
    for l in lines:
        m = re.match('--([A-Z_]+)--$', l.strip())
        if m:
            section = m.group(1)
            try:
                st = state[section]
                continue
            except KeyError:
                if section in ['EXPECTREGEX', 'POST_RAW', 'ENV', 'ARGS']:
                    py.test.skip("Section %s not handled" % section)
                else:
                    raise ValueError('Unknown phpt section header: %s' % section)
        if st == -1 and tname is None:
            tname = l.strip()
        elif st == 0:
            src.append(l)
        elif st == 5:
            skipif_src.append(l)
        elif st == 1:
            # XXX: Hack!
            l = re.sub("on line \d+$", "on line %d", l)
            exp.append(l)
        elif st == 2:
            ini_section.append(l)
        elif st == 3:
            clean.append(l)
        elif st == 6:
            l = l.strip()
            request['_GET'] = parse_qs(l)
        elif st == 7:
            l = l.strip()
            request['_POST'] = parse_qs(l)
        elif st == 8:
            l = l.strip()
            request['_COOKIE'] = parse_qs(l)
        elif st == 9:
            py.test.skip("PHP XFAIL: %s" % l)

    return (tname, "".join(skipif_src), "".join(src),
            [l for l in exp if l.strip() != ""], "\n".join(ini_section),
            " ".join(clean),
            request)


class MockStdout(object):
    def __init__(self):
        self._lines = []
        self._buffer = []

    def __iter__(self):
        return iter(self._lines)

    def __getitem__(self, n):
        return self._lines[n]

    def flush(self):
        _s = "".join(self._buffer)
        self._lines.append(_s)
        self._buffer = []

    def append(self, str):
        if str:
            if str[-1] != '\n':
                self._buffer.append(str)
            else:
                self._buffer.append(str)
                self.flush()


class MockInterpreter(Interpreter):
    """ Like the interpreter, but captures stdout
    """
    def __init__(self, space, output):
        Interpreter.__init__(self, space)
        self.output = output
        global_counter.instance_counter = 1

    def _writestr(self, string):
        self.output.append(string)

    def err_write(self, string):
        self.writestr('\n' + string)

    def _log_traceback(self, filename, funcname, line, source):
        pass

    def hippy_warn(self, msg):
        if msg.startswith('printf(): Unknown format char'):

            # py.test.skip('Missing features in printf()')
            pass

    def log_error(self, level, msg):
        if level != E_HIPPY_WARN:
            Interpreter.log_error(self, level, msg)


class PhptRunner(object):

    def __init__(self, ini, filename, request):
        self.filename = filename
        self.request = request
        self.ini = ini

    def prepare_globals(self, space, interp):
        globals = interp.globals
        for var, values in self.request.items():
            rdict_w = OrderedDict()
            for k, v in values.items():
                rdict_w[k] = space.wrap(v[0])

            globals.set_var(var,
                            W_Reference(space.new_array_from_rdict(rdict_w)))

    def run(self, _source):
        self.space = ObjSpace()

        stdout = MockStdout()
        interp = MockInterpreter(self.space, stdout)
        load_ini(interp, self.ini)
        interp.setup(cgi=False, argv=[self.filename])
        interp.session = Session(interp)
        try:
            bc = interp.compile_bytecode(self.filename, _source)
            if bc is not None:
                interp.cached_files[self.filename] = bc
                interp.run_main(self.space, bc, top_main=True)
        except FatalError:
            pass
        except ExplicitExitException as exc:
            stdout.flush()
            stdout.append(exc.message)
        stdout.flush()
        return stdout


def matches_line(php, hippy, check_sign_only=False):
    if php.startswith("%r"):
        return re.match(php.replace("%r", ""), hippy)
    if check_sign_only:
        if re.match('int\(\d+\)', php):
            return re.match('int\(\d+\)', hippy)
        if re.match('int\(-\d+\)', php):
            return re.match('int\(-\d+\)', hippy)
    if '%' not in php:
        return php == hippy
    php = php.replace("%unicode|string%", "string")
    php = php.replace("%string|unicode%", "string")
    php = php.replace("%unicode_string_optional%", "string")
    php = php.replace("%binary_string_optional%", "string")
    php = php.replace("%u|b%", "")
    rphp = re.escape(php)
    rphp = rphp.replace('\%e', '.*')
    rphp = rphp.replace('\%x', '[0-9a-fA-F]+')
    rphp = rphp.replace('\%s', '.*')
    rphp = rphp.replace('\%a', '.*')
    rphp = rphp.replace('\%f', '.*')
    rphp = rphp.replace('\%d', '\d+')
    rphp = rphp.replace('\%i', '.*')
    return re.match(rphp, hippy)

TEST_DIR = os.path.dirname(__file__)

basic_test_dir = 'basic'
classes_test_dir = 'classes'
func_test_dir = 'func'
lang_test_dir = 'lang'
operators_test_dir = 'lang/operators'
output_test_dir = 'output'
runtest_test_dir = 'run-test'
security_test_dir = 'security'
strings_test_dir = 'strings'
array_test_dir = 'ext/standard/array'
class_object_test_dir = 'ext/standard/class_object'
string_test_dir = 'ext/standard/strings'
streams_test_dir = 'ext/standard/streams'
math_test_dir = 'ext/standard/math'
file_test_dir = 'ext/standard/file'
dir_test_dir = 'ext/standard/dir'
posix_test_dir = 'ext/posix'
general_test_dir = 'ext/standard/general_functions'
network_test_dir = 'ext/standard/network'
url_test_dir = 'ext/standard/url'
mysql_test_dir = 'ext/mysql'
session_test_dir = 'ext/session'
serialize_test_dir = 'ext/standard/serialize'
date_test_dir = 'ext/standard/date'
ctype_test_dir = 'ext/ctype'
pcre_test_dir = 'ext/pcre'
hash_test_dir = 'ext/hash'
spl_test_dir = 'ext/spl'
Zend_test_dir = 'Zend'
mcrypt_test_dir = 'ext/mcrypt'

os.environ["MYSQL_TEST_HOST"] = "localhost"
os.environ["MYSQL_TEST_USER"] = "root"
os.environ["MYSQL_TEST_PASSWD"] = "root"
os.environ["MYSQL_TEST_PORT"] = "3306"

markers = {}

# ARRAY
markers[array_test_dir] = {
    'bug41121.phpt': "int/float mix",
    'bug31158.phpt': "do not understand it right now..",
    'array_sum.phpt': slow,
    '002.phpt': "T_LIST parser problem",
    '007.phpt': "?",
    '008.phpt': "?",
    'bug24766.phpt': "missing debug_zval_dump",
    'bug25708.phpt': "missing debug_zval_dump",
    'bug26458.phpt': "missing debug_zval_dump",
    'bug35821.phpt': "not implemented error",
    'bug36975.phpt': "PHP quirk behavior",
    'bug45312.phpt': "not implemented error",
    'bug61730.phpt': "unexpected 'T_USE'",

    'array_diff_uassoc_variation5.phpt': "doesnt work properly",
    'array_diff_uassoc_variation6.phpt': "doesnt work properly",
    'array_diff_uassoc_variation8.phpt': "doesnt work properly",
    'array_diff_ukey_variation9.phpt': "doesnt work properly",
    'array_diff_variation5.phpt': "doesnt work properly",
    'array_diff_variation9.phpt': "doesnt work properly",
    'array_fill_object_2_4.phpt': "order of class members",
    'array_filter_variation7.phpt': "missing create_function()",

    'array_intersect_assoc_variation9.phpt': 'too many notices',
    'array_intersect_variation4.phpt': "doesnt work properly",
    'array_intersect_variation8.phpt': "wrong order of elems",
    'array_intersect_variation9.phpt': "doesnt work properly",
    'array_key_exists_object1.phpt': ("var_dump format is different and one key"
                                      "is reported as missing"),
    'array_key_exists_object2.phpt': "var_dump format is different",
    'array_keys_variation_002.phpt': "doesnt work prop",
    'array_keys_variation_003.phpt': "doesnt work prop",
    'array_keys_variation_004.phpt': "doesnt work prop",
    'array_map_001.phpt': "missing (useless) warning",
    'array_map_object1.phpt': "missing strict",
    'array_map_object2.phpt': "wording of warning",
    'array_map_variation10.phpt': "missing create_function()",
    'array_multisort_variation7.phpt': "SORT_REGULAR is not a meaningful ordering",
    'array_multisort_variation8.phpt': "Fatal error should Catchable",
    'array_multisort_variation9.phpt': "algorithm details are different",
    'array_next_error2.phpt': "Argument 1 for next() must be a variable",
    'array_pad_variation2.phpt': "arg parse problem",
    'array_product_variation1.phpt': "instance unimplemented as_number",
    'array_product_variation4.phpt': "?",
    'array_push_error2.phpt': "XXX push item in array having key = sys.maxint should fail",
    'array_replace.phpt': "?",
    'array_search1.phpt': "?",
    'array_search_variation2.phpt': "?",
    'array_shift_variation8.phpt': "?",
    'array_sum_variation7.phpt': "?",
    'array_udiff_assoc_basic.phpt': "?",
    'array_udiff_assoc_variation.phpt': "?",
    'array_udiff_assoc_variation3.phpt': "?",
    'array_udiff_assoc_variation5.phpt': "?",
    'array_udiff_basic.phpt': "?",
    'array_udiff_uassoc_basic.phpt': "?",
    'array_uintersect_assoc_variation2.phpt': "?",
    'array_uintersect_assoc_variation4.phpt': "?",
    'array_uintersect_assoc_variation5.phpt': "?",
    'array_uintersect_variation5.phpt': "missing one warning",
    'array_uintersect_uassoc_variation6.phpt': "missing one warning",
    'array_uintersect_variation3.phpt': "?",
    'array_unique_variation2.phpt': "?",
    'array_unique_variation8.phpt': "too many warnings?",
    'array_walk_object1.phpt': "?",
    'array_walk_objects.phpt': "?",
    'array_walk_variation7.phpt': "?",
    'array_walk_rec_objects.phpt': "?",
    'array_walk_recursive_object1.phpt': "?",
    'array_walk_recursive_variation7.phpt': "?",
    'arsort_basic.phpt': "wrong order of elems",
    'arsort_variation2.phpt': "wrong order of elems",
    'arsort_variation11.phpt': "wrong order of elems",
    'arsort_variation5.phpt': "wrong order of elems",
    'asort_variation2.phpt': "wrong order of elems",
    'asort_variation11.phpt': "wrong order of elems",
    'asort_variation3.phpt': "wrong order of elems",
    'asort_variation7.phpt': "wrong order of elems",
    'asort_variation9.phpt': "wrong order of elems",
    'bug28739.phpt': "?",
    'bug29493.phpt': "?",
    'bug30074.phpt': "?",
    'bug31213.phpt': "?",
    'bug32021.phpt': "?",
    'bug33940.phpt': "?",
    'bug42177.phpt': "?",
    'bug42233.phpt': "?",
    'bug43495.phpt': "?",
    'bug44181.phpt': "?",
    'bug44182.phpt': "?",
    'bug48224.phpt': "?",
    'bug50006.phpt': "?",
    'bug50006_1.phpt': "?",
    'bug50006_2.phpt': "?",
    'compact.phpt': "SKIP: parse error in ini",
    'compact_variation1.phpt': "SKIP: parse error in INI",
    'each.phpt': "doesnt work properly",
    'extract_variation10.phpt': "?",
    'extract_variation11.phpt': "?",
    'extract_variation6.phpt': "?",
    'extract_safety.phpt': "missing debug_zval_dump()",
    'extract_variation1.phpt': "missing debug_zval_dump()",
    'extract_variation9.phpt': " missing get_object_vars()",
    'krsort_basic.phpt': "wrong order of elems",
    'krsort_variation2.phpt': "wrong order of elems",
    'ksort_variation2.phpt': "wrong order of elems",
    'ksort_variation8.phpt': "wrong odred of elems",
    'ksort_variation9.phpt': "wrong order of elems",
    'locale_sort.phpt': 'Xfail: requires the locale fr_FR.ISO-8859-1 to be available',
    'prev_error3.phpt': "FatalError: Argument 1 for prev() must be a variable",
    'range_variation.phpt': "parser problem",
    'rsort_basic.phpt': "wrong order of elems",
    'rsort_variation2.phpt': "wrong order of elems",
    'rsort_variation11.phpt': "wrong order of elems",
    'sort_variation2.phpt': "wrong order of elems",
    'sort_variation11.phpt': "?",
    'sort_variation9.phpt': "?",
    'uasort_basic2.phpt': "?",
    'uasort_object1.phpt': "?",
    'uasort_object2.phpt': "?",
    'uasort_variation11.phpt': "?",
    'uasort_variation6.phpt': "?",
    'usort_variation6.phpt': "?",
    'uksort_variation1.phpt': "arg check order problem",
    'range_variation1.phpt': "in/float mix",
    'rsort_variation3.phpt': "in/float mix",
    'usort_variation7.phpt': "missing create_function()",
    'uasort_variation7.phpt': "missing create_function()",
    'unexpected_array_mod_bug.phpt': "dont now how to find if w_arr was modified",
}

markers[class_object_test_dir] = {
    'get_class_error_001.phpt': "bad return value on failures",
    'get_class_vars_variation2.phpt': "undefined get_class_vars()",
    'get_declared_classes_basic_001.phpt': "works,  problem with %s regexp in output",
    'get_declared_interfaces_basic_001.phpt': "works,  problem with %s regexp in output",

    'get_declared_traits_basic_001.phpt': "unexpected T_STRING",
    'get_declared_traits_error_001.phpt': "undefined function get_declared_traits()",
    'get_declared_traits_variation1.phpt': "unexpected T_USE",
    'trait_class_exists_variation_003.phpt': "undefined function trait_exists()",
    'trait_exists_basic_001.phpt': "unexpected T_STRING",
    'trait_exists_error_001.phpt': "undefined function trait_exists()",
    'trait_exists_variation_001.phpt': "undefined function trait_exists()",
    'trait_exists_variation_002.phpt': "undefined function trait_exists()",
}

# MATH
markers[math_test_dir] = {
    "bug28228.phpt": "bullshit NULL as string arg",
    'bug45712.phpt': "the test is wrong (asks for inf != inf)",
    'tan_basiclong_64bit.phpt': 'Xfail: It produces a different result on Travis',
}


# DIR
markers[dir_test_dir] = {
    'opendir_variation2.phpt': "args problem",
    'closedir_variation1.phpt': "args problem",
    'rewinddir_variation1.phpt': "args problem",
    'readdir_variation1.phpt': "args problem",
}


# FILE
markers[file_test_dir] = {
    'bug26615.phpt': 'SKIP: requires TEST_PHP_EXECUTABLE in env',
    'bug26938.phpt': 'SKIP: requires TEST_PHP_EXECUTABLE in env',
    '001.phpt': "?",
    '004.phpt': "missing mkd5_file()",
    'bug12556.phpt': "?",
    'bug22382.phpt': "?",
    'bug26003.phpt': "?",

    'bug43353.phpt': "nightmare...",
    'bug45303.phpt': "nightmare...",
    'bug45303.phpt': "nightmare...",
    'bug52624.phpt': "nightmare...",
    'bug22414.phpt': "missing md5_file()",
    'bug27508.phpt': "missing stream_wrapper_register()",
    'bug27619.phpt': "?",
    'bug30362.phpt': "missing stream_get_line()",
    'bug35781.phpt': "missing stream_filter_append()",
    'bug37158.phpt': "missing stream_wrapper_register()",
    'bug38086.phpt': "missing stream_filter_append()",
    'bug38450.phpt': "missing stream_wrapper_register()",
    'bug38450_1.phpt': "missing stream_wrapper_register()",
    'bug38450_2.phpt': "T_THROW missing",
    'bug38450_3.phpt': "missing stream_wrapper_register()",
    'bug39551.phpt': "missing stream_bucket_new()",
    'bug39538.phpt': "?",
    'bug43008.phpt': "missing urlencode()",
    'bug43216.phpt': "missing stream_is_local()",
    'bug43522.phpt': "missing stream_get_line()",
    'bug44607.phpt': "missing stream_get_line()",
    'bug46347.phpt': "missing parse_ini_file()",
    'bug40501.phpt': "?",
    'bug41655_1.phpt': "glob problem",
    'bug44034.phpt': "?",
    'bug51094.phpt': "missing parse_ini_string()",
    'bug53241.phpt': "missing curl_init()",
    'bug53848.phpt': "?",
    'bug63512.phpt': "missing parse_ini_string()",
    'directory_wrapper_fstat_basic.phpt': "?",
    'clearstatcache_001.phpt': "?",
    'copy_variation4.phpt': "imo whole expect is wrong",
    'copy_variation3.phpt': "imo whole expect is wrong",
    'fgetc_variation1.phpt': "compile None",

    'php_fd_wrapper_03.phpt': "HW: creating array_from empty...",

    'fopen_variation14.phpt': "remote  host file access..?",
    'fopen_variation15.phpt': "remote  host file access..?",

    'fgetcsv.phpt': "not implemented",
    'fgetcsv_error.phpt': "not implemented",
    'fgetcsv_variation1.phpt': "not implemented",
    'fgetcsv_variation2.phpt': "not implemented",
    'fgetcsv_variation3.phpt': "not implemented",
    'fgetcsv_variation4.phpt': "not implemented",
    'fgetcsv_variation5.phpt': "not implemented",
    'fgetcsv_variation6.phpt': "not implemented",
    'fgetcsv_variation7.phpt': "not implemented",
    'fgetcsv_variation8.phpt': "not implemented",
    'fgetcsv_variation9.phpt': "not implemented",
    'fgetcsv_variation10.phpt': "not implemented",
    'fgetcsv_variation11.phpt': "not implemented",
    'fgetcsv_variation12.phpt': "not implemented",
    'fgetcsv_variation13.phpt': "not implemented",
    'fgetcsv_variation14.phpt': "not implemented",
    'fgetcsv_variation15.phpt': "not implemented",
    'fgetcsv_variation16.phpt': "not implemented",
    'fgetcsv_variation17.phpt': "not implemented",
    'fgetcsv_variation18.phpt': "not implemented",
    'fgetcsv_variation19.phpt': "not implemented",
    'fgetcsv_variation20.phpt': "not implemented",
    'fgetcsv_variation21.phpt': "not implemented",
    'fgetcsv_variation22.phpt': "not implemented",
    'fgetcsv_variation23.phpt': "not implemented",
    'fgetcsv_variation24.phpt': "not implemented",
    'fgetcsv_variation25.phpt': "not implemented",
    'fgetcsv_variation26.phpt': "not implemented",
    'fgetcsv_variation27.phpt': "not implemented",
    'fgetcsv_variation28.phpt': "not implemented",
    'fgetcsv_variation29.phpt': "not implemented",
    'fgetcsv_variation30.phpt': "not implemented",
    'fgetcsv_variation31.phpt': "not implemented",
    'fgets_socket_variation2.phpt': "error binding",
    'fgetss.phpt': "not implemented",
    'fgetss1.phpt': "not implemented",
    'fgetss_basic1.phpt': "not implemented",
    'fgetss_basic2.phpt': "not implemented",
    'fgetss_error.phpt': "not implemented",
    'fgetss_variation1.phpt': "not implemented",
    'fgetss_variation4.phpt': "not implemented",
    'fgetss_variation5.phpt': "not implemented",
    'file_get_contents_error.phpt': "invalid maxlength",
    'file_get_contents_error001.phpt': "http:// protocol",
    'file_get_contents_error002.phpt': "?",
    'file_put_contents_variation2.phpt': "?",
    'file_variation.phpt': "?",
    'flock.phpt': "missing flock()",
    'flock_basic.phpt': "missing flock()",
    'flock_error.phpt': "missing flock()",
    'flock_variation.phpt': "missing flock()",
    'fopencookie.phpt': "missing stream_wrapper_register()",
    'fflush_variation3.phpt': "?",
    'fopen_variation5.phpt': "hmm",
    'fopen_variation8.phpt': "hmm",
    'fputcsv_002.phpt': "not implemented",
    'fputcsv_error.phpt': "not implemented",
    'fputcsv.phpt': "not implemented",
    'fputcsv_variation10.phpt': "not implemented",
    'fputcsv_variation11.phpt': "not implemented",
    'fputcsv_variation12.phpt': "not implemented",
    'fputcsv_variation13.phpt': "not implemented",
    'fputcsv_variation14.phpt': "not implemented",
    'fputcsv_variation1.phpt': "not implemented",
    'fputcsv_variation2.phpt': "not implemented",
    'fputcsv_variation3.phpt': "not implemented",
    'fputcsv_variation4.phpt': "not implemented",
    'fputcsv_variation5.phpt': "not implemented",
    'fputcsv_variation6.phpt': "not implemented",
    'fputcsv_variation7.phpt': "not implemented",
    'fputcsv_variation8.phpt': "not implemented",
    'fputcsv_variation9.phpt': "not implemented",

    'fscanf.phpt': "not implemented",
    'fscanf_error.phpt': "not implemented",
    'fscanf_variation10.phpt': "not implemented",
    'fscanf_variation11.phpt': "not implemented",
    'fscanf_variation12.phpt': "not implemented",
    'fscanf_variation13.phpt': "not implemented",
    'fscanf_variation14.phpt': "not implemented",
    'fscanf_variation15.phpt': "not implemented",
    'fscanf_variation16.phpt': "not implemented",
    'fscanf_variation17.phpt': "not implemented",
    'fscanf_variation18.phpt': "not implemented",
    'fscanf_variation19.phpt': "not implemented",
    'fscanf_variation1.phpt': "not implemented",
    'fscanf_variation20.phpt': "not implemented",
    'fscanf_variation21.phpt': "not implemented",
    'fscanf_variation22.phpt': "not implemented",
    'fscanf_variation23.phpt': "not implemented",
    'fscanf_variation24.phpt': "not implemented",
    'fscanf_variation25.phpt': "not implemented",
    'fscanf_variation26.phpt': "not implemented",
    'fscanf_variation27.phpt': "not implemented",
    'fscanf_variation28.phpt': "not implemented",
    'fscanf_variation29.phpt': "not implemented",
    'fscanf_variation2.phpt': "not implemented",
    'fscanf_variation30.phpt': "not implemented",
    'fscanf_variation31.phpt': "not implemented",
    'fscanf_variation32.phpt': "not implemented",
    'fscanf_variation33.phpt': "not implemented",
    'fscanf_variation34.phpt': "not implemented",
    'fscanf_variation35.phpt': "not implemented",
    'fscanf_variation36.phpt': "not implemented",
    'fscanf_variation37.phpt': "not implemented",
    'fscanf_variation38.phpt': "not implemented",
    'fscanf_variation39.phpt': "not implemented",
    'fscanf_variation3.phpt': "not implemented",
    'fscanf_variation40.phpt': "not implemented",
    'fscanf_variation41.phpt': "not implemented",
    'fscanf_variation42.phpt': "not implemented",
    'fscanf_variation43.phpt': "not implemented",
    'fscanf_variation44.phpt': "not implemented",
    'fscanf_variation45.phpt': "not implemented",
    'fscanf_variation46.phpt': "not implemented",
    'fscanf_variation47.phpt': "not implemented",
    'fscanf_variation48.phpt': "not implemented",
    'fscanf_variation49.phpt': "not implemented",
    'fscanf_variation4.phpt': "not implemented",
    'fscanf_variation50.phpt': "not implemented",
    'fscanf_variation51.phpt': "not implemented",
    'fscanf_variation52.phpt': "not implemented",
    'fscanf_variation53.phpt': "not implemented",
    'fscanf_variation54.phpt': "not implemented",
    'fscanf_variation55.phpt': "not implemented",
    'fscanf_variation5.phpt': "not implemented",
    'fscanf_variation6.phpt': "not implemented",
    'fscanf_variation7.phpt': "not implemented",
    'fscanf_variation8.phpt': "not implemented",
    'fscanf_variation9.phpt': "not implemented",

    'fseek_dir_basic.phpt': "?",
    'fwrite_variation5.phpt': "?",
    'ftruncate_error.phpt': "fopen creates new empty file...",
    'readlink_variation1.phpt': 'warning missmatch',

    'include_userstream_001.phpt': "missing stream_register_wrapper()",
    'include_userstream_002.phpt': "missing stream_register_wrapper()",
    'include_userstream_003.phpt': "missing stream_register_wrapper()",
    'include_streams.phpt': "?",
    'is_uploaded_file_basic.phpt': "missing is_uploaded_file()",
    'lchgrp_basic.phpt': "missing lchgrp()",
    'lchown_basic.phpt': "missing lchown()",
    'lchown_error.phpt': "missing lchown()",
    'lstat_stat_variation4.phpt': "?",
    'lstat_stat_variation5.phpt': "?",
    'lstat_stat_variation6.phpt': "?",

    'move_uploaded_file_basic.phpt': "missing move_uploaded_file()",
    'parse_ini_file_error.phpt': "missing parse_ini_file()",
    'parse_ini_file.phpt': "missing parse_ini_file()",
    'parse_ini_file_variation1.phpt': "missing parse_ini_file()",
    'parse_ini_file_variation2.phpt': "missing parse_ini_file()",
    'parse_ini_file_variation3.phpt': "missing parse_ini_file()",
    'parse_ini_file_variation4.phpt': "missing parse_ini_file()",
    'parse_ini_file_variation5.phpt': "missing parse_ini_file()",
    'parse_ini_file_variation6.phpt': "missing parse_ini_file()",
    'pclose_variation1.phpt': "?",
    'php_fd_wrapper_01.phpt': "?",
    'php_fd_wrapper_02.phpt': "?",
    'php_fd_wrapper_04.phpt': "?",
    'popen_pclose_basic.phpt': "?",
    'parse_ini_file_variation4.phpt': "?",
    'parse_ini_file_variation5.phpt': "?",
    'proc_open01.phpt': "?",
    'realpath_cache.phpt': "missing realpath_cache_size()",
    'readlink_realpath_basic2.phpt': "?",
    'readfile_variation3.phpt': "?",
    'statpage.phpt': "missing getlastmod()",
    'stream_001.phpt': "missing stream_wrapper_unregister()",
    'stream_002.phpt': "missing stream_wrapper_unregister()",
    'stream_copy_to_stream.phpt': "missing stream_wrapper_unregister()",
    'stream_enclosed.phpt': "missing stream_wrapper_unregister()",
    'stream_get_line.phpt': "missing stream_wrapper_unregister()",
    'stream_supports_lock.phpt': "missing stream_wrapper_unregister()",

    'stream_rfc2397_001.phpt': "?",
    'stream_rfc2397_002.phpt': "?",
    'stream_rfc2397_003.phpt': "?",
    'stream_rfc2397_004.phpt': "?",
    'stream_rfc2397_005.phpt': "?",
    'stream_rfc2397_006.phpt': "?",
    'stream_rfc2397_007.phpt': "?",
    'symlink_link_linkinfo_is_link_variation3.phpt': "?",
    'tempnam_variation2.phpt': "strange....",
    'tempnam_variation3.phpt': "how ...",
    'tempnam_variation4.phpt': "perms problem",
    'touch_basic.phpt': "?",
    'userfilters.phpt': "?",
    'umask_basic.phpt': "missing umask()",
    'umask_error.phpt': "missing umask()",
    'umask_variation1.phpt': "missing umask()",
    'umask_variation2.phpt': "missing umask()",
    'umask_variation3.phpt': "missing umask()",
    'userstreams.phpt': "missing stream_wrapper_register()",
    'userstreams_002.phpt': "missing stream_wrapper_register()",
    'userstreams_003.phpt': "missing stream_wrapper_register()",
    'userstreams_004.phpt': "missing stream_wrapper_register()",
    'userstreams_005.phpt': "missing stream_wrapper_register()",
    'userstreams_006.phpt': "missing stream_wrapper_register()",
    'userstreams_007.phpt': "missing stream_wrapper_register()",
    'userdirstream.phpt': 'missing stream_wrapper_register()',
    'userwrapper.phpt': 'missing stream_wrapper_register()',
    'fgetss_variation2.phpt': slow,
    'fgetss_variation3.phpt': slow,
}

if IS_TRAVIS:
    markers[file_test_dir].update({
        'get_current_user.phpt': 'Fails with OSError: [Errno 25] Inappropriate ioctl for device on Travis',
        'fwrite_variation3.phpt': 'On Travis ftell returns incorrectly after writing',
        'disk_free_space_basic.phpt': 'Xfail: sometimes fail on Travis',
    })

# POSIX
markers[posix_test_dir] = {
    'posix_access.phpt': "Expecting: Deprecated: Directive safe_mode is ...",  # Update the tests to PHP 5.4
    'posix_access_error_modes.phpt': "Expecting: Deprecated: Directive safe_mode is ...",
    'posix_access_safemode.phpt': "Expecting: Deprecated: Directive safe_mode is ...",
    'posix_ttyname.phpt': "OSError: [Errno 25] Inappropriate ioctl for device",
    'posix_ttyname_variation6.phpt': "Missing:  Error: 8 - Object of class classWithToString could not be converted to int",
    'posix_getgrgid_basic.phpt': 'Problems with the %a format in the test. Output looks good',
    'posix_getgrgid_macosx.phpt': 'Test should be skipped in platforms other than mac',
    'posix_ttyname_error_wrongparams.phpt': 'missing imagecreate()',
    'posix_mkfifo_safemode.phpt': 'Xfail: On Travis and other setups it is possible to create a fifo in /tmp (probably there is only one user)',
}


# STRING
markers[string_test_dir] = {
    '004.phpt': "Section EXPECTREGEX not handled",
    'bug40754.phpt': check_sign_only,
    'bug54454.phpt': check_sign_only,
    'chunk_split.phpt': slow,  # hangs on 64-bit
    'implode.phpt': "$php_errormsg",
    'htmlentities22.phpt': "named constant in default args",
    'setlocale_error.phpt': ("not implemented: (deprecated) "
                             "category names as strings"),
    'setlocale_variation4.phpt': ("expects en_US as "
                                  "default system locale"),
    'setlocale_variation5.phpt': ("expects en_US as "
                                  "default system locale"),
    'strncasecmp_variation7.phpt': check_sign_only,
    'strncasecmp_variation9.phpt': check_sign_only,
    'stripslashes_variation5.phpt': "escape chars",
    'strncmp_variation7.phpt': check_sign_only,
    'substr_replace_array.phpt': "handles only lists",
    'vprintf_error.phpt': "PHP inconsistency",
    'vsprintf_error.phpt': "PHP inconsistency",
    'wordwrap_error.phpt': ("unimplemented corner "
                            "case when width < 0"),
    'wordwrap_variation2.phpt': ("unimplemented corner "
                                 "case when width < 0"),

    'sprintf_variation52.phpt': 'some problem',

    '005.phpt': "not implemented",
    '006.phpt': "not implemented",
    '007.phpt': "not implemented",
    'bug21453.phpt': "not implemented",
    'bug21730.phpt': "not implemented",
    'bug21744.phpt': "not implemented",
    'bug22008.phpt': "not implemented",
    'bug23650.phpt': "not implemented",
    'bug26817.phpt': "not implemented",
    'bug26819.phpt': "not implemented",
    'bug27295.phpt': "not implemented",
    'bug29075.phpt': "not implemented",
    'bug29119.phpt': "not implemented",
    'bug37262.phpt': "Call to undefined function create_function()",
    'bug38322.phpt': "not implemented",
    'bug40432.phpt': "not implemented",
    'bug42107.phpt': "not implemented",
    'bug44242.phpt': "not implemented",
    'bug44703.phpt': "not implemented",
    'bug46578.phpt': "not implemented",
    'bug47322.phpt': "not implemented",
    'bug47443.phpt': "not implemented",
    'bug47842.phpt': "not implemented",
    'bug48709.phpt': "not implemented",
    'bug49785.phpt': "not implemented",
    'bug50052.phpt': "not implemented",
    'bug50847.phpt': "not implemented",
    'bug51059.phpt': "not implemented",
    'bug51899.phpt': "not implemented",
    'bug53021.phpt': "not implemented",
    'bug53319.phpt': "not implemented",
    'bug54322.phpt': "not implemented",
    'bug54721.phpt': "not implemented",
    'bug55674.phpt': "not implemented",
    'bug55871.phpt': "not implemented",
    'bug62443.phpt': "not implemented",
    'convert_cyr_string.phpt': "not implemented",
    'convert_cyr_string_basic.phpt': "not implemented",
    'convert_cyr_string_error.phpt': "not implemented",
    'convert_cyr_string_variation1.phpt': "not implemented",
    'crypt.phpt': "not implemented",
    'crypt_blowfish.phpt': "not implemented",
    'crypt_blowfish_variation1.phpt': "not implemented",
    'crypt_blowfish_variation2.phpt': "not implemented",
    'crypt_chars.phpt': "not implemented",
    'crypt_sha256.phpt': "not implemented",
    'crypt_sha512.phpt': "not implemented",
    'crypt_variation1.phpt': "not implemented",
    'printf_64bit.phpt': 'precision warning XXX',
    'get_html_translation_table_basic1.phpt': "not implemented",
    'get_html_translation_table_basic10.phpt': "not implemented",
    'get_html_translation_table_basic2.phpt': "not implemented",
    'get_html_translation_table_basic3.phpt': "not implemented",
    'get_html_translation_table_basic4.phpt': "not implemented",
    'get_html_translation_table_basic5.phpt': "not implemented",
    'get_html_translation_table_basic6.phpt': "not implemented",
    'get_html_translation_table_basic7.phpt': "not implemented",
    'get_html_translation_table_basic8.phpt': "not implemented",
    'get_html_translation_table_basic9.phpt': "not implemented",
    'get_html_translation_table_error.phpt': "not implemented",
    'get_html_translation_table_variation1.phpt': "not implemented",
    'get_html_translation_table_variation2.phpt': "not implemented",
    'get_meta_tags.phpt': "not implemented",
    'hebrev_basic.phpt': "not implemented",
    'hebrev_error.phpt': "not implemented",
    'hebrev_variation1.phpt': "not implemented",
    'hebrev_variation2.phpt': "not implemented",
    'hebrevc_basic.phpt': "not implemented",
    'hebrevc_error.phpt': "not implemented",
    'hebrevc_variation1.phpt': "not implemented",
    'hebrevc_variation2.phpt': "not implemented",
    'highlight_file.phpt': "not implemented",
    'html_entity_decode1.phpt': "not implemented",
    'html_entity_decode3.phpt': "not implemented",
    'html_entity_decode_cp866.phpt': "not implemented",
    'html_entity_decode_html4.phpt': "not implemented",
    'html_entity_decode_html5.phpt': "not implemented",
    'html_entity_decode_iso8859-15.phpt': "not implemented",
    'html_entity_decode_iso8859-5.phpt': "not implemented",
    'html_entity_decode_koi8-r.phpt': "not implemented",
    'html_entity_decode_macroman.phpt': "not implemented",
    'html_entity_decode_win1251.phpt': "not implemented",
    'html_entity_decode_win1252.phpt': "not implemented",
    'htmlentities-utf-2.phpt': "not implemented",
    'htmlentities-utf-3.phpt': "not implemented",
    'htmlentities-utf.phpt': "not implemented",
    'htmlentities.phpt': "not implemented",
    'htmlentities01.phpt': "not implemented",
    'htmlentities02.phpt': "not implemented",
    'htmlentities03.phpt': "not implemented",
    'htmlentities04.phpt': "not implemented",
    'htmlentities05.phpt': "not implemented",
    'htmlentities06.phpt': "SKIP: parse error in CLEAN",
    'htmlentities07.phpt': "SKIP: parse error in CLEAN",
    'htmlentities08.phpt': "not implemented",
    'htmlentities09.phpt': "not implemented",
    'htmlentities10.phpt': "not implemented",
    'htmlentities11.phpt': "SKIP: parse error in CLEAN",
    'htmlentities12.phpt': "SKIP: parse error in CLEAN",
    'htmlentities13.phpt': "not implemented",
    'htmlentities14.phpt': "not implemented",
    'htmlentities15.phpt': "not implemented",
    'htmlentities16.phpt': "not implemented",
    'htmlentities17.phpt': "not implemented",
    'htmlentities18.phpt': "not implemented",
    'htmlentities19.phpt': "not implemented",
    'htmlentities20.phpt': "not implemented",
    'htmlentities21.phpt': "not implemented",
    'htmlentities23.phpt': "not implemented",
    'htmlentities24.phpt': "not implemented",
    'htmlentities_html4.phpt': "not implemented",
    'htmlentities_html5.phpt': "not implemented",
    'http_build_query.phpt': "not implemented",
    'http_build_query_error.phpt': "not implemented",
    'http_build_query_variation1.phpt': "not implemented",
    'http_build_query_variation2.phpt': "not implemented",
    'md5_file.phpt': "not implemented",
    'metaphone.phpt': "not implemented",
    'money_format_basic1.phpt': "not implemented",
    'money_format_error.phpt': "not implemented",
    'money_format_variation1.phpt': "not implemented",
    'money_format_variation2.phpt': "not implemented",
    'moneyformat.phpt': "not implemented",
    'number_format_error.phpt': "not implemented",
    'parse_str_basic1.phpt': "not implemented",
    'parse_str_basic2.phpt': "not implemented",
    'parse_str_basic3.phpt': "not implemented",
    'parse_str_basic4.phpt': "not implemented",
    'php_strip_whitespace.phpt': "not implemented",
    'sha1.phpt': 'sha1_file not implemented',
    'sha1_file.phpt': "not implemented",
    'show_source_basic.phpt': "not implemented",
    'show_source_variation1.phpt': "not implemented",
    'show_source_variation2.phpt': "not implemented",
    'similar_text_basic.phpt': "not implemented",
    'similar_text_error.phpt': "not implemented",
    'sscanf_basic1.phpt': "not implemented",
    'sscanf_basic2.phpt': "not implemented",
    'sscanf_basic3.phpt': "not implemented",
    'sscanf_basic4.phpt': "not implemented",
    'sscanf_basic5.phpt': "not implemented",
    'sscanf_basic7.phpt': "not implemented",
    'sscanf_basic8.phpt': "not implemented",
    'sscanf_error.phpt': "not implemented",
    'sscanf_variation1.phpt': "not implemented",
    'sscanf_variation2.phpt': "not implemented",
    'str_getcsv_001.phpt': "not implemented",
    'str_word_count.phpt': "not implemented",
    'str_word_count1.phpt': "not implemented",
    'strip_tags.phpt': "not implemented",
    'strip_tags_basic2.phpt': "not implemented",
    'strip_tags_variation10.phpt': "not implemented",
    'strip_tags_variation11.phpt': "not implemented",
    'strip_tags_variation2.phpt': "not implemented",
    'strip_tags_variation4.phpt': "not implemented",
    'strip_tags_variation5.phpt': "not implemented",
    'strip_tags_variation6.phpt': "not implemented",
    'strip_tags_variation7.phpt': "not implemented",
    'strip_tags_variation8.phpt': "not implemented",
    'strip_tags_variation9.phpt': "not implemented",
    'unpack_error.phpt': "Invalid format type Z????",
    'vfprintf_error4.phpt': "warning issue",
    'vfprintf_variation1.phpt': "context",
    'wordwrap.phpt': "not implemented",

    'http_build_query_variation3.phpt': "need to review",
    'join_error.phpt': "Errors say implode() instead of join()",
    'join_variation2.phpt': "need to review",
    'str_replace.phpt': "need to review",
    'stripos_variation10.phpt': "need to review",
    'stripos_variation11.phpt': "need to review",
    'stristr_variation2.phpt': "For an object it expects: Notice: Object of class sample could not be converted to int",
    'strlen.phpt': "Expects: Warning: strlen() expects parameter 1 to be string, array given got Notice instead",
    'strlen_variation1.phpt': "need to review",
    'strncasecmp_variation10.phpt': "need to review",
    'strncasecmp_variation11.phpt': "need to review",
    'strncasecmp_variation4.phpt': "need to review",
    'strncmp_variation4.phpt': "need to review",
    'strrchr_variation10.phpt': "need to review",
    'strrchr_variation11.phpt': "need to review",
    'strrpos_variation10.phpt': "need to review",
    'strrpos_variation11.phpt': "need to review",
}

# GENERAL
markers[general_test_dir] = {
    'bug47027.phpt': "Missing ArrayObject class",
    'bug60227_4.phpt': 'SKIP: Unknown phpt section header: EXPECTHEADERS',
    'bug60227_3.phpt': 'SKIP: Unknown phpt section header: EXPECTHEADERS',
    'bug60227_2.phpt': 'SKIP: Unknown phpt section header: EXPECTHEADERS',
    'bug60227_1.phpt': 'SKIP: Unknown phpt section header: EXPECTHEADERS',
    'debug_zval_dump_b_64bit.phpt': ("NotImplementedError: "
                                     "abstract base class"),
    'debug_zval_dump_v.phpt': ("NotImplementedError: "
                               "abstract base class"),
    'var_export_basic6.phpt': "var_dump reports different lengths",
    'type.phpt': "?",
    'gettype_settype_basic.phpt': "?",
    'parse_ini_file.phpt': "parsing",
    'print_r_64bit.phpt': "?",
    'parse_ini_string_002.phpt': "?",
    'include_path.phpt': "?",
    'call_user_func_array_variation_003.phpt': "?",
    'call_user_func_array_variation_001.phpt': "missing call_user_func_array()",

    '004.phpt': "not implemented",
    '010.phpt': "not implemented",
    'bug27678.phpt': "not implemented",
    'bug29038.phpt': "not implemented",
    'bug32647.phpt': "not implemented",
    'bug34794.phpt': "not implemented",
    'bug39322.phpt': "not implemented",
    'bug40398.phpt': "not implemented",
    'bug40752.phpt': "not implemented",
    'bug41037.phpt': "not implemented",
    'bug41445.phpt': "not implemented",
    'bug41445_1.phpt': "not implemented",
    'bug41970.phpt': "not implemented",
    'bug43293_1.phpt': "not implemented",
    'bug43293_2.phpt': "not implemented",
    'bug43293_3.phpt': "not implemented",
    'bug44394.phpt': "not implemented",
    'bug44394_2.phpt': "not implemented",
    'bug44461.phpt': "not implemented",
    'bug44487.phpt': "not implemented",
    'bug44667.phpt': "not implemented",
    'bug47857.phpt': "not implemented",
    'bug47859.phpt': "not implemented",
    'bug48660.phpt': "not implemented",
    'bug48768.phpt': "not implemented",
    'bug49056.phpt': "not implemented",
    'bug49692.phpt': "not implemented",
    'bug52138.phpt': "not implemented",
    'bug55371.phpt': "not implemented",
    'bug60723.phpt': "not implemented",
    'call_user_func_return.phpt': "not implemented",
    'call_user_method.phpt': "not implemented",
    'call_user_method_002.phpt': "not implemented",
    'callbacks_001.phpt': "parent as class name",
    'callbacks_002.phpt': "wording",
    'closures_001.phpt': "undefined register_shutdown_function()",
    'closures_002.phpt': "unexpected T_DECLARE",
    'debug_zval_dump_e.phpt': "not implemented",
    'debug_zval_dump_o.phpt': "not implemented",
    'dl-cve-2007-4887.phpt': "not implemented",
    'error_get_last.phpt': "not implemented",
    'get_defined_constants_basic.phpt': slow,
    'get_extension_funcs_basic.phpt': "not implemented",
    'get_extension_funcs_error.phpt': "not implemented",
    'get_extension_funcs_variation.phpt': "not implemented",
    'get_loaded_extensions_basic.phpt': "not implemented",
    'get_magic_quotes_runtime.phpt': "not implemented",
    'getopt.phpt': "not implemented",
    'getopt_002.phpt': "not implemented",
    'getopt_003.phpt': "not implemented",
    'getopt_004.phpt': "not implemented",
    'getopt_005.phpt': "not implemented",
    'gettype_settype_error.phpt': "not implemented",
    'get_cfg_var_basic.phpt': "requires ini parse to return strings",
    'get_cfg_var_variation6.phpt': "requires ini parse to return strings",
    'get_cfg_var_variation8.phpt': "magic_quotes_gpc unsupported",
    'get_cfg_var_variation9.phpt': "requires ini parse to return strings",
    'head.phpt': "not implemented",
    'highlight_heredoc.phpt': "not implemented",
    'ini_get_all.phpt': "not implemented",
    'is_callable_basic1.phpt': "not implemented",
    'is_callable_basic2.phpt': "not implemented",
    'is_callable_variation1.phpt': "not implemented",
    'is_callable_variation2.phpt': "not implemented",
    'ob_get_flush_basic.phpt': "not implemented",
    'ob_get_flush_error.phpt': "not implemented",
    'parse_ini_basic.phpt': "not implemented",
    'parse_ini_booleans.phpt': "not implemented",
    'parse_ini_string_001.phpt': "not implemented",
    'phpcredits.phpt': "not implemented",
    'phpcredits2.phpt': "not implemented",
    'phpinfo.phpt': "not implemented",
    'phpinfo2.phpt': "not implemented",
    'proc_open02.phpt': "not implemented",
    'set_magic_quotes_runtime_basic.phpt': "not implemented",
    'set_magic_quotes_runtime_error.phpt': "not implemented",
    'var_dump_64bit.phpt': "not implemented",
}

class SkipAll(dict):
    def get(self, *args):
        return 'SKIP: skipping the whole dir'

markers[basic_test_dir] = {
    '011.phpt': "undefined argc argv",
    '002.phpt': "POST",
    '003.phpt': "POST/GET/COOKIE",
    '004.phpt': "POST",
    '005.phpt': "POST",
    '013.phpt': "POST",
    '014.phpt': "POST",
    '015.phpt': "POST",
    '016.phpt': "POST",
    '017.phpt': "POST",
    '018.phpt': "POST",
    '019.phpt': "POST",
    '020.phpt': "POST",
    '022.phpt': "COOKIE",
    '023.phpt': "COOKIE",
    '024.phpt': "HTTP_RAW_POST_DATA",
    '025.phpt': "POST Content-Length",
    '027.phpt': "$php_errormsg",
    'bug20539.phpt': "?",
    'bug29971.phpt': "$_ENV",
    'bug51709_1.phpt': "parse error wording",
    'bug51709_2.phpt': "parse error wording",
    'bug53180.phpt': "order of keys",
    'bug54514.phpt': "?",
    'bug61000.phpt': "?",
    'php_egg_logo_guid.phpt': "undefined php_egg_logo_guid()",
    'php_logo_guid.phpt': "undefined php_logo_guid()",
    'php_real_logo_guid.phpt': "undefined php_real_logo_guid()",
    'zend_logo_guid.phpt': "undefined zend_logo_guid()",

}
markers[classes_test_dir] = {
    '__call_002.phpt': 'missing fatal',
    '__set__get_002.phpt': "missing fatal",
    '__set__get_003.phpt': "missing fatal",
    'abstract_by_interface_001.phpt': 'order of execution for class defs vs ordinary statements',
    'abstract_by_interface_002.phpt': 'order of execution for class defs vs ordinary statements',
    'abstract_static.phpt': 'unexpected T_EVAL',
    'abstract_user_call.phpt': 'unimplemented case in call_user_func()',
    'array_access_003.phpt': "ArrayAccess: Fix ++ to raise notice for indirect modification of overloaded element",
    'array_access_004.phpt': "ArrayAccess: Fix ++ to raise notice for indirect modification of overloaded element",
    'array_access_009.phpt': "ArrayAccess: Operator implementation fix required",
    'array_access_010.phpt': "ArrayAccess: Operator implementation fix required",
    'array_access_011.phpt': "ArrayAccess: Operator implementation fix required",
    'array_access_012.phpt': "ArrayAccess: Fix ++ to raise notice for indirect modification of overloaded element",
    'autoload_005.phpt': "__destruct()",
    'autoload_010.phpt': "__autoload() is called twice",
    'autoload_011.phpt': "__autoload() is called twice",
    'autoload_013.phpt': '?',
    'autoload_014.phpt': "missing ReflectionMethod",
    'autoload_015.phpt': "missing ReflectionProperty",
    'autoload_016.phpt': 'ReflectionClass missing',
    'autoload_017.phpt': 'ReflectionClass missing',
    'bug27468.phpt': "need review",
    'bug63462.phpt': "need review",
    'constants_error_003.phpt': 'error message wording',
    'constants_error_004.phpt': 'missing fatal',
    'ctor_dtor.phpt': '__destruct()',
    'ctor_dtor_inheritance.phpt': "__destruct()",
    'ctor_in_interface_01.phpt': 'missing fatal (signature)',
    'ctor_in_interface_02.phpt': 'missing fatal (signature)',
    'ctor_in_interface_03.phpt': 'missing fatal (signature)',
    'ctor_in_interface_04.phpt': 'strict warning should be fatal error',
    'ctor_visibility.phpt': 'error message wording',
    'destructor_and_echo.phpt': "__destruct()",
    'destructor_and_exceptions.phpt': 'missing additional_catch',
    'destructor_and_globals.phpt': '__destruct()',
    'destructor_inheritance.phpt': '__destruct()',
    'destructor_visibility_001.phpt': "missing Derived::__destruct is being called not Base::__destruct",
    'destructor_visibility_002.phpt': "__destruct()",
    'destructor_visibility_003.phpt': "missing Derived::__destruct is being called not Base::__destruct",
    'factory_and_singleton_001.phpt': "__destruct()",
    'factory_and_singleton_002.phpt': "__destruct()",
    'factory_and_singleton_005.phpt': '__destruct()',
    'factory_and_singleton_006.phpt': '__destruct()',
    'factory_and_singleton_009.phpt': '__destruct()',
    'factory_and_singleton_010.phpt': '__destruct()',
    'final_ctor1.phpt': 'Class ReflectionClass not found',
    'final_ctor2.phpt': 'Class ReflectionClass not found',
    'implicit_instantiation_001.phpt': "need review",
    'inheritance_007.phpt': 'missing ReflectionClass',
    'interface_method.phpt': "syntax error, unexpected ';'",
    'interface_method_private.phpt': 'error message wording',
    'interfaces_003.phpt': 'typehinting for constructor',
    'iterators_002.phpt': "missing __destruct()",
    'iterators_005.phpt': "missing fatal (implements Traversable)",
    'new_001.phpt': 'deprecated in PHP',
    'serialize_001.phpt': "need review",
    'static_properties_undeclared_read.phpt': "missing fatal",
    'tostring_001.phpt': "?",
    'tostring_002.phpt': "__destruct()",
    'tostring_003.phpt': 'missing fatal error (__destruct())',
    'tostring_004.phpt': 'printf()',
    'type_hinting_004.phpt': 'set_error_handler()',
}
markers[func_test_dir] = {
    '005.phpt': "undefined function register_shutdown_function()",
    '005a.phpt': slow,   # infinity slow for now
    '006.phpt': "problem with ob_buffering",
    '007.phpt': "problem in ini_set()",
    '010.phpt': slow,
    'ini_alter.phpt': "undefined function ini_alter()",
}
markers[lang_test_dir] = {
    '019.phpt': "T_EVAL",
    '031.phpt': slow,
    '038.phpt': "?",
    '045.phpt': "missing set_time_limit()",
    'bug17115.phpt': "missing create_function()",
    'bug20175.phpt': "deprecated in PHP",
    'bug21094.phpt': "set_error_handler()",
    'bug21820.phpt': "should not parse",
    'bug22231.phpt': "deprecated in PHP",
    'bug22510.phpt': "unexpected T_LIST",
    'bug22690.phpt': "missing create_function()",
    'bug23624.phpt': "does not compile",
    'bug24403.phpt': "problem in preg_replace()",
    'bug24658.phpt': "error wording",
    'bug24908.phpt': "?",
    'bug24926.phpt': "missing create_function()",
    'bug24951.phpt': "?",
    'bug25145.phpt': "undefined _REQUEST",
    'bug25922.phpt': "?",
    'bug30578.phpt': "?",
    'bug32828.phpt': "missing fatal (uncaught exception)",
    'bug35176.phpt': "?",
    'bug44827.phpt': "missing warning",
    'bug45392.phpt': "missing fatal",
    'bug55754.phpt': "Cannot pass parameter 1 by reference",
    'catchable_error_002.phpt': "?",
    'each_binary_safety.phpt': slow,
    'engine_assignExecutionOrder_002.phpt': "?",
    'engine_assignExecutionOrder_004.phpt': "?",
    'engine_assignExecutionOrder_007.phpt': "?",
    'error_2_exception_001.phpt': "undefined trigger_error()",
    'foreachLoop.001.phpt': "problem with current()",
    'foreachLoop.005.phpt': "needs proper refcounting?",
    'foreachLoop.006.phpt': "store_fast_ref() with non-ref",
    'foreachLoop.007.phpt': "should not parse",
    'foreachLoop.009.phpt': "?",
    'foreachLoop.011.phpt': "?",
    'foreachLoop.013.phpt': "parse error",
    'foreachLoop.014.phpt': "?",
    'foreachLoop.015.phpt': "?",
    'foreachLoop.016.phpt': "needs proper refcounting?",
    'foreachLoopObjects.003.phpt': "?",
    'foreachLoopObjects.005.phpt': "?",
    'foreachLoopObjects.006.phpt': "?",
    'passByReference_002.phpt': "wrong kind of fatal",
    'passByReference_005.phpt': "order of warnings",
    'passByReference_010.phpt': "should be strict instead of fatal",
    'returnByReference.003.phpt': "missing warnings",
    'returnByReference.004.phpt': "missing warnings",
    'returnByReference.005.phpt': "missing warnings",
    'returnByReference.006.phpt': "missing warnings",
    'returnByReference.007.phpt': "missing warnings",
    'returnByReference.008.phpt': "missing warnings",
    'returnByReference.009.phpt': "missing warnings",
    'script_tag.phpt': "?",
    'short_tags.002.phpt': "?",
    'short_tags.003.phpt': "?",
    'short_tags.004.phpt': "?",
    'type_hints_002.phpt': "instance numbering",
    'type_hints_003.phpt': "missing fatal",
}
markers[operators_test_dir] = {
    'operator_equals_basic.phpt': "precision issue in str to float conversion",
    'operator_gt_or_equal_basic.phpt': "precision issue in str to float conversion",
    'operator_notequals_basic.phpt': "precision issue in str to float conversion",
}
markers[output_test_dir] = {
    'bug46897.phpt': "ob_start() with 3 args",
    'bug60282.phpt': "undefined ob_gzhandler()",
    'ob_010.phpt': "our print_r() does not use output buffering",
    'ob_013.phpt': "undefined ob_list_handlers()",
    'ob_015.phpt': "recursion problem",
    'ob_017.phpt': "flags",
    'ob_get_level_basic_001.phpt': 'does not work prop',
    'ob_get_status.phpt': "undefined ob_get_status()",
    'ob_start_basic_002.phpt': "undefined get_defined_functions()",
    'ob_start_basic_005.phpt': "undefined ob_list_handlers()",
    'ob_start_basic_006.phpt': "undefined ob_list_handlers()",
    'ob_start_basic_unerasable_002.phpt': "ob_start() with 3 args",
    'ob_start_basic_unerasable_003.phpt': "ob_start() with 3 args",
    'ob_start_basic_unerasable_004.phpt': "ob_start() with 3 args",
    'ob_start_basic_unerasable_005.phpt': "ob_start() with 3 args",
}
markers[runtest_test_dir] = {
    'test002.phpt': "%x unsupported",
    'test004.phpt': "SKIP: parse error in ini",
    'test005.phpt': "Undefined variable: php_errormsg",
    'test007.phpt': "dirname()",
    'test008.phpt': "division by zero",
    'test008a.phpt': "Undefined variable: php_errormsg",
    'test010.phpt': "SKIP: unknown section STDIN",
}
markers[security_test_dir] = {
    'open_basedir_001.phpt': 'dir runtime tighting',
    'open_basedir_dir.phpt': 'dir not implemented',
    'open_basedir_error_log.phpt': '?',
    'open_basedir_error_log_variation.phpt': '?',
    'open_basedir_glob.phpt': 'missing glob',
    'open_basedir_glob_variation.phpt': 'missing glob',
    'open_basedir_linkinfo.phpt': 'warning missmatch',
    'open_basedir_tempnam.phpt': 'warning missmatch',
}

markers[strings_test_dir] = {
    '002.phpt': "problem with php://stdout",
    '004.phpt': "undefined function highlight_string()",
    'bug26703.phpt': "undefined function highlight_string()",
}


markers[mysql_test_dir] = {
    'bug48754.phpt': "problems problems",
    'bug53649.phpt': "The used command is not allowed with this MySQL version",
    'bug55473.phpt': "problems problems",
    'mysql_create_db.phpt': "deprecated api",
    'mysql_deprecated_api.phpt': "deprecated",
    'mysql_drop_db.phpt': "deprecated",
    'mysql_escape_string.phpt': 'unimplemented mysql_escape_string',
    'mysql_fetch_array.phpt': "missing data() printf issues",
    'mysql_fetch_field.phpt': "SKIP: hangs, regexp flags not supported yet",
    'mysql_fetch_lengths.phpt': "?",
    'mysql_fetch_object.phpt': 'still problems',
    'mysql_field_flags.phpt': "SKIP: regexp flags not supported yet",
    'mysql_max_links.phpt': 'printf() problem',
    'mysql_max_persistent.phpt': 'printf() problem',
    'mysql_pconn_disable.phpt': "not finished",
    'mysql_pconn_kill.phpt': "dont have persistent connections for real :)",
    'mysql_pconn_max_links.phpt': 'missing mysql_real_escape_string()',
    'mysql_pconn_reuse.phpt': 'printf() problem',
    'mysql_phpinfo.phpt': "?",
    'mysql_query_load_data_openbasedir.phpt': "not finished",
    'mysql_result.phpt': '?',
    'mysql_sql_safe_mode.phpt': "?",
    # 'mysql_stat.phpt': "missing soundex()",
    'mysql_trace_mode.phpt': 'missing mysql_escape_string()',
}

markers[network_test_dir] = {
    'bug41347.phpt': 'missing dns_check_record()',
    'closelog_basic.phpt': 'missing closelog()',
    'closelog_error.phpt': 'missing closelog()',
    'fsockopen_error.phpt': 'error',
    'gethostbyname_error003.phpt':
    'GAIError: No address associated with hostname',
    'gethostbyname_error005.phpt': 'args problem',
    'gethostbyname_error006.phpt':
    'GAIError: No address associated with hostname',
    'gethostbynamel_basic1.phpt': 'compare problem %a',
    'getmxrr.phpt': 'missing getmxrr()',
    'http-stream.phpt': 'Class DomDocument not found',
    'inet.phpt': 'inet_ntop() takes exactly 2 arguments (1 given)',
    'inet_ipv6.phpt': 'SKIP: ValueError in SKIPIF',
    'ip_x86_64.phpt': 'does not work as expected',
    'long2ip_variation1.phpt': 'does not work as expected',
    'socket_get_status_basic.phpt': 'missing stream_socket_server()',
    'syslog_error.phpt': 'missing syslog()',
    'tcp4loop.phpt': 'missing stream_socket_server()',
    'tcp6loop.phpt': 'missing stream_socket_server()',
    'udgloop.phpt': 'missing stream_get_transports()',
    'udp4loop.phpt': 'missing stream_socket_server()',
    'udp6loop.phpt': 'missing stream_socket_server()',
    'unixloop.phpt': 'missing stream_get_transports()',

}

markers[url_test_dir] = {
    'get_headers_error_001.phpt': 'get_headers not implemented',
    'get_headers_error_002.phpt': 'get_headers not implemented',
}

markers[session_test_dir] = {
    '004.phpt': 'not implemented',
    '005.phpt': 'not implemented',
    '012.phpt': 'not implemented',
    '014.phpt': 'not implemented',
    '015.phpt': 'SKIP: parse error in ini',
    '018.phpt': 'not implemented',
    '020.phpt': 'not implemented',
    '021.phpt': 'not implemented',
    '024.phpt': 'not implemented',
    '025.phpt': 'not implemented',
    'bug26862.phpt': 'not implemented',
    'bug31454.phpt': 'not implemented',
    'bug32330.phpt': 'not implemented',
    'bug36459.phpt': 'not implemented',
    'bug41600.phpt': 'not implemented',
    'bug42596.phpt': 'not implemented',
    'bug53141.phpt': 'not implemented',
    'bug55688.phpt': 'not implemented',
    'bug60634_error_1.phpt': 'not implemented',
    'bug60634_error_2.phpt': 'not implemented',
    'bug60634_error_3.phpt': 'not implemented',
    'bug60634_error_4.phpt': 'not implemented',
    'bug60634_error_5.phpt': 'not implemented',
    'bug60634.phpt': 'not implemented',
    'bug60860.phpt': 'not implemented',
    'bug61728.phpt': 'not implemented',
    'bug63379_nodestroy.phpt': 'not implemented',
    'bug63379.phpt': 'not implemented',
    'rfc1867_cleanup.phpt': 'not implemented',
    'rfc1867_disabled_2.phpt': 'not implemented',
    'rfc1867_disabled.phpt': 'not implemented',
    'rfc1867_inter.phpt': 'not implemented',
    'rfc1867_invalid_settings_2.phpt': 'SKIP: parse error in ini',
    'rfc1867_invalid_settings_2-win.phpt': 'SKIP: parse error in ini',
    'rfc1867_invalid_settings.phpt': 'not implemented',
    'rfc1867_invalid_settings-win.phpt': 'not implemented',
    'rfc1867_no_name.phpt': 'not implemented',
    'rfc1867.phpt': 'not implemented',
    'rfc1867_sid_cookie.phpt': 'not implemented',
    'rfc1867_sid_get_2.phpt': 'not implemented',
    'rfc1867_sid_get.phpt': 'not implemented',
    'rfc1867_sid_invalid.phpt': 'not implemented',
    'rfc1867_sid_only_cookie_2.phpt': 'not implemented',
    'rfc1867_sid_only_cookie.phpt': 'not implemented',
    'rfc1867_sid_post.phpt': 'not implemented',
    'save_handler_closures.inc': 'not implemented',
    'save_handler.inc': 'not implemented',

    'session_cache_expire_error.phpt': 'round problem',
    'session_cache_expire_variation2.phpt': 'not implemented',

    'session_decode_error2.phpt': 'resource as index',
    'session_decode_basic.phpt': 'instance counter',
    'session_decode_variation2.phpt': 'problem with _SESSION shold rise notice',
    'session_decode_variation3.phpt': 'problem with _SESSION shold rise notice',

    'session_encode_error2.phpt': 'resource as index',
    'session_encode_variation1.phpt': 'nonsense lack of warnings',
    'session_encode_variation7.phpt': 'php-binary not implemented yet',

    'sessionhandler_open_001.phpt': 'not implemented',
    'session_id_error4.phpt': 'string length problem..???',

    'session_module_name_basic.phpt': 'not implemented',
    'session_module_name_error.phpt': 'not implemented',
    'session_module_name_variation1.phpt': 'not implemented',
    'session_module_name_variation2.phpt': 'undefined session_set_save_handler()',
    'session_module_name_variation3.phpt': 'not implemented',

    'session_save_path_error.phpt': 'not implemented',
    'session_save_path_variation2.phpt': 'not implemented',
    'session_save_path_variation3.phpt': 'not implemented',
    'session_save_path_variation4.phpt': 'not implemented',
    'session_save_path_variation5.phpt': 'not implemented',

    'session_set_save_handler_basic.phpt': 'not implemented',
    'session_set_save_handler_class_001.phpt': 'not implemented',
    'session_set_save_handler_class_002.phpt': 'not implemented',
    'session_set_save_handler_class_003.phpt': 'not implemented',
    'session_set_save_handler_class_004.phpt': 'not implemented',
    'session_set_save_handler_class_005.phpt': 'not implemented',
    'session_set_save_handler_class_006.phpt': 'not implemented',
    'session_set_save_handler_class_007.phpt': 'not implemented',
    'session_set_save_handler_class_008.phpt': 'not implemented',
    'session_set_save_handler_class_009.phpt': 'not implemented',
    'session_set_save_handler_class_010.phpt': 'not implemented',
    'session_set_save_handler_class_011.phpt': 'not implemented',
    'session_set_save_handler_class_012.phpt': 'not implemented',
    'session_set_save_handler_class_013.phpt': 'not implemented',
    'session_set_save_handler_class_014.phpt': 'not implemented',
    'session_set_save_handler_class_015.phpt': 'not implemented',
    'session_set_save_handler_closures.phpt': 'not implemented',
    'session_set_save_handler_error2.phpt': 'not implemented',
    'session_set_save_handler_error3.phpt': 'not implemented',
    'session_set_save_handler_error4.phpt': 'not implemented',
    'session_set_save_handler_error.phpt': 'not implemented',
    'session_set_save_handler_iface_001.phpt': 'not implemented',
    'session_set_save_handler_iface_002.phpt': 'not implemented',
    'session_set_save_handler_variation1.phpt': 'not implemented',
    'session_set_save_handler_variation2.phpt': 'not implemented',
    'session_set_save_handler_variation3.phpt': 'not implemented',
    'session_set_save_handler_variation4.phpt': 'not implemented',
    'session_status_disabled.phpt': 'not implemented',
}

markers[serialize_test_dir] = {
    '003.phpt': 'EXPECTREGEX',
    '005.phpt': 'Interface Serialzable not defined',
    '006.phpt': 'lexer problems,  possibly utf-problem',
    'bug25378.phpt': 'does not work yet',
    'bug26762.phpt': 'does not work yet',
    'bug27469.phpt': 'does not work yet',
    'bug31402.phpt': 'does not work yet',
    'bug36424.phpt': 'does not work yet',
    'bug45706.phpt': 'does not work yet',
    'bug62836_1.phpt': 'does not work yet',
    'bug62836_2.phpt': 'does not work yet',
    'bug64354_3.phpt': 'does not work yet',
    'incomplete_class.phpt': 'does not work yet',
    'serialization_miscTypes_001.phpt': 'only 32bit',
    'serialization_objects_001.phpt': 'does not work yet',
    'serialization_objects_002.phpt': 'does not work yet',
    'serialization_objects_005.phpt': 'does not work yet',
    'serialization_objects_006.phpt': 'does not work yet',
    'serialization_objects_007.phpt': 'does not work yet',
    'serialization_objects_008.phpt': 'does not work yet',
    'serialization_objects_009.phpt': 'does not work yet',
    'serialization_objects_010.phpt': 'does not work yet',
    'serialization_objects_015.phpt': 'does not work yet',
}

markers[streams_test_dir] = {
    "bug40459.phpt": "SKIP: not implemented",
    "bug44712.phpt": "SKIP: not implemented",
    "bug44818.phpt": "SKIP: not implemented",
    "bug46024.phpt": "SKIP: not implemented",
    "bug46426.phpt": "SKIP: not implemented",
    "bug47997.phpt": "SKIP: not implemented",
    "bug48309.phpt": "SKIP: not implemented",
    "bug49936.phpt": "SKIP: not implemented",
    "bug49936_win32.phpt": "SKIP: not implemented",
    "bug53427.phpt": "SKIP: not implemented",
    "bug53903.phpt": "SKIP: not implemented",
    "bug54623.phpt": "SKIP: not implemented",
    "bug54946.phpt": "SKIP: not implemented",
    "bug60106.phpt": "SKIP: not implemented",
    "bug60455_01.phpt": "SKIP: not implemented",
    "bug60455_02.phpt": "SKIP: not implemented",
    "bug60455_03.phpt": "SKIP: not implemented",
    "bug60455_04.phpt": "SKIP: not implemented",
    "bug60817.phpt": "SKIP: not implemented",
    "bug61115-1.phpt": "SKIP: not implemented",
    "bug61115-2.phpt": "SKIP: not implemented",
    "bug61115.phpt": "SKIP: not implemented",
    "bug61371-win.phpt": "SKIP: not implemented",
    "bug61371.phpt": "SKIP: not implemented",
    "bug63240.phpt": "SKIP: not implemented",
    "bug64166.phpt": "SKIP: not implemented",
    "bug64166_2.phpt": "SKIP: not implemented",
    "bug64166_3.phpt": "SKIP: not implemented",
    "bug64433.phpt": "SKIP: not implemented",
    "bug64770.phpt": "SKIP: not implemented",
    "bug65483.phpt": "SKIP: not implemented",
    "stream_context_get_params_001.phpt": "SKIP: not implemented",
    "stream_context_set_option_basic.phpt": "SKIP: not implemented",
    "stream_context_set_option_error_001.phpt": "SKIP: not implemented",
    "stream_context_set_option_error_002.phpt": "SKIP: not implemented",
    "stream_copy_to_stream_socket.phpt": "SKIP: not implemented",
    "stream_get_contents_001.phpt": "SKIP: not implemented",
    "stream_get_contents_002.phpt": "SKIP: not implemented",
    "stream_get_line_NUL_delimiter.phpt": "SKIP: not implemented",
    "stream_get_line_nb.phpt": "SKIP: not implemented",
    "stream_get_meta_data_dir_basic.phpt": "SKIP: not implemented",
    "stream_get_meta_data_file_basic.phpt": "SKIP: not implemented",
    "stream_get_meta_data_file_error.phpt": "SKIP: not implemented",
    "stream_get_meta_data_file_variation1.phpt": "SKIP: not implemented",
    "stream_get_meta_data_file_variation2.phpt": "SKIP: not implemented",
    "stream_get_meta_data_file_variation4.phpt": "SKIP: not implemented",
    "stream_get_meta_data_file_variation5.phpt": "SKIP: not implemented",
    "stream_get_meta_data_process_basic.phpt": "SKIP: not implemented",
    "stream_get_meta_data_socket_basic.phpt": "SKIP: not implemented",
    "stream_get_meta_data_socket_variation1.phpt": "SKIP: not implemented",
    "stream_get_meta_data_socket_variation2.phpt": "SKIP: not implemented",
    "stream_get_meta_data_socket_variation3.phpt": "SKIP: not implemented",
    "stream_get_meta_data_socket_variation4.phpt": "SKIP: not implemented",
    "stream_is_local.phpt": "SKIP: not implemented",
    "stream_set_chunk_size.phpt": "SKIP: not implemented",
    "stream_set_timeout_error.phpt": "SKIP: not implemented",
    "stream_socket_pair.phpt": "SKIP: not implemented",
}

markers[date_test_dir] = {
    'bug44742.phpt': 'SKIP: segmentation fault',
    'date_diff.phpt': 'SKIP: it takes 10 minutes to execute',
    'date_time_set_variation3.phpt': 'SKIP: looks like bad test',
    'DatePeriod_wrong_constructor.phpt': 'DatePeriod not implemented',
    'DateTimeZone_construct_error.phpt': 'Exception handling',
    'DateTimeZone_getTransitions_basic1.phpt': 'Not Implemented',
    'DateTimeZone_serialize.phpt': 'Not Implemented',
    'DateTimeZone_verify.phpt': "ReflectionClass::getMethods() not Not Implemented",
    'DateTime_clone_basic3.phpt': "iterproperties order broken",
    'DateTime_construct_error.phpt': "handling arguments in builtin needs to be improved",
    "DateTime_serialize.phpt": "not implemented",
    "DateTime_verify.phpt": "not implemented",
    "big_year.phpt": "not implemented",
    "bug35425.phpt": "not implemented",
    "bug40743.phpt": "not implemented",
    "bug41523-64bit.phpt": "not implemented",
    "bug41709.phpt": "not implemented",
    "bug42910.phpt": "not implemented",
    "bug43003.phpt": "not implemented",
    "bug43075.phpt": "not implemented",
    "bug43808.phpt": "not implemented",
    "bug44562.phpt": "not implemented",
    "bug45529.phpt": "not implemented",
    "bug45554.phpt": "not implemented",
    "bug45866.phpt": "not implemented",
    "bug46108.phpt": "not implemented",
    "bug46874.phpt": "not implemented",
    "bug48097.phpt": "not implemented",
    "bug48476.phpt": "not implemented",
    "bug48678.phpt": "not implemented",
    "bug49585.phpt": "not implemented",
    "bug49700.phpt": "not implemented",
    "bug49778.phpt": "not implemented",
    "bug50055.phpt": "not implemented",
    "bug50392.phpt": "not implemented",
    "bug51096.phpt": "not implemented",
    "bug51393.phpt": "not implemented",
    "bug51866.phpt": "not implemented",
    "bug52062-64bit.phpt": "not implemented",
    "bug52113.phpt": "not implemented",
    "bug52290.phpt": "not implemented",
    "bug52342.phpt": "not implemented",
    "bug52430.phpt": "not implemented",
    "bug52577.phpt": "not implemented",
    "bug52668.phpt": "not implemented",
    "bug52808.phpt": "not implemented",
    "bug53437.phpt": "not implemented",
    "bug53437_var1.phpt": "not implemented",
    "bug53437_var2.phpt": "not implemented",
    "bug53437_var5.phpt": "not implemented",
    "bug54283.phpt": "not implemented",
    "bug54316.phpt": "not implemented",
    "bug54340.phpt": "not implemented",
    "bug55397.phpt": "not implemented",
    "bug60236.phpt": "not implemented",
    "bug62500.phpt": "not implemented",
    "bug62561.phpt": "not implemented",
    "bug62852.phpt": "not implemented",
    "bug62852_var2.phpt": "not implemented",
    "bug62852_var3.phpt": "not implemented",
    "bug62896.phpt": "not implemented",
    "bug63435.phpt": "not implemented",
    "bug64157.phpt": "not implemented",
    "date-lenient-create.phpt": "not implemented",
    "date-lenient.phpt": "not implemented",
    "date-set-timestamp.phpt": "not implemented",
    "date_create-2.phpt": "not implemented",
    "date_create_from_format_basic.phpt": "not implemented",
    "date_default_timezone_get-4.phpt": "not implemented",
    "date_default_timezone_get_error.phpt": "not implemented",
    "date_diff1.phpt": "not implemented",
    "date_get_last_errors_basic.phpt": "not implemented",
    "date_modify-2.phpt": "not implemented",
    "date_modify_variation2.phpt": "not implemented",
    "date_offset_get_error.phpt": "not implemented",
    "date_offset_get_variation1.phpt": "not implemented",
    "date_parse_001.phpt": "not implemented",
    "date_parse_basic1.phpt": "not implemented",
    "date_parse_error.phpt": "not implemented",
    "date_parse_from_format_basic.phpt": "not implemented",
    "date_parse_variation1.phpt": "not implemented",
    "date_period.phpt": "not implemented",
    "date_timezone_get_basic1.phpt": "not implemented",
    "date_timezone_set_basic1.phpt": "not implemented",
    "gmdate_variation1.phpt": "not implemented",
    "gmdate_variation10.phpt": "not implemented",
    "gmdate_variation9.phpt": "not implemented",
    "idate_variation5.phpt": "not implemented",
    "idate_variation6.phpt": "not implemented",
    "oo_001.phpt": "not implemented",
    "rfc-datetime_and_daylight_saving_time-type2.phpt": "not implemented",
    "strtotime3-64bit.phpt": "not implemented",
    "test-parse-from-format.phpt": "not implemented",
    "time_error.phpt": "not implemented",
    "timestamp-in-dst.phpt": "not implemented",
    "timezone_identifiers_list_wrong_constructor.phpt": "not implemented",
    "timezone_offset_get_error.phpt": "not implemented",
    "timezone_offset_get_variation1.phpt": "not implemented",
    "timezone_offset_get_variation2.phpt": "not implemented",
    "timezone_transitions_get_basic1.phpt": "not implemented",
    "timezone_transitions_get_error.phpt": "not implemented",
    "timezone_transitions_get_variation1.phpt": "not implemented",
    "timezone_transitions_get_variation2.phpt": "not implemented",
    "timezone_transitions_get_variation3.phpt": "not implemented",

}

markers[pcre_test_dir] = {
    'cache_limit.phpt': 'SKIP: slow and stupid',
    '002.phpt': 'flag e unsupported',
    '004.phpt': 'flag e unsupported',
    '006.phpt': 'backtrack_limit setting via --INI-- not working?',
    'backtrack_limit.phpt': 'in-progress',
    'bug44191.phpt': 'preg_grep() unimplemented',
    'bug44925.phpt': 'preg_grep() unimplemented',
    'bug52732.phpt': 'SKIP: hangs',
    'grep.phpt': 'preg_grep() unimplemented',
    'grep2.phpt': 'preg_grep() unimplemented',
    'preg_grep_basic.phpt': 'preg_grep() unimplemented',
    'preg_grep_error.phpt': 'preg_grep() unimplemented',
    'preg_grep_error1.phpt': 'preg_grep() unimplemented',
    'preg_grep_error2.phpt': 'preg_grep() unimplemented',
    'preg_match_all_error3.phpt': "we don't get the reference error during compile time",
    'preg_replace.phpt': 'details about error msgs and e parameter',
    'preg_replace_callback2.phpt': 'create_function() unimplemented',
    'preg_replace_callback3.phpt': 'details about error msgs',
    'recursion_limit.phpt': 'recursion_limit setting via --INI-- not working?',
    'split2.phpt': "ini_set(pcre.recursion_limit) not working?",
    }

markers[Zend_test_dir] = {
    'bug40261.phpt': slow,
    'bug40236.phpt': 'TEST_PHP_EXECUTABLE in env, should only run with -A',
    'bug48408.phpt': slow,
    'bug48409.phpt': slow,
    'bug60978.phpt': 'SKIP: requires TEST_PHP_EXECUTABLE in env',
    'closure_021.phpt': slow,
    'exception_007.phpt': slow,
    '001.phpt': 'missing warnings around calling functions with wrong number '
                'of args',
    '002.phpt': 'details about func_get_arg() investigate',
    '003.phpt': '?',
    '005.phpt': check_sign_only,
    '006.phpt': check_sign_only,
    '008.phpt': 'defining TRUE',
    '015.phpt': 'undefined trigger_error()',
    '017.phpt': 'undefined get_loaded_extensions()',
    '019.phpt': '?',
    '021.phpt': "unexpected ':'",
    '030.phpt': "structure of Exception objects",
    '032.phpt': "?",
    '036.phpt': "toomany warnings",
    '037.phpt': "parse error",
    'abstract-static.phpt': "?",
    'access_modifiers_001.phpt': "error wording",
    'access_modifiers_002.phpt': "error wording",
    'access_modifiers_003.phpt': "error wording",
    'access_modifiers_004.phpt': "error wording",
    'access_modifiers_005.phpt': "error wording",
    'access_modifiers_006.phpt': "error wording",
    'add_002.phpt': "php has the same output as hippy??",
    'add_003.phpt': "php has the same output as hippy??",
    'anonymous_func_001.phpt': "undefined create_function()",
    'anonymous_func_002.phpt': "undefined create_function()",
    'anonymous_func_003.phpt': "undefined create_function()",
    'argument_restriction_001.phpt': "missing &",
    'argument_restriction_005.phpt': "ArrayAccess: Error message text",
    'argument_restriction_006.phpt': "missing strict",
    'binary.phpt': "parse error",
    'bug20240.phpt': "undefined register_shutdown_function()",
    'bug24773.phpt': "missing fatal",
    'bug26166.phpt': "missing fatal",
    'bug28377.phpt': "undefined debug_backtrace()",
    'bug28444.phpt': "string conversion",
    'bug29015.phpt': "?",
    'bug29896.phpt': "problem with set_error_handler()",
    'bug30080.phpt': "instance numbering",
    'bug30791.phpt': "?",
    'bug30828.phpt': "undefined debug_print_backtrace()",
    'bug30922.phpt': "missing fatal error",
    'bug30998.phpt': "?",
    'bug32290.phpt': "call_user_func_array()",
    'bug32322.phpt': "?",
    'bug32596.phpt': "?",
    'bug32660.phpt': "?",
    'bug32799.phpt': "missing output",
    'bug32833.phpt': "?",
    'bug33277.phpt': "?",
    'bug33318.phpt': "throwing non-Exception",
    'bug33512.phpt': "?",
    'bug33802.phpt': "set_error_handler()",
    'bug33996.phpt': "?",
    'bug33999.phpt': "?",
    'bug34064.phpt': "?",
    'bug34199.phpt': "undefined simplexml_load_string()",
    'bug34518.phpt': "?",
    'bug34617.phpt': "undefined xml_parser_create()",
    'bug35470.phpt': "does not parse",
    'bug35655.phpt': "undefined highlight_string()",
    'bug36071.phpt': "problem in Interpreter.CLONE",
    'bug36303.phpt': "?",
    'bug36513.phpt': "missing strip_tags",
    'bug36759.phpt': "__destruct()",
    'bug37212.phpt': "?",
    'bug37251.phpt': "?",
    'bug37632.phpt': "call to protected method",
    'bug37811.phpt': "?",
    'bug38047.phpt': "infinite recursion",
    'bug38220.phpt': "conversion to string",
    'bug38461.phpt': "Cannot access private property",
    'bug38624.phpt': "stack trace",
    'bug38779.phpt': "undefined stream_wrapper_register()",
    'bug38779_1.phpt': "undefined stream_wrapper_register()",
    'bug39018.phpt': "?",
    'bug40509.phpt': "?",
    'bug40621.phpt': "strict vs fatal error",
    'bug40705.phpt': "?",
    'bug40770.phpt': "missing fatal (memory size)",
    'bug40833.phpt': "ArrayAccess",
    'bug41026.phpt': "undefined register_shutdown_function()",
    'bug41209.phpt': "ArrayAccess",
    'bug41421.phpt': "undefined stream_wrapper_register()",
    'bug41633_2.phpt': "?",
    'bug41633_3.phpt': "infinite recursion",
    'bug41813.phpt': "?",
    'bug41919.phpt': "?",
    'bug42767.phpt': "undefined highlight_string()",
    'bug42817.phpt': "Interpreter.CLONE",
    'bug42818.phpt': "Interpreter.CLONE",
    'bug42819.phpt': "missing ArrayObject",
    'bug43027.phpt': "unexpected T_DECLARE",
    'bug43175.phpt': "__call via traditional factory should be caught",
    'bug43200.phpt': "ReflectionClass",
    'bug43201.phpt': "?",
    'bug43332_2.phpt': "\\self is an invalid class name",
    'bug43343.phpt': "parse error: should complain about '\\', not '::'",
    'bug43344_1.phpt': "wrong error message in notice",
    'bug43344_10.phpt': "notice should be a fatal",
    'bug43344_11.phpt': "notice should be a fatal",
    'bug43344_12.phpt': "notice should be a fatal",
    'bug43344_13.phpt': "notice should be a fatal",
    'bug43344_6.phpt': "notice should be a fatal",
    'bug43344_7.phpt': "notice should be a fatal",
    'bug43344_8.phpt': "notice should be a fatal",
    'bug43344_9.phpt': "notice should be a fatal",
    'bug43450.phpt': slow,
    'bug43703.phpt': "?",
    'bug43918.phpt': "missing SimpleXMLElement",
    'bug44141.phpt': "Call to private X::__construct()",
    'bug44660.phpt': "?",
    'bug44827.phpt': "missing warnings",
    'bug45178.phpt': "deprecated in PHP",
    'bug45186.phpt': "call_user_func()",
    'bug45186_2.phpt': "call_user_func()",
    'bug45805.phpt': "set_error_handler()",
    'bug45862.phpt': "undefined get_class_vars()",
    'bug46106.phpt': "?",
    'bug46196.phpt': "set_error_handler()",
    'bug46238.phpt': "?",
    'bug46241.phpt': "set_error_handler()",
    'bug46304.phpt': "does not parse",
    'bug46381.phpt': "missing ArrayIterator",
    'bug46811.phpt': "SKIP: parse error in INI",
    'bug47320.phpt': "$php_errormsg",
    'bug47516.phpt': "?",
    'bug47572.phpt': "our late static binding happens later than PHP's",
    'bug47704.phpt': "?",
    'bug47836.phpt': "?",
    'bug47880.phpt': "undefined debug_backtrace()",
    'bug47981.phpt': "?",
    'bug48228.phpt': "stack trace",
    'bug48248.phpt': "?",
    'bug48667_1.phpt': "SKIP: small diff in error message",
    'bug48693.phpt': "undefined create_function()",
    'bug48770.phpt': "Call to undefined method C::parent::func()",
    'bug48770_2.phpt': "Call to undefined method C::parent::func2()",
    'bug48770_3.phpt': "Call to undefined method C::self::func2()",
    'bug48899.phpt': "?",
    'bug48930.phpt': "?",
    'bug49866.phpt': "error wording",
    'bug49893.phpt': "__destruct()",
    'bug49908.phpt': "stack trace",
    'bug50005.phpt': "stack trace",
    'bug50146.phpt': "missing ReflectionObject",
    'bug50174.phpt': "missing ReflectionMethod",
    'bug50261.phpt': "?",
    'bug50383.phpt': "$exc->getTrace()",
    'bug50810.phpt': "Fails in a method calling property_exists()",
    'bug51394.phpt': "stack trace",
    'bug51421.phpt': "signature check for ctor",
    'bug51822.phpt': "?",
    'bug51827.phpt': "missing register_shutdown_function()",
    'bug52001.phpt': "?",
    'bug52041.phpt': "extra notice",
    'bug52051.phpt': "undefined bb::bb()",
    'bug52160.phpt': "?",
    'bug52193.phpt': "unexpected &",
    'bug52361.phpt': "conversion to string",
    'bug52484.phpt': "missing fatal",
    'bug52484_2.phpt': "missing fatal",
    'bug52484_3.phpt': "undefined property A::$",
    'bug52508.phpt': "missing parse_ini_file()",
    'bug52614.phpt': "?",
    'bug52879.phpt': "extra notice",
    'bug53305.phpt': "?",
    'bug53511.phpt': "interaction of exceptions and __destruct()",
    'bug53629.phpt': "missing highlight_string()",
    'bug53748.phpt': "missing traits",
    'bug54265.phpt': "str_repeat()",
    'bug54268.phpt': "missing fatal (memory size)",
    'bug54305.phpt': "missing ReflectionMethod",
    'bug54547.phpt': "?",
    'bug54585.phpt': "undefined _GET",
    'bug54624.phpt': "class_alias()",
    'bug54910.phpt': "?",
    'bug55007.phpt': "syntax error in eval()",
    'bug55086.phpt': "missing traits",
    'bug55137.phpt': "missing traits",
    'bug55156.phpt': "missing ReflectionFunction",
    'bug55247.phpt': "unexpected {",
    'bug55509.phpt': "SKIP: LexerError (and also takes too much RAM)",
    'bug55705.phpt': "?",
    'bug55825.phpt': "missing traits",
    'bug60099.phpt': "__HALT_COMPILER issue",
    'bug60139.phpt': "missing gc_collect_cycles()",
    'bug60169.phpt': "unexpected :",
    'bug60536_001.phpt': "missing traits",
    'bug60536_002.phpt': "missing traits",
    'bug60536_003.phpt': "missing traits",
    'bug60536_004.phpt': "missing traits",
    'bug60536_005.phpt': "missing traits",
    'bug60573.phpt': "signature check",
    'bug60611.phpt': "unexpected {",
    'bug60613.phpt': "missing fatal error",
    'bug60825.phpt': "?",
    'bug60909_1.phpt': "missing register_shutdown_function()",
    'bug60909_2.phpt': "missing register_shutdown_function()",
    'bug61087.phpt': "missing parse_ini_file()",
    'bug61225.phpt': "unexpected T_STRING",
    'bug61273.phpt': "call_user_func_array()",
    'bug61761.phpt': "signature check",
    'bug61767.phpt': "infinite recursion",
    'bug61782.phpt': "cloning",
    'bug62343.phpt': "missing class_alias()",
    'bug62763.phpt': "missing register_shutdown_function()",
    'bug62892.phpt': "unexpected T_STRING",
    'bug62907.phpt': "missing traits",
    'bug62956.phpt': "signature check",
    'bug63111.phpt': "missing strict",
    'bug63219.phpt': "unexpected T_STRING",
    'bug63305.phpt': "Parse error unfinished heredoc",
    'bug63336.phpt': "Function.signature_repr()",
    'bug63762.phpt': "missing ReflectionProperty",
    'bug63882.phpt': "SKIP: Hippy does not deal with comparison cycles yet",
    'bug63982.phpt': "cannot access protected property",
    'bug64239_1.phpt': "unexpected T_USE",
    'bug64239_2.phpt': "unexpected T_USE",
    'bug64239_3.phpt': "unexpected T_USE",
    'bug64239_4.phpt': "unexpected T_USE",
    'bug64354.phpt': "missing Serializable",
    'bug64417.phpt': "missing traits",
    'bug64578.phpt': "set_error_handler()",
    'bug64660.phpt': "unexpected }",
    'bug64720.phpt': "missing debug_backtrace()",
    'bug64821.1.phpt': "stack trace",
    'bug64821.2.phpt': "stack trace",
    'bug64821.3.phpt': "stack trace",
    'bug64960.phpt': "set_exception_handler()",
    'bug64966.phpt': "set_error_handler()",
    'bug_debug_backtrace.phpt': "?",
    'call_user_func_001.phpt': "wrong warning",
    'call_user_func_002.phpt': "warning wording",
    'call_user_func_003.phpt': "use references with closure",
    'call_user_func_004.phpt': "?",
    'call_user_func_005.phpt': "?",
    'call_with_refs.phpt': "?",
    'callable_type_hint_001.phpt': "?",
    'callable_type_hint_002.phpt': "?",
    'callable_type_hint_003.phpt': "?",
    'cast_to_int.phpt': "?",
    'cast_to_object.phpt': "?",
    'class_alias_009.phpt': "missing fatal",
    'class_exists_003.phpt': "?",
    'clone_001.phpt': "?",
    'clone_003.phpt': "?",
    'closure_005.phpt': "__destruct()",
    'closure_015.phpt': "set_error_handler()",
    'closure_016.phpt': "is_callable()",
    'closure_017.phpt': "destructor issue: probably doesn't make sense in hippy",
    'closure_020.phpt': "var_dump() on closure object",
    'closure_025.phpt': "?",
    'closure_026.phpt': "?",
    'closure_027.phpt': "?",
    'closure_031.phpt': "?",
    'closure_032.phpt': "?",
    'closure_033.phpt': "?",
    'closure_034.phpt': "?",
    'closure_035.phpt': "?",
    'closure_036.phpt': "?",
    'closure_038.phpt': "?",
    'closure_039.phpt': "?",
    'closure_040.phpt': "?",
    'closure_041.phpt': "?",
    'closure_042.phpt': "?",
    'closure_043.phpt': "?",
    'closure_044.phpt': "?",
    'closure_045.phpt': "?",
    'closure_046.phpt': "?",
    'compare_001_64bit.phpt': "?",
    'compare_003_64bit.phpt': "?",
    'compare_004_64bit.phpt': "?",
    'compare_005_64bit.phpt': "?",
    'compare_006_64bit.phpt': "?",
    'constants_002.phpt': "?",
    'debug_backtrace_limit.phpt': "?",
    'debug_backtrace_options.phpt': "?",
    'debug_print_backtrace_limit.phpt': "?",
    'declare_001.phpt': "?",
    'declare_003.phpt': "?",
    'decrement_001_64bit.phpt': "?",
    'dereference_002.phpt': "instance numbering",
    'dereference_012.phpt': "conversion to string",
    'dtor_scope.phpt': "?",
    'dynamic_call_001.phpt': "missing fatal",
    'dynamic_call_004.phpt': "missing fatal",
    'errmsg_005.phpt': "wording function/method",
    'errmsg_009.phpt': "Fatal Error/Parse Error",
    'errmsg_010.phpt': "Fatal Error/Parse Error",
    'errmsg_013.phpt': "parameters with array type hint can only be an array or NULL",
    'errmsg_018.phpt': "Strict vs Fatal",
    'errmsg_019.phpt': "wording",
    'errmsg_020.phpt': "phpinfo has been desabled???",
    'errmsg_021.phpt': "disabling classes missing ... pfff",
    'errmsg_022.phpt': "wording",
    'errmsg_027.phpt': "Class declarations may not be nested",
    'errmsg_035.phpt': "wording",
    'errmsg_036.phpt': "wording",
    'errmsg_041.phpt': "what???",
    'errmsg_042.phpt': "Key element cannot be a reference",
    'exception_006.phpt': "undefined restore_exception_handler()",
    'exception_008.phpt': "__destruct()",
    'exception_handler_002.phpt': "stack trace",
    'exception_handler_004.phpt': "?",
    'exception_handler_006.phpt': "?",
    'fr47160.phpt': "?",
    'function_arguments_002.phpt': 'PHP syntax error say what token it was expecting',
    'gc_001.phpt': "?",
    'gc_002.phpt': "?",
    'gc_003.phpt': "?",
    'gc_004.phpt': "?",
    'gc_005.phpt': "?",
    'gc_006.phpt': "?",
    'gc_007.phpt': "?",
    'gc_008.phpt': "?",
    'gc_009.phpt': "?",
    'gc_010.phpt': "?",
    'gc_011.phpt': "?",
    'gc_012.phpt': "?",
    'gc_013.phpt': "?",
    'gc_014.phpt': "?",
    'gc_015.phpt': "?",
    'gc_016.phpt': "?",
    'gc_017.phpt': "?",
    'gc_018.phpt': "?",
    'gc_019.phpt': "?",
    'gc_020.phpt': "?",
    'gc_021.phpt': "?",
    'gc_022.phpt': "?",
    'gc_023.phpt': "?",
    'gc_024.phpt': "?",
    'gc_026.phpt': "?",
    'gc_027.phpt': "?",
    'gc_028.phpt': "?",
    'gc_029.phpt': "?",
    'gc_030.phpt': "?",
    'gc_031.phpt': "?",
    'gc_032.phpt': "?",
    'get_class_methods_002.phpt': "Missing: Strict Standards: Redefining already defined constructor for class B in %s on line %d",
    'get_class_vars_001.phpt': "?",
    'get_class_vars_002.phpt': "?",
    'get_class_vars_003.phpt': "?",
    'get_class_vars_004.phpt': "?",
    'get_class_vars_005.phpt': "?",
    'get_class_vars_006.phpt': "?",
    'get_class_vars_007.phpt': "?",
    'get_defined_functions_basic.phpt': "?",
    'get_defined_functions_error.phpt': "?",
    'get_required_files.phpt': "?",
    'globals_001.phpt': "?",
    'globals_002.phpt': "?",
    'globals_003.phpt': "?",
    'globals_004.phpt': "?",
    'halt03.phpt': "?",
    'halt_compiler2.phpt': "?",
    'halt_compiler3.phpt': "?",
    'instanceof_001.phpt': "missing create_function()",
    'inter_007.phpt': "class_alias()",
    'isset_003.phpt': "?",
    'isset_003_2_4.phpt': "?",
    'jump06.phpt': "?",
    'jump12.phpt': "?",
    'list_003.phpt': "?",
    'list_006.phpt': "?",
    'list_007.phpt': "?",
    'lsb_006.phpt': "?",
    'lsb_007.phpt': "?",
    'lsb_008.phpt': "?",
    'lsb_009.phpt': "?",
    'lsb_010.phpt': "?",
    'lsb_021.phpt': "?",
    'lsb_022.phpt': "?",
    'magic_by_ref_001.phpt': "missing fatal",
    'magic_by_ref_002.phpt': "missing fatal",
    'magic_by_ref_003.phpt': "missing fatal",
    'magic_by_ref_004.phpt': "missing fatal",
    'magic_by_ref_005.phpt': "missing fatal",
    'magic_by_ref_006.phpt': "missing fatal",
    'magic_by_ref_007.phpt': "missing fatal",
    'magic_methods_002.phpt': "missing warning",
    'magic_methods_003.phpt': "missing warning",
    'magic_methods_004.phpt': "missing warning",
    'magic_methods_006.phpt': "missing warning",
    'magic_methods_007.phpt': "missing fatal",
    'magic_methods_008.phpt': "?",
    'magic_methods_009.phpt': "missing warning",
    'magic_methods_010.phpt': "missing fatal",
    'method_static_var.phpt': "?",
    'nowdoc_013.phpt': "missing highlight_string()",
    'nowdoc_014.phpt': "missing highlight_string()",
    'nowdoc_015.phpt': "missing trigger_error()",
    'ns_029.phpt': "?",
    'ns_033.phpt': "?",
    'ns_035.phpt': "missing ArrayObject",
    'ns_036.phpt': "missing ArrayObject",
    'ns_051.phpt': "need to do actual constant lookup at compile-time",
    'ns_054.phpt': "missing SplObserver",
    'ns_056.phpt': "missing SplObserver",
    'ns_057.phpt': "notice should be a fatal",
    'ns_058.phpt': "notice should be a fatal",
    'ns_059.phpt': "missing fatal",
    'ns_068.phpt': "missing fatal",
    'ns_071.phpt': "?",
    'ns_075.phpt': "?",
    'ns_076.phpt': "notice should be a fatal",
    'ns_077_1.phpt': "notice should be a fatal",
    'ns_077_2.phpt': "notice should be a fatal",
    'ns_077_3.phpt': "notice should be a fatal",
    'ns_077_4.phpt': "notice should be a fatal",
    'ns_077_5.phpt': "notice should be a fatal",
    'ns_077_6.phpt': "notice should be a fatal",
    'ns_077_7.phpt': "notice should be a fatal",
    'ns_077_8.phpt': "notice should be a fatal",
    'ns_083.phpt': "Namespace decl has to be the first statement",
    'ns_086.phpt': "T_DECLARE",
    'ns_087.phpt': "?",
    'objects_001.phpt': "missing notice",
    'objects_005.phpt': "signature check",
    'objects_006.phpt': "signature check",
    'objects_007.phpt': "signature check",
    'objects_010.phpt': "missing strict",
    'objects_013.phpt': "missing fatal",
    'objects_014.phpt': "missing fatal",
    'objects_024.phpt': "accessing static property as non-static",
    'objects_025.phpt': "missing fatal error",
    'objects_027.phpt': "Cannot access static::",
    'offset_array.phpt': "Illegal offset type: resource",
    'offset_assign.phpt': "missing fatal error",
    'offset_string.phpt': "missing notice: offset cast",
    'settype_double.phpt': "?",
    'settype_int.phpt': "?",
    'settype_object.phpt': "?",
    'settype_resource.phpt': "?",
    'strict_001.phpt': "Illegal offset type: resource",
    'trait_exists_001.phpt': "?",
    'trait_exists_002.phpt': "?",
    'trait_exists_003.phpt': "?",
    'unset_cv03.phpt': "missing notice",
    'unset_cv05.phpt': "session_start()",
    'unset_cv09.phpt': "missing notice",

}

markers['ext/reflection'] = {
    '001.phpt': '?',
    '002.phpt': '?',
    '003.phpt': '?',
    '004.phpt': '?',
    '005.phpt': '?',
    '006.phpt': '?',
    '007.phpt': '?',
    '008.phpt': '?',
    '009.phpt': '?',
    '026.phpt': '?',
    'ReflectionClass_CannotClone_basic.phpt': '?',
    'ReflectionClass_FileInfo_basic.phpt': '?',
    'ReflectionClass_FileInfo_error.phpt': '?',
    'ReflectionClass_constructor_002.phpt': '?',
    'ReflectionClass_export_basic1.phpt': '?',
    'ReflectionClass_export_basic2.phpt': '?',
    'ReflectionClass_getConstant_basic.phpt': '?',
    'ReflectionClass_getConstant_error.phpt': '?',
    'ReflectionClass_getConstructor_basic.phpt': '?',
    'ReflectionClass_getDefaultProperties_001.phpt': '?',
    'ReflectionClass_getDocComment_001.phpt': '?',
    'ReflectionClass_getExtensionName_variation.phpt': '?',
    'ReflectionClass_getExtension_variation.phpt': '?',
    'ReflectionClass_getInterfaces_001.phpt': '?',
    'ReflectionClass_getInterfaces_002.phpt': '?',
    'ReflectionClass_getInterfaces_003.phpt': '?',
    'ReflectionClass_getMethod_001.phpt': '?',
    'ReflectionClass_getMethods_001.phpt': '?',
    'ReflectionClass_getMethods_002.phpt': '?',
    'ReflectionClass_getMethods_003.phpt': '?',
    'ReflectionClass_getModifierNames_basic.phpt': '?',
    'ReflectionClass_getModifiers_basic.phpt': '?',
    'ReflectionClass_getName_error1.phpt': '?',
    'ReflectionClass_getNamespaceName.phpt': '?',
    'ReflectionClass_getParentClass.phpt': '?',
    'ReflectionClass_getParentClass_001.phpt': '?',
    'ReflectionClass_getProperties_001.phpt': '?',
    'ReflectionClass_getProperties_003.phpt': '?',
    'ReflectionClass_getProperty_001.phpt': '?',
    'ReflectionClass_getProperty_002.phpt': '?',
    'ReflectionClass_getProperty_003.phpt': '?',
    'ReflectionClass_getProperty_004.phpt': '?',
    'ReflectionClass_getStaticPropertyValue_001_2_4.phpt': '?',
    'ReflectionClass_getStaticPropertyValue_002.phpt': '?',
    'ReflectionClass_hasConstant_001.phpt': '?',
    'ReflectionClass_hasProperty_001.phpt': '?',
    'ReflectionClass_hasProperty_basic.phpt': '?',
    'ReflectionClass_implementsInterface_001.phpt': '?',
    'ReflectionClass_isCloneable_002.phpt': '?',
    'ReflectionClass_isFinal_basic.phpt': '?',
    'ReflectionClass_isInstance_basic.phpt': '?',
    'ReflectionClass_isInstance_error.phpt': '?',
    'ReflectionClass_isInstantiable_variation.phpt': '?',
    'ReflectionClass_isInterface_basic.phpt': '?',
    'ReflectionClass_isInternal_basic.phpt': '?',
    'ReflectionClass_isInternal_error.phpt': '?',
    'ReflectionClass_isIterateable_001.phpt': '?',
    'ReflectionClass_isIterateable_basic.phpt': '?',
    'ReflectionClass_isIterateable_variation1.phpt': '?',
    'ReflectionClass_isSubclassOf_002.phpt': '?',
    'ReflectionClass_isSubclassOf_basic.phpt': '?',
    'ReflectionClass_isSubclassOf_error1.phpt': '?',
    'ReflectionClass_isUserDefined_basic.phpt': '?',
    'ReflectionClass_isUserDefined_error.phpt': '?',
    'ReflectionClass_modifiers_001.phpt': '?',
    'ReflectionClass_modifiers_002.phpt': '?',
    'ReflectionClass_newInstanceArgs_001.phpt': '?',
    'ReflectionClass_newInstanceArgs_002.phpt': '?',
    'ReflectionClass_newInstanceWithoutConstructor.phpt': '?',
    'ReflectionClass_newInstance_001.phpt': '?',
    'ReflectionClass_setStaticPropertyValue_001_2_4.phpt': '?',
    'ReflectionClass_setStaticPropertyValue_002.phpt': '?',
    'ReflectionClass_toString_001.phpt': '?',
    'ReflectionClass_toString_002.phpt': '?',
    'ReflectionClass_toString_003.phpt': '?',
    'ReflectionExtension_constructor_basic.phpt': '?',
    'ReflectionExtension_constructor_error.phpt': '?',
    'ReflectionExtension_export_basic.phpt': '?',
    'ReflectionExtension_getClassNames_basic.phpt': '?',
    'ReflectionExtension_getClassNames_variation1.phpt': '?',
    'ReflectionExtension_getClasses_basic.phpt': '?',
    'ReflectionExtension_getDependencies_variation2.phpt': '?',
    'ReflectionExtension_getName_basic.phpt': '?',
    'ReflectionExtension_getVersion_basic.phpt': '?',
    'ReflectionExtension_info_basic.phpt': '?',
    'ReflectionExtension_isPersistant.phpt': '?',
    'ReflectionExtension_isTemporary.phpt': '?',
    'ReflectionFunction_001.phpt': '?',
    'ReflectionFunction_construct.001.phpt': '?',
    'ReflectionFunction_getClosure_basic.phpt': '?',
    'ReflectionFunction_getClosure_error.phpt': '?',
    'ReflectionFunction_getDocComment.001.phpt': '?',
    'ReflectionFunction_getExtension.phpt': '?',
    'ReflectionFunction_getExtensionName.phpt': '?',
    'ReflectionFunction_getFileName.001.phpt': '?',
    'ReflectionFunction_getFileName.002.phpt': '?',
    'ReflectionFunction_getNamespaceName.phpt': '?',
    'ReflectionMethod_006.phpt': '?',
    'ReflectionMethod_basic1.phpt': '?',
    'ReflectionMethod_basic2.phpt': '?',
    'ReflectionMethod_basic3.phpt': '?',
    'ReflectionMethod_basic4.phpt': '?',
    'ReflectionMethod_constructor_basic.phpt': '?',
    'ReflectionMethod_constructor_error1.phpt': '?',
    'ReflectionMethod_constructor_error2.phpt': '?',
    'ReflectionMethod_getClosure_basic.phpt': '?',
    'ReflectionMethod_getClosure_error.phpt': '?',
    'ReflectionMethod_getDocComment_basic.phpt': '?',
    'ReflectionMethod_getDocComment_error.phpt': '?',
    'ReflectionMethod_getModifiers_basic.phpt': '?',
    'ReflectionMethod_getStaticVariables_basic.phpt': '?',
    'ReflectionMethod_invokeArgs_basic.phpt': '?',
    'ReflectionMethod_invokeArgs_error1.phpt': '?',
    'ReflectionMethod_invokeArgs_error2.phpt': '?',
    'ReflectionMethod_invokeArgs_error3.phpt': '?',
    'ReflectionMethod_invoke_basic.phpt': '?',
    'ReflectionMethod_invoke_error1.phpt': '?',
    'ReflectionMethod_invoke_error2.phpt': '?',
    'ReflectionMethod_returnsReference_basic.phpt': '?',
    'ReflectionMethod_setAccessible.phpt': '?',
    'ReflectionObject_FileInfo_basic.phpt': '?',
    'ReflectionObject_FileInfo_error.phpt': '?',
    'ReflectionObject___toString_basic1.phpt': '?',
    'ReflectionObject___toString_basic2.phpt': '?',
    'ReflectionObject_constructor_basic.phpt': '?',
    'ReflectionObject_constructor_error.phpt': '?',
    'ReflectionObject_export_basic1.phpt': '?',
    'ReflectionObject_export_basic2.phpt': '?',
    'ReflectionObject_export_basic3.phpt': '?',
    'ReflectionObject_getConstant_basic.phpt': '?',
    'ReflectionObject_getConstant_error.phpt': '?',
    'ReflectionObject_getConstants_basic.phpt': '?',
    'ReflectionObject_getConstants_error.phpt': '?',
    'ReflectionObject_getConstructor_basic.phpt': '?',
    'ReflectionObject_getConstructor_error.phpt': '?',
    'ReflectionObject_getName_basic.phpt': '?',
    'ReflectionObject_getName_error.phpt': '?',
    'ReflectionObject_getName_error1.phpt': '?',
    'ReflectionObject_isInstance_basic.phpt': '?',
    'ReflectionObject_isInstance_error.phpt': '?',
    'ReflectionObject_isInstantiable_basic.phpt': '?',
    'ReflectionObject_isInstantiable_error.phpt': '?',
    'ReflectionObject_isInstantiable_variation.phpt': '?',
    'ReflectionObject_isInternal_basic.phpt': '?',
    'ReflectionObject_isInternal_error.phpt': '?',
    'ReflectionObject_isSubclassOf.002.phpt': '?',
    'ReflectionObject_isSubclassOf_basic.phpt': '?',
    'ReflectionObject_isSubclassOf_error.phpt': '?',
    'ReflectionObject_isUserDefined_basic.phpt': '?',
    'ReflectionObject_isUserDefined_error.phpt': '?',
    'ReflectionParameter_001.phpt': '?',
    'ReflectionParameter_002.phpt': '?',
    'ReflectionParameter_003.phpt': '?',
    'ReflectionParameter_DefaultValueConstant_basic1.phpt': '?',
    'ReflectionParameter_DefaultValueConstant_basic2.phpt': '?',
    'ReflectionParameter_DefaultValueConstant_error.phpt': '?',
    'ReflectionParameter_canBePassedByValue.phpt': '?',
    'ReflectionParameter_export_basic.phpt': '?',
    'ReflectionParameter_export_error.phpt': '?',
    'ReflectionParameter_export_error2.phpt': '?',
    'ReflectionParameter_export_error3.phpt': '?',
    'ReflectionParameter_getDeclaringFunction_basic.phpt': '?',
    'ReflectionParameter_getPosition_basic.phpt': '?',
    'ReflectionParameter_invalidMethodInConstructor.phpt': '?',
    'ReflectionParameter_isDefault.phpt': '?',
    'ReflectionParameter_toString_basic.phpt': '?',
    'ReflectionProperty_basic2.phpt': 'missing ::getDocComment()',
    'ReflectionProperty_getDocComment_basic.phpt': 'missing ::getDocComment()',
    'ReflectionProperty_getDocComment_error.phpt': 'missing ::getDocComment()',
    'ReflectionProperty_getModifiers_basic.phpt': 'some flags are missing',
    'ReflectionProperty_getValue_error.phpt': '?',
    'ReflectionProperty_setAccessible.phpt': '?',
    'ReflectionProperty_setValue_error.phpt': '?',
    'bug26695.phpt': '?',
    'bug29268.phpt': '?',
    'bug29523.phpt': '?',
    'bug29828.phpt': '?',
    'bug29986.phpt': '?',
    'bug30148.phpt': '?',
    'bug30209.phpt': '?',
    'bug30856.phpt': '?',
    'bug31651.phpt': '?',
    'bug32981.phpt': '?',
    'bug33312.phpt': '?',
    'bug33389.phpt': '?',
    'bug36308.phpt': '?',
    'bug37964.phpt': '?',
    'bug38132.phpt': '?',
    'bug38194.phpt': '?',
    'bug38217.phpt': '?',
    'bug38465.phpt': '?',
    'bug38653.phpt': '?',
    'bug38942.phpt': '?',
    'bug39884.phpt': '?',
    'bug40431.phpt': '?',
    'bug40794.phpt': '?',
    'bug41061.phpt': '?',
    'bug42976.phpt': '?',
    'bug43926.phpt': '?',
    'bug45571.phpt': '?',
    'bug45765.phpt': '?',
    'bug46064.phpt': '?',
    'bug46064_2.phpt': '?',
    'bug46205.phpt': '?',
    'bug47254.phpt': '?',
    'bug48757.phpt': '?',
    'bug49074.phpt': '?',
    'bug49719.phpt': '?',
    'bug51905.phpt': 'Call to undefined method ReflectionParameter::isDefaultValueAvailable()',
    'bug51911.phpt': 'Call to undefined method ReflectionParameter::isDefaultValueAvailable()',
    'bug52057.phpt': '?',
    'bug52854.phpt': '?',
    'bug53366.phpt': '?',
    'bug60357.phpt': '?',
    'bug60367.phpt': '?',
    'bug61388.phpt': '?',
    'bug62384.phpt': '?',
    'bug62715.phpt': '?',
    'bug63399.phpt': '?',
    'bug63614.phpt': '?',
    'bug64239.phpt': '?',
    'closures_001.phpt': '?',
    'closures_002.phpt': '?',
    'closures_003.phpt': '?',
    'closures_003_v1.phpt': '?',
    'closures_004.phpt': '?',
    'parameters_001.phpt': '?',
    'parameters_002.phpt': '?',
    'property_exists.phpt': '?',
    'traits001.phpt': '?',
    'traits002.phpt': '?',
    'traits003.phpt': '?',
    'traits004.phpt': '?',
    'traits005.phpt': '?',
}

markers[spl_test_dir] = {
    'array_001.phpt': "missing notice on unset()",
    'array_002.phpt': "wrong instance number",
    'array_008.phpt': "Missing ArrayObject",
    'array_010.phpt': "Missing ArrayObject",
    'array_011.phpt': "Missing LimitIterator",
    'array_012.phpt': "Missing ArrayIterator",
    'array_013.phpt': "?",
    'array_014.phpt': "Missing ArrayIterator",
    'array_015.phpt': "Missing ArrayObject",
    'array_017.phpt': "Missing ArrayObject",
    'array_019.phpt': "Missing ArrayObject",
    'array_022.phpt': "SKIP: infinite loop when $ao->storage === $ao",
    'array_023.phpt': "Missing ArrayObject",
    'array_024.phpt': "Missing ArrayObject",
    'array_025.phpt': "Missing ArrayObject",
    'array_026.phpt': "Missing ArrayObject",
    'arrayObject_asort_basic1.phpt': "Missing ArrayObject",
    'arrayObject_asort_basic2.phpt': "Missing ArrayObject",
    'arrayObject_clone_basic1.phpt': "Missing ArrayObject",
    'arrayObject_clone_basic2.phpt': "Missing ArrayObject",
    'arrayObject_clone_basic3.phpt': "Missing ArrayObject",
    'arrayObject___construct_basic1.phpt': "Missing ArrayObject",
    'arrayObject___construct_basic2.phpt': "Missing ArrayObject",
    'arrayObject___construct_basic3.phpt': "Missing ArrayObject",
    'arrayObject___construct_basic4.phpt': "Missing ArrayObject",
    'arrayObject___construct_basic5.phpt': "Missing ArrayObject",
    'arrayObject___construct_basic6.phpt': "Missing ArrayObject",
    'arrayObject___construct_error1.phpt': "Missing ArrayObject",
    'arrayObject___construct_error2.phpt': "Missing ArrayObject",
    'arrayObject_count_basic1.phpt': "Missing ArrayObject",
    'arrayObject_exchangeArray_basic1.phpt': "Missing ArrayObject",
    'arrayObject_exchangeArray_basic2.phpt': "Missing ArrayObject",
    'arrayObject_exchangeArray_basic3.phpt': "Missing ArrayObject",
    'arrayObject_getFlags_basic1.phpt': "Missing ArrayObject",
    'arrayObject_getFlags_basic2.phpt': "Missing ArrayObject",
    'arrayObject_getIteratorClass_basic1.phpt': "Missing ArrayObject",
    'arrayObject_ksort_basic1.phpt': "Missing ArrayObject",
    'arrayObject_ksort_basic2.phpt': "Missing ArrayObject",
    'arrayObject_magicMethods1.phpt': "Missing ArrayObject",
    'arrayObject_magicMethods3.phpt': "Missing ArrayObject",
    'arrayObject_magicMethods4.phpt': "Missing ArrayObject",
    'arrayObject_magicMethods6.phpt': "Missing ArrayObject",
    'arrayObject_natcasesort_basic1.phpt': "Missing ArrayObject",
    'arrayObject_natsort_basic1.phpt': "Missing ArrayObject",
    'arrayObject_setFlags_basic1.phpt': "Missing ArrayObject",
    'arrayObject_setFlags_basic2.phpt': "Missing ArrayObject",
    'arrayObject_setIteratorClass_error1.phpt': "Missing ArrayObject",
    'arrayObject_uasort_basic1.phpt': "Missing ArrayObject",
    'arrayObject_uasort_error1.phpt': "Missing ArrayObject",
    'arrayObject_uksort_basic1.phpt': "Missing ArrayObject",
    'arrayObject_uksort_error1.phpt': "Missing ArrayObject",
    'ArrayObject_unserialize_empty_string.phpt': "Missing ArrayObject",
    'bug31346.phpt': "?",
    'bug31348.phpt': "?",
    'bug33136.phpt': "?",
    'bug34548.phpt': "?",
    'bug36941.phpt': "?",
    'bug37457.phpt': "Hippy calls current() and key() only when needed",
    'bug38325.phpt': "?",
    'bug38618.phpt': "?",
    'bug40036.phpt': "?",
    'bug41528.phpt': "?",
    'bug41691.phpt': "?",
    'bug41828.phpt': "Missing RecursiveIteratorIterator",
    'bug42654.phpt': "?",
    'bug42703.phpt': "?",
    'bug44615.phpt': "?",
    'bug45216.phpt': "Missing SplFileObject::fgetss",
    'bug45614.phpt': "?",
    'bug45622b.phpt': "?",
    'bug45622.phpt': "?",
    'bug45826.phpt': "?",
    'bug46088.phpt': "?",
    'bug46115.phpt': "?",
    'bug46160.phpt': "?",
    'bug48361.phpt': "?",
    'bug49263.phpt': "?",
    'bug49723.phpt': "?",
    'bug50579.phpt': "?",
    'bug51119.phpt': "?",
    'bug51374.phpt': "Missing SplFileObject::setFileClass",
    'bug51532.phpt': "Missing SplFileObject::fscanf",
    'bug52238.phpt': "?",
    'bug52573.phpt': "?",
    'bug52861.phpt': "?",
    'bug53071.phpt': "?",
    'bug53144.phpt': "?",
    'bug53362.phpt': "?",
    'bug53515.phpt': "?",
    'bug54281.phpt': "?",
    'bug54291.phpt': "?",
    'bug54304.phpt': "?",
    'bug54323.phpt': "?",
    'bug54384.phpt': "Missing IteratorIterator",
    'bug54970.phpt': "?",
    'bug54971.phpt': "?",
    'bug60201.phpt': "?",
    'bug61347.phpt': "?",
    'bug61418.phpt': "Missing RegexIterator",
    'bug61453.phpt': "?",
    'bug61527.phpt': "?",
    'bug61697.phpt': "?",
    'bug61828.phpt': "?",
    'bug62073.phpt': "?",
    'bug62262.phpt': "?",
    'bug62433.phpt': "Missing iterator_to_array",
    'bug62616.phpt': "?",
    'bug62672.phpt': "?",
    'bug62904.phpt': "?",
    'bug62978.phpt': "?",
    'bug63680.phpt': "?",
    'bug64106.phpt': "?",
    'bug64264.phpt': "?",
    'bug65328.phpt': "?",
    'CallbackFilterIteratorTest-002.phpt': "Missing CallbackFilterIterator",
    'CallbackFilterIteratorTest.phpt': "Missing CallbackFilterIterator",
    'class_implements_basic2.phpt': "Missing class_implements",
    'class_implements_basic.phpt': "Missing class_implements",
    'class_implements_variation1.phpt': "Missing class_implements",
    'class_implements_variation2.phpt': "Missing class_implements",
    'class_implements_variation.phpt': "Missing class_implements",
    'class_uses_basic2.phpt': "Missing class_uses",
    'class_uses_basic.phpt': "Missing class_uses",
    'class_uses_variation1.phpt': "Missing class_uses",
    'class_uses_variation2.phpt': "Missing class_uses",
    'class_uses_variation.phpt': "Missing class_uses",
    'countable_class_basic1.phpt': "Missing ReflectionClass::export",
    'countable_count_variation1.phpt': "?",
    'DirectoryIterator_empty_constructor.phpt': "No frames for builtin methods",
    'DirectoryIterator_getInode_error.phpt': "No frames for builtin methods",
    'dit_001.phpt': "Missing RecursiveDirectoryIterator's private properties",
    'dit_002.phpt': "Missing ReflectionClass",
    'dllist_001.phpt': "Missing SplDoublyLinkedList",
    'dllist_002.phpt': "Missing SplDoublyLinkedList",
    'dllist_003.phpt': "Missing SplDoublyLinkedList",
    'dllist_004.phpt': "Missing SplStack",
    'dllist_005.phpt': "Missing SplQueue",
    'dllist_006.phpt': "Missing SplDoublyLinkedList",
    'dllist_007.phpt': "Missing SplDoublyLinkedList",
    'dllist_008.phpt': "Missing SplDoublyLinkedList",
    'dllist_010.phpt': "Missing SplDoublyLinkedList",
    'dllist_011.phpt': "Missing SplDoublyLinkedList",
    'dllist_012.phpt': "Missing SplDoublyLinkedList",
    'dllist_013.phpt': "Missing SplDoublyLinkedList",
    'dllist_memleak.phpt': "Missing SplDoublyLinkedList",
    'fileobject_getfileinfo_basic.phpt': "Missing SplFileObject::getFileInfo",
    'fileobject_getmaxlinelen_basic.phpt': "Missing SplFileObject::setMaxLineLen",
    'fileobject_setmaxlinelen_basic.phpt': "Missing SplFileObject::setMaxLineLen",
    'fileobject_setmaxlinelen_error001.phpt': "Missing SplFileObject::setMaxLineLen",
    'fileobject_setmaxlinelen_error002.phpt': "Missing SplFileObject::setMaxLineLen",
    'fileobject_setmaxlinelen_error003.phpt': "Missing SplFileObject::setMaxLineLen",
    'fixedarray_001.phpt': "Missing SplFixedArray",
    'fixedarray_002.phpt': "Missing SplFixedArray",
    'fixedarray_003.phpt': "Missing SplFixedArray",
    'fixedarray_004.phpt': "Missing SplFixedArray",
    'fixedarray_005.phpt': "Missing SplFixedArray",
    'fixedarray_006.phpt': "Missing SplFixedArray",
    'fixedarray_007.phpt': "Missing SplFixedArray",
    'fixedarray_008.phpt': "Missing SplFixedArray",
    'fixedarray_009.phpt': "Missing SplFixedArray",
    'fixedarray_010.phpt': "Missing SplFixedArray",
    'fixedarray_011.phpt': "Missing SplFixedArray",
    'fixedarray_012.phpt': "Missing SplFixedArray",
    'fixedarray_013.phpt': "Missing SplFixedArray",
    'fixedarray_014.phpt': "Missing SplFixedArray",
    'fixedarray_015.phpt': "Missing SplFixedArray",
    'fixedarray_016.phpt': "Missing SplFixedArray",
    'fixedarray_017.phpt': "Missing SplFixedArray",
    'fixedarray_018.phpt': "Missing SplFixedArray",
    'fixedarray_019.phpt': "Missing SplFixedArray",
    'fixedarray_020.phpt': "Missing SplFixedArray",
    'fixedarray_021.phpt': "Missing SplFixedArray",
    'heap_001.phpt': "Missing SplMaxHeap",
    'heap_002.phpt': "Missing SplMinHeap",
    'heap_003.phpt': "Missing SplHeap",
    'heap_004.phpt': "Missing SplHeap",
    'heap_005.phpt': "Missing SplMinHeap",
    'heap_006.phpt': "Missing SplMaxHeap",
    'heap_007.phpt': "Missing SplMaxHeap",
    'heap_008.phpt': "Missing SplMaxHeap",
    'heap_009.phpt': "Missing SplMinHeap",
    'heap_010.phpt': "Missing SplMaxHeap",
    'heap_011.phpt': "Missing SplMinHeap",
    'heap_012.phpt': "Missing SplMaxHeap",
    'heap_corruption.phpt': "Missing SplHeap",
    'heap_current_variation_001.phpt': "Missing SplHeap",
    'heap_isempty_variation_001.phpt': "Missing SplHeap",
    'heap_it_current_empty.phpt': "Missing SplMinHeap",
    'heap_top_variation_001.phpt': "Missing SplMinHeap",
    'heap_top_variation_002.phpt': "Missing SplMinHeap",
    'heap_top_variation_003.phpt': "Missing SplMinHeap",
    'iterator_001.phpt': "Missing LimitIterator",
    'iterator_003.phpt': "Missing CachingIterator",
    'iterator_004.phpt': "Missing LimitIterator",
    'iterator_006.phpt': "Missing SimpleXML",
    'iterator_007.phpt': "Missing NoRewindIterator",
    'iterator_008.phpt': "Missing InfiniteIterator",
    'iterator_009.phpt': "Missing EmptyIterator",
    'iterator_010.phpt': "Missing LimitIterator",
    'iterator_011.phpt': "Missing LimitIterator",
    'iterator_012.phpt': "Missing NoRewindIterator",
    'iterator_013.phpt': "Missing AppendIterator",
    'iterator_014.phpt': "Missing RecursiveArrayIterator",
    'iterator_015.phpt': "missing RecursiveArrayIterator",
    'iterator_016.phpt': "missing RecursiveArrayIterator",
    'iterator_017.phpt': "Missing LimitIterator",
    'iterator_018.phpt': "Missing LimitIterator",
    'iterator_019.phpt': "Missing NoRewindIterator",
    'iterator_020.phpt': "Missing AppendIterator",
    'iterator_021.phpt': "Missing RecursiveArrayIterator",
    'iterator_022.phpt': "Missing RecursiveArrayIterator",
    'iterator_023.phpt': "Missing RecursiveArrayIterator",
    'iterator_024.phpt': "Missing RecursiveArrayIterator",
    'iterator_025.phpt': "Missing RecursiveArrayIterator",
    'iterator_026.phpt': "Missing RecursiveArrayIterator",
    'iterator_027.phpt': "Missing RecursiveArrayIterator",
    'iterator_028.phpt': "Missing RecursiveArrayIterator",
    'iterator_029.phpt': "Missing RegexIterator",
    'iterator_030.phpt': "Missing EmptyIterator",
    'iterator_032.phpt': "Missing Iterator",
    'iterator_033.phpt': "Missing ParentIterator",
    'iterator_034.phpt': "missing RecursiveArrayIterator",
    'iterator_035.phpt': "?",
    'iterator_036.phpt': "?",
    'iterator_037.phpt': "?",
    'iterator_038.phpt': "?",
    'iterator_039.phpt': "?",
    'iterator_040.phpt': "Missing RecursiveFilterIterator",
    'iterator_041a.phpt': "?",
    'iterator_041b.phpt': "?",
    'iterator_041.phpt': "?",
    'iterator_042.phpt': "?",
    'iterator_043.phpt': "?",
    'iterator_044.phpt': "?",
    'iterator_045.phpt': "?",
    'iterator_046.phpt': "?",
    'iterator_047.phpt': "missing RecursiveArrayIterator",
    'iterator_048.phpt': "missing RecursiveRegexIterator",
    'iterator_049b.phpt': "?",
    'iterator_049.phpt': "?",
    'iterator_050.phpt': "?",
    'iterator_051.phpt': "?",
    'iterator_052.phpt': "?",
    'iterator_053.phpt': "?",
    'iterator_054.phpt': "?",
    'iterator_055.phpt': "?",
    'iterator_056.phpt': "?",
    'iterator_059.phpt': "?",
    'iterator_060.phpt': "?",
    'iterator_061.phpt': "?",
    'iterator_062.phpt': "should throw exception",
    'iterator_063.phpt': "?",
    'iterator_064.phpt': "?",
    'iterator_065.phpt': "?",
    'iterator_066.phpt': "?",
    'iterator_068.phpt': "?",
    'iterator_count.phpt': "?",
    'iterator_to_array_nonscalar_keys.phpt': "?",
    'iterator_to_array.phpt': "?",
    'limititerator_seek.phpt': "?",
    'multiple_iterator_001.phpt': "?",
    'observer_001.phpt': "?",
    'observer_002.phpt': "?",
    'observer_003.phpt': "?",
    'observer_004.phpt': "?",
    'observer_005.phpt': "?",
    'observer_006.phpt': "?",
    'observer_007.phpt': "?",
    'observer_008.phpt': "?",
    'observer_009.phpt': "?",
    'pqueue_001.phpt': "?",
    'pqueue_002.phpt': "?",
    'pqueue_003.phpt': "?",
    'pqueue_004.phpt': "?",
    'pqueue_compare_basic.phpt': "?",
    'pqueue_compare_error.phpt': "?",
    'pqueue_current_error.phpt': "?",
    'RecursiveCallbackFilterIteratorTest.phpt': "?",
    'RecursiveDirectoryIterator_getSubPath_basic.phpt': "?",
    'RecursiveDirectoryIterator_getSubPathname_basic.phpt': "?",
    'recursiveIteratorIterator_beginchildren_error.phpt': "missing RecursiveArrayIterator",
    'recursiveiteratoriterator_beginiteration_basic.phpt': "missing RecursiveArrayIterator",
    'recursiveIteratorIterator_callHasChildren_error.phpt': "missing RecursiveArrayIterator",
    'recursiveIteratorIterator_endchildren_error.phpt': "missing RecursiveArrayIterator",
    'recursiveiteratoriterator_enditeration_basic.phpt': "missing RecursiveArrayIterator",
    'recursiveiteratoriterator_getsubiterator_basic.phpt': "missing RecursiveArrayIterator",
    'recursiveiteratoriterator_getsubiterator_error.phpt': "missing RecursiveArrayIterator",
    'recursiveiteratoriterator_getsubiterator_variation_002.phpt': "missing RecursiveArrayIterator",
    'recursiveiteratoriterator_getsubiterator_variation_003.phpt': "missing RecursiveArrayIterator",
    'recursiveiteratoriterator_getsubiterator_variation.phpt': "missing RecursiveArrayIterator",
    'recursiveiteratoriterator_nextelement_basic.phpt': "missing RecursiveArrayIterator",
    'recursiveIteratorIterator_nextelement_error.phpt': "missing RecursiveArrayIterator",
    'recursive_tree_iterator_001.phpt': "?",
    'recursive_tree_iterator_002.phpt': "?",
    'recursive_tree_iterator_003.phpt': "?",
    'recursive_tree_iterator_004.phpt': "?",
    'recursive_tree_iterator_005.phpt': "?",
    'recursive_tree_iterator_006.phpt': "?",
    'recursive_tree_iterator_007.phpt': "?",
    'recursive_tree_iterator_008.phpt': "?",
    'recursive_tree_iterator_setpostfix.phpt': "?",
    'recursive_tree_iterator_setprefixpart.phpt': "?",
    'regexIterator_flags_basic.phpt': "?",
    'regexiterator_getpregflags.phpt': "?",
    'regexiterator_getregex.phpt': "?",
    'regexIterator_mode_basic.phpt': "?",
    'regexiterator_setflags_exception.phpt': "?",
    'regexIterator_setMode_error.phpt': "?",
    'regexiterator_setpregflags_exception.phpt': "?",
    'regexiterator_setpregflags.phpt': "?",
    'spl_001.phpt': "?",
    'spl_003.phpt': "?",
    'spl_004.phpt': "missing RecursiveArrayIterator",
    'spl_005.phpt': "?",
    'spl_006.phpt': "?",
    'spl_007.phpt': "?",
    'SplArray_fromArray.phpt': "?",
    'spl_autoload_001.phpt': "?",
    'spl_autoload_002.phpt': "?",
    'spl_autoload_003.phpt': "?",
    'spl_autoload_004.phpt': "?",
    'spl_autoload_005.phpt': "?",
    'spl_autoload_006.phpt': "?",
    'spl_autoload_007.phpt': "?",
    'spl_autoload_008.phpt': "?",
    'spl_autoload_011.phpt': "?",
    'spl_autoload_012.phpt': "?",
    'spl_autoload_013.phpt': "?",
    'spl_caching_iterator_constructor_flags.phpt': "?",
    'spl_cachingiterator_setFlags_basic.phpt': "?",
    'spl_cachingiterator___toString_basic.phpt': "?",
    'spl_classes.phpt': "?",
    'SplDoublyLinkedList_add_invalid_offset.phpt': "?",
    'SplDoublyLinkedList_add_missing_parameter1.phpt': "?",
    'SplDoublyLinkedList_add_missing_parameter2.phpt': "?",
    'SplDoublyLinkedList_add_null_offset.phpt': "?",
    'SplDoublyLinkedList_bottom_pass_array.phpt': "?",
    'SplDoublyLinkedList_bottom_pass_float.phpt': "?",
    'SplDoublyLinkedList_bottom_pass_integer.phpt': "?",
    'SplDoublyLinkedList_bottom_pass_null.phpt': "?",
    'SplDoublyLinkedList_count_param_SplDoublyLinkedList.phpt': "?",
    'SplDoublyLinkedList_count.phpt': "?",
    'SplDoublyLinkedList_current_empty.phpt': "?",
    'SplDoublyLinkedList_current.phpt': "?",
    'SplDoublyLinkedList_debug-info.phpt': "?",
    'SplDoublyLinkedList_getIteratorMode_error.phpt': "?",
    'SplDoublyLinkedList_getIteratorMode.phpt': "?",
    'SplDoublyLinkedList_isEmpty_empty.phpt': "?",
    'SplDoublyLinkedList_isEmpty_empty-with-parameter.phpt': "?",
    'SplDoublyLinkedList_isEmpty_not-empty.phpt': "?",
    'SplDoublyLinkedList_isEmpty_not-empty-with-parameter.phpt': "?",
    'SplDoublyLinkedList_lifoMode.phpt': "?",
    'SplDoublyLinkedList_offsetExists_invalid_parameter.phpt': "?",
    'SplDoublyLinkedList_offsetExists_success.phpt': "?",
    'SplDoublyLinkedList_offsetGet_empty.phpt': "?",
    'SplDoublyLinkedList_offsetGet_missing_param.phpt': "?",
    'SplDoublyLinkedList_offsetGet_param_array.phpt': "?",
    'SplDoublyLinkedList_offsetGet_param_string.phpt': "?",
    'SplDoublyLinkedList_offsetSet_invalid_parameter.phpt': "?",
    'SplDoublyLinkedList_offsetSet_one_invalid_parameter.phpt': "?",
    'SplDoublylinkedlist_offsetunset_first002.phpt': "?",
    'SplDoublylinkedlist_offsetunset_first.phpt': "?",
    'SplDoublyLinkedList_offsetUnset_greater_than_elements.phpt': "?",
    'SplDoublylinkedlist_offsetunset_last.phpt': "?",
    'SplDoublyLinkedList_offsetUnset_negative-parameter.phpt': "?",
    'SplDoublyLinkedList_offsetUnset_parameter-larger-num-elements.phpt': "?",
    'SplDoublyLinkedList_pop_noParams.phpt': "?",
    'SplDoublyLinkedList_pop_params.phpt': "?",
    'SplDoublyLinkedList_push_missing_parameter.phpt': "?",
    'SplDoublyLinkedList_serialization.phpt': "?",
    'SplDoublyLinkedList_setIteratorMode_param_SplDoublyLinkedList.phpt': "?",
    'splDoublyLinkedList_shift_noParams.phpt': "?",
    'SplDoublyLinkedList_top_pass_array.phpt': "?",
    'SplDoublyLinkedList_top_pass_float.phpt': "?",
    'SplDoublyLinkedList_top_pass_integer.phpt': "?",
    'SplDoublyLinkedList_top_pass_null.phpt': "?",
    'SplDoublyLinkedList_unshift_missing_parameter.phpt': "?",
    'SplFileInfo_getGroup_error.phpt': "No frames for builtin methods",
    'SplFileInfo_getInode_error.phpt': "No frames for builtin methods",
    'SplFileInfo_getOwner_error.phpt': "No frames for builtin methods",
    'SplFileInfo_getPerms_error.phpt': "No frames for builtin methods",
    'SplFileObject_fflush_basic_001.phpt': "Missing stream_wrapper_register",
    'SplFileObject_fgetcsv_basic.phpt': "Missing SplFileObject",
    'SplFileObject_fgetcsv_delimiter_basic.phpt': "Missing SplFileObject",
    'SplFileObject_fgetcsv_delimiter_error.phpt': "Missing SplFileObject",
    'SplFileObject_fgetcsv_enclosure_basic.phpt': "Missing SplFileObject",
    'SplFileObject_fgetcsv_enclosure_error.phpt': "Missing SplFileObject",
    'SplFileObject_fgetcsv_escape_basic.phpt': "Missing SplFileObject",
    'SplFileObject_fgetcsv_escape_default.phpt': "Missing SplFileObject",
    'SplFileObject_fgetcsv_escape_error.phpt': "Missing SplFileObject",
    'SplFileObject_fpassthru_basic.phpt': "Missing SplFileObject",
    'SplFileObject_fputcsv_002.phpt': "Missing SplFileObject",
    'SplFileObject_fputcsv_error.phpt': "Missing SplFileObject",
    'SplFileObject_fputcsv.phpt': "Missing SplFileObject",
    'SplFileObject_fputcsv_variation10.phpt': "Missing SplFileObject",
    'SplFileObject_fputcsv_variation11.phpt': "Missing SplFileObject",
    'SplFileObject_fputcsv_variation12.phpt': "Missing SplFileObject",
    'SplFileObject_fputcsv_variation13.phpt': "Missing SplFileObject",
    'SplFileObject_fputcsv_variation14.phpt': "Missing SplFileObject",
    'SplFileObject_fputcsv_variation1.phpt': "Missing SplFileObject",
    'SplFileObject_fputcsv_variation5.phpt': "Missing SplFileObject",
    'SplFileObject_fputcsv_variation6.phpt': "Missing SplFileObject",
    'SplFileObject_fputcsv_variation7.phpt': "Missing SplFileObject",
    'SplFileObject_fputcsv_variation8.phpt': "Missing SplFileObject",
    'SplFileObject_fscanf_basic.phpt': "Missing SplFileObject",
    'SplFileObject_ftruncate_error_001.phpt': "Missing stream_wrapper_register",
    'SplFileObject_getCsvControl_basic_001.phpt': "Missing SplFileObject",
    'SplFileObject_seek_error_001.phpt': "problem with rising errors",
    'SplFileObject_setCsvControl_basic.phpt': "Missing SplFileObject",
    'SplFileObject_setCsvControl_error001.phpt': "Missing SplFileObject",
    'SplFileObject_setCsvControl_error002.phpt': "Missing SplFileObject",
    'SplFileObject_setCsvControl_error003.phpt': "Missing SplFileObject",
    'SplFileObject_setCsvControl_variation001.phpt': "Missing SplFileObject",
    'SplFixedArray__construct_param_array.phpt': "?",
    'SplFixedArray__construct_param_float.phpt': "?",
    'SplFixedArray__construct_param_null.phpt': "?",
    'SplFixedArray_construct_param_SplFixedArray.phpt': "?",
    'SplFixedArray__construct_param_string.phpt': "?",
    'SplFixedArray_count_checkParams.phpt': "?",
    'SplFixedArray_count_param_int.phpt': "?",
    'SplFixedArray_current_param.phpt': "?",
    'SplFixedArray_fromarray_indexes.phpt': "?",
    'SplFixedArray_fromArray_invalid_parameter_001.phpt': "?",
    'SplFixedArray_fromArray_invalid_parameter_002.phpt': "?",
    'SplFixedArray_fromarray_non_indexes.phpt': "?",
    'SplFixedArray_fromarray_param_boolean.phpt': "?",
    'SplFixedArray_fromarray_param_multiarray.phpt': "?",
    'SplFixedArray_getSize_pass_param.phpt': "?",
    'SplFixedArray_key_param.phpt': "?",
    'SplFixedArray_key_setsize.phpt': "?",
    'SplFixedArray_next_param.phpt': "?",
    'SplFixedArray_offsetExists_invalid_parameter.phpt': "?",
    'splfixedarray_offsetExists_larger.phpt': "?",
    'SplFixedArray_offsetExists_less_than_zero.phpt': "?",
    'SplFixedArray_offsetGet_invalid_parameter.phpt': "?",
    'SplFixedArray_offsetSet_invalid_parameter.phpt': "?",
    'SplFixedArray_offsetSet_one_invalid_parameter.phpt': "?",
    'SplFixedArray_offsetUnset_invalid_parameter.phpt': "?",
    'SplFixedArray_offsetUnset_string.phpt': "?",
    'SplFixedArray_rewind_param.phpt': "?",
    'SplFixedArray_serialize.phpt': "?",
    'SplFixedArray_setsize_001.phpt': "?",
    'SplFixedArray_setSize_filled_to_smaller.phpt': "?",
    'SplFixedArray_setsize_grow.phpt': "?",
    'SplFixedArray_setSize_param_array.phpt': "?",
    'SplFixedArray_setSize_param_float.phpt': "?",
    'SplFixedArray_setSize_param_null.phpt': "?",
    'SplFixedArray_setSize_reduce.phpt': "?",
    'SplFixedArray_setsize_shrink.phpt': "?",
    'SplFixedArray_toArray_with-params.phpt': "?",
    'spl_heap_count_basic.phpt': "?",
    'spl_heap_count_error.phpt': "?",
    'SplHeap_count_invalid_parameter.phpt': "?",
    'SplHeap_extract_invalid_parameter.phpt': "?",
    'spl_heap_extract_parameter_error.phpt': "?",
    'spl_heap_insert_basic.phpt': "?",
    'SplHeap_insert_invalid_parameter.phpt': "?",
    'spl_heap_is_empty_basic.phpt': "?",
    'SplHeap_isEmpty_invalid_parameter.phpt': "?",
    'spl_heap_isempty.phpt': "?",
    'SplHeap_isEmpty.phpt': "?",
    'spl_heap_iteration_error.phpt': "?",
    'spl_heap_recoverfromcorruption_arguments.phpt': "?",
    'spl_iterator_apply_error_001.phpt': "?",
    'spl_iterator_apply_error.phpt': "?",
    'spl_iterator_caching_count_basic.phpt': "?",
    'spl_iterator_caching_count_error.phpt': "?",
    'spl_iterator_caching_getcache_error.phpt': "?",
    'spl_iterator_iterator_constructor.phpt': "?",
    'spl_iterator_to_array_basic.phpt': "?",
    'spl_iterator_to_array_error.phpt': "?",
    'spl_limit_iterator_check_limits.phpt': "?",
    'spl_maxheap_compare_basic.phpt': "?",
    'spl_minheap_compare_error.phpt': "?",
    'SplObjectStorage_addAll_invalid_parameter.phpt': "?",
    'SplObjectStorage_attach_invalid_parameter.phpt': "?",
    'SplObjectStorage_contains_invalid_parameter.phpt': "?",
    'SplObjectStorage_current_empty_storage.phpt': "?",
    'SplObjectStorage_detach_invalid_parameter.phpt': "?",
    'SplObjectStorage_getHash.phpt': "?",
    'SplObjectStorage_getInfo_empty_storage.phpt': "?",
    'SplObjectStorage_offsetGet_invalid_parameter.phpt': "?",
    'SplObjectStorage_offsetGet_missing_object.phpt': "?",
    'SplObjectStorage_offsetGet.phpt': "?",
    'SplObjectStorage_removeAllExcept_basic.phpt': "?",
    'SplObjectStorage_removeAllExcept_invalid_parameter.phpt': "?",
    'SplObjectStorage_removeAll_invalid_parameter.phpt': "?",
    'SplObjectStorage_setInfo_empty_storage.phpt': "?",
    'SplObjectStorage_setInfo_invalid_parameter.phpt': "?",
    'SplObjectStorage_unserialize_bad.phpt': "?",
    'SplObjectStorage_unserialize_invalid_parameter1.phpt': "?",
    'SplObjectStorage_unserialize_invalid_parameter2.phpt': "?",
    'SplObjectStorage_unserialize_invalid_parameter3.phpt': "?",
    'SplObjectStorage_unserialize_nested.phpt': "?",
    'SplObjectStorage_var_dump.phpt': "?",
    'spl_pq_top_basic.phpt': "?",
    'spl_pq_top_error_args.phpt': "?",
    'spl_pq_top_error_corrupt.phpt': "?",
    'spl_pq_top_error_empty.phpt': "?",
    'spl_priorityqeue_insert_two_params_error.phpt': "?",
    'SplPriorityQueue_extract_invalid_parameter.phpt': "?",
    'splpriorityqueue_extract.phpt': "?",
    'SplPriorityQueue_insert_invalid_parameter.phpt': "?",
    'splpriorityqueue_setextractflags.phpt': "?",
    'SplQueue_setIteratorMode_param_lifo.phpt': "?",
    'SplQueue_setIteratorMode.phpt': "?",
    'spl_recursiveIteratorIterator_setMaxDepth_parameter_count.phpt': "missing RecursiveArrayIterator",
    'SplStack_setIteratorMode.phpt': "?",
    'SplTempFileObject_constructor_basic.phpt': "Missing SplTempFileObject, SplFileObject",
    'SplTempFileObject_constructor_error.phpt': "Missing SplTempFileObject",
    'SplTempFileObject_constructor_maxmemory_basic.phpt': "Missing SplTempFileObject",
    'SplTempFileObject_constructor_memory_lt1_variation.phpt': "Missing SplTempFileObject",
}


markers['Zend/tests/constants'] = {}
markers['Zend/multibyte'] = SkipAll()
markers['Zend/traits'] = SkipAll()
markers['Zend/traits/bugs'] = SkipAll()

markers[ctype_test_dir] = {}
markers[hash_test_dir] = {
    'ripemd128.phpt':  slow,
    'ripemd160.phpt':  slow,
    'ripemd256.phpt':  slow,
    'ripemd320.phpt':  slow,
    'sha1.phpt':  slow,
    'md5.phpt':  slow,
    'sha224.phpt':  slow,
    'sha256.phpt':  slow,
    'sha384.phpt':  slow,
    'sha512.phpt':  slow,
    'snefru.phpt':  slow,
    'tiger.phpt':  slow,
    'whirlpool.phpt':  slow,
}

markers[mcrypt_test_dir] = {
    'mcrypt_decrypt_variation4.phpt': 'missing obj to str cast one warn level 8',
    'mcrypt_ecb_variation4.phpt': 'missing obj to str cast one warn level 8',
    'mcrypt_encrypt_variation4.phpt': 'missing obj to str cast one warn level 8',
    'mcrypt_filters.phpt': 'missing stream filters',
    'mcrypt_get_cipher_name.phpt': 'missing',
}

markers['ext/bz2'] = {
    '001.phpt': '?',
    '002.phpt': '?',
    '003.phpt': '?',
    '004.phpt': '?',
    '005.phpt': '?',
    'bug51997.phpt': '?',
    'bz2_filter_compress.phpt': '?',
    'bz2_filter_decompress.phpt': '?',
    'with_files.phpt': '?',}

markers['ext/zlib'] = {
    'bug_34821.phpt': slow,
    'gzinflate-bug42663.phpt': slow,
    'gzcompress_basic1.phpt': slow,
    'gzdeflate_basic1.phpt': slow,
    'gzencode_basic1.phpt': slow,

    '004.phpt': '?',
    '005.phpt': '?',
    '006.phpt': '?',
    '007.phpt': '?',
    'bug60761.phpt': 'SKIP: Unknown phpt section header: CGI',
    'bug61139.phpt': '?',
    'bug61820.phpt': '?',
    'bug65391.phpt': '?',
    'bug67724.phpt': '?',
    'bug_40189.phpt': '?',
    'bug_52944.phpt': '?',
    'compress_zlib_wrapper.phpt': '?',
    'gzclose_basic.phpt': '?',
    'gzclose_error.phpt': '?',
    'gzcompress_error1.phpt': '?',
    'gzdeflate_error1.phpt': '?',
    'gzencode_error1.phpt': '?',
    'gzeof_basic.phpt': '?',
    'gzeof_error.phpt': '?',
    'gzeof_variation1.phpt': '?',
    'gzfile_basic.phpt': '?',
    'gzfile_basic2.phpt': '?',
    'gzfile_error.phpt': '?',
    'gzfile_variation1.phpt': '?',
    'gzfile_variation10.phpt': '?',
    'gzfile_variation11.phpt': '?',
    'gzfile_variation12.phpt': '?',
    'gzfile_variation13.phpt': '?',
    'gzfile_variation14.phpt': '?',
    'gzfile_variation15.phpt': '?',
    'gzfile_variation2.phpt': '?',
    'gzfile_variation3.phpt': '?',
    'gzfile_variation4.phpt': '?',
    'gzfile_variation5.phpt': '?',
    'gzfile_variation6.phpt': '?',
    'gzfile_variation7.phpt': '?',
    'gzfile_variation8.phpt': '?',
    'gzfile_variation9.phpt': '?',
    'gzfilegzreadfile.phpt': '?',
    'gzgetc_basic.phpt': '?',
    'gzgetc_error.phpt': '?',
    'gzgets_basic.phpt': '?',
    'gzgets_error.phpt': '?',
    'gzinflate_error1.phpt': '?',
    'gzinflate_length.phpt': '?',
    'gzopen_basic.phpt': '?',
    'gzopen_basic2.phpt': '?',
    'gzopen_error.phpt': '?',
    'gzopen_variation1.phpt': '?',
    'gzopen_variation2.phpt': '?',
    'gzopen_variation3.phpt': '?',
    'gzopen_variation4.phpt': '?',
    'gzopen_variation5.phpt': '?',
    'gzopen_variation6.phpt': '?',
    'gzopen_variation7.phpt': '?',
    'gzopen_variation8.phpt': '?',
    'gzopen_variation9.phpt': '?',
    'gzpassthru_basic.phpt': '?',
    'gzpassthru_error.phpt': '?',
    'gzputs_basic.phpt': '?',
    'gzread_basic.phpt': '?',
    'gzread_error.phpt': '?',
    'gzread_error2.phpt': '?',
    'gzread_variation1.phpt': '?',
    'gzreadgzwrite.phpt': '?',
    'gzreadgzwriteplain.phpt': '?',
    'gzrewind_basic.phpt': '?',
    'gzrewind_basic2.phpt': '?',
    'gzrewind_error.phpt': '?',
    'gzrewind_variation1.phpt': '?',
    'gzseek_basic.phpt': '?',
    'gzseek_basic2.phpt': '?',
    'gzseek_error.phpt': '?',
    'gzseek_variation1.phpt': '?',
    'gzseek_variation2.phpt': '?',
    'gzseek_variation3.phpt': '?',
    'gzseek_variation4.phpt': '?',
    'gzseek_variation5.phpt': '?',
    'gzseek_variation6.phpt': '?',
    'gzseek_variation7.phpt': '?',
    'gztell_basic.phpt': '?',
    'gztell_basic2.phpt': '?',
    'gztell_error.phpt': '?',
    'gzuncompress_error1.phpt': '?',
    'gzwrite_basic.phpt': '?',
    'gzwrite_error.phpt': '?',
    'gzwrite_error2.phpt': '?',
    'gzwrite_variation1.phpt': '?',
    'readgzfile_basic.phpt': '?',
    'readgzfile_basic2.phpt': '?',
    'readgzfile_error.phpt': '?',
    'readgzfile_variation1.phpt': '?',
    'readgzfile_variation10.phpt': '?',
    'readgzfile_variation11.phpt': '?',
    'readgzfile_variation12.phpt': '?',
    'readgzfile_variation13.phpt': '?',
    'readgzfile_variation14.phpt': '?',
    'readgzfile_variation15.phpt': '?',
    'readgzfile_variation2.phpt': '?',
    'readgzfile_variation3.phpt': '?',
    'readgzfile_variation4.phpt': '?',
    'readgzfile_variation5.phpt': '?',
    'readgzfile_variation6.phpt': '?',
    'readgzfile_variation7.phpt': '?',
    'readgzfile_variation8.phpt': '?',
    'readgzfile_variation9.phpt': '?',
    'zlib_filter_deflate.phpt': '?',
    'zlib_filter_deflate2.phpt': '?',
    'zlib_filter_inflate.phpt': '?',
    'zlib_filter_inflate2.phpt': '?',
    'zlib_scheme_copy_basic.phpt': '?',
    'zlib_scheme_copy_variation1.phpt': '?',
    'zlib_scheme_copy_variation2.phpt': '?',
    'zlib_scheme_dir_basic.phpt': '?',
    'zlib_scheme_file_basic.phpt': '?',
    'zlib_scheme_file_get_contents_basic.phpt': '?',
    'zlib_scheme_file_put_contents_basic.phpt': '?',
    'zlib_scheme_file_read_file_basic.phpt': '?',
    'zlib_scheme_fopen_basic.phpt': '?',
    'zlib_scheme_fopen_variation1.phpt': '?',
    'zlib_scheme_rename_basic.phpt': '?',
    'zlib_scheme_unlink_basic.phpt': '?',
    'zlib_wrapper_fflush_basic.phpt': '?',
    'zlib_wrapper_flock_basic.phpt': '?',
    'zlib_wrapper_fstat_basic.phpt': '?',
    'zlib_wrapper_ftruncate_basic.phpt': '?',
    'zlib_wrapper_meta_data_basic.phpt': '?',
}

prerequisites = {mysql_test_dir: "mysql",
                 mcrypt_test_dir: "mcrypt"}


class PHPTest(Item):
    def runtest(self):
        basename = py.path.local(self.name).relto(TEST_DIR)
        dirname = basename[:basename.rfind('/')]
        fname = py.path.local(self.name).basename
        prereq = prerequisites.get(dirname)
        if prereq and not is_optional_extension_enabled(prereq):
            py.test.skip("Extension %s required" % prereq)
        phpt_test(dirname, fname)

    def reportinfo(self):
        return self.name, None, py.path.local(self.name).basename


class PHPModule(Collector):
    def __init__(self, name, parent):
        Collector.__init__(self, name, parent)
        self._nodeid = py.path.local(name).relto(TEST_DIR)

    def collect(self):
        return [PHPTest(self.name, self)]


def pytest_collect_file(path, parent):
    if str(path).endswith('.phpt'):
        return PHPModule(str(path), parent)


def strip_ampersand(s):
    # Exactly matching PHP's var_dump() output requires fully exact copying
    # of its ref counting semantics, so we just strip leading '&'s.
    if s.startswith('&'):
        return s[1:]
    else:
        return s

FATAL_UNDEFINED = 'Fatal error: Call to undefined function '
INTERFACES = ['ArrayAccess', 'Countable', 'Iterator', 'Traversable',
    'Serializable']
MISSING_INTERFACE = dict([(name,
                           "Fatal error: Interface '%s' not found" % name)
                          for name in INTERFACES])


def phpt_test(dir, file_name):
    marker = markers[dir].get(file_name, None)
    if marker is not None:
        assert isinstance(marker, str)
        if marker.startswith('SKIP:'):
            py.test.skip(marker)
    sign_only = (marker == check_sign_only)
    if sign_only:
        marker = None

    file_name = os.path.join(TEST_DIR, dir, file_name)
    (tname, skipif_src, src, exp, ini,
     clean, request) = parse_phpt(file_name)
    os.chdir(os.path.dirname(file_name))

    fname = file_name.replace('.phpt', '.php')
    with open(fname, 'w') as f:
        f.write(src)
    runner = PhptRunner(ini, fname, request)
    locale.setlocale(locale.LC_ALL, 'C')
    try:
        skipif = runner.run(skipif_src)
        if skipif and skipif[-1].startswith('skip'):
            py.test.skip(skipif[-1])
        try:
            raw_output = runner.run(src)
        except:
            if marker is None:
                raise      # the test is supposed not to fail, but did
            else:
                py.test.skip(marker)     # failed as expected
    finally:
        os.chdir(os.path.dirname(file_name))
        runner.run(clean)
        os.remove(fname)

    pt = PrettyTable(["st", "php", "hippy"])
    pt.align["st"] = "l"
    pt.align["php"] = "l"
    pt.align["hippy"] = "l"

    output = []
    for l in raw_output:
        if not isinstance(l, str):
            l = runner.space.str_w(l)
        for pl in l.split('\n'):
            if pl.strip() != "":
                output.append(pl)

    diff = []
    for php, hippy in zip(exp, output):
        hippy = strip_ampersand(hippy.strip())
        php = strip_ampersand(php.strip())
        if matches_line(php, hippy, sign_only):
            st = "ok"
        else:
            st = "X"
            diff.append((php, hippy))
        pt.add_row([st, php[:COL_WIDTH].decode('latin1'),
                    hippy[:COL_WIDTH].decode('latin1')])

    if diff:
        print "\n\n"
        print pt
        print "\n\n"
    try:
        for p, h in diff:
            assert p == h
        assert len(exp) == len(output)
    except AssertionError:
        if marker is None:
            raise      # the test is supposed not to fail, but did
        else:
            py.test.skip(marker)     # failed as expected
    else:
        if marker is None or marker.lower().startswith('xfail:'):
            pass       # everything is passing
        else:
            raise Exception("the test '%s' was supposed to fail, but didn't"
                            % (file_name,))
