<commit_before># Copyright (C) 2008, The Perl Foundation.

=head1 NAME

php_pcre.pir - PHP pcre  Library

=head1 DESCRIPTION

=head2 Functions

=over 4

=cut

.HLL 'pipp'

.include 'src/common/php_MACRO.pir'
.include 'cclass.pasm'

.sub '__onload' :anon :load :init
    push_eh _handler
    load_bytecode "library/pcre.pir"
    load_bytecode "library/libpcre.pir"
    $P0 = get_global ['PCRE'], 'init'
    $P1 = $P0()
    new $P0, 'PhpInteger'
    set $P0, 0
    set_hll_global 'pcre_error_code', $P0
    new $P0, 'Hash'
    set_hll_global 'pcre_cache', $P0
    __init()
  _handler:
.end

# options PCRE
.const int PCRE_CASELESS           = 0x00000001
.const int PCRE_MULTILINE          = 0x00000002
.const int PCRE_DOTALL             = 0x00000004
.const int PCRE_EXTENDED           = 0x00000008
.const int PCRE_ANCHORED           = 0x00000010
.const int PCRE_DOLLAR_ENDONLY     = 0x00000020
.const int PCRE_EXTRA              = 0x00000040<commit_msg>'library' is in search path. Loading the *pbc's gives errors.<commit_after># Copyright (C) 2008, The Perl Foundation.

=head1 NAME

php_pcre.pir - PHP pcre  Library

=head1 DESCRIPTION

=head2 Functions

=over 4

=cut

.HLL 'pipp'

.include 'src/common/php_MACRO.pir'
.include 'cclass.pasm'

.sub '__onload' :anon :load :init
    push_eh _handler
    load_bytecode "pcre.pir"                # load_bytecode "pcre.pbc" gives failures
    load_bytecode "libpcre.pir"             # load_bytecode "libpcre.pbc" gives failures
    $P0 = get_global ['PCRE'], 'init'
    $P1 = $P0()
    new $P0, 'PhpInteger'
    set $P0, 0
    set_hll_global 'pcre_error_code', $P0
    new $P0, 'Hash'
    set_hll_global 'pcre_cache', $P0
    __init()
  _handler:
.end

# options PCRE
.const int PCRE_CASELESS           = 0x00000001
.const int PCRE_MULTILINE          = 0x00000002
.const int PCRE_DOTALL             = 0x00000004
.const int PCRE_EXTENDED           = 0x00000008
.const int PCRE_ANCHORED           = 0x00000010
.const int PCRE_DOLLAR_ENDONLY     = 0x00000020
.const int PCRE_EXTRA              = 0x00000040
{'fraction_non_alphanumeric': 0.0966796875, 'fraction_numerical': 0.078125, 'mean_word_length': 2.7458866544789764, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 8, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '736547', 'n_tokens_mistral': 921, 'n_tokens_neox': 785, 'n_words': 198}