1<?php
2
3function libxml_options_to_int($libxmlOptions) {
4
5    $defined_constants = get_defined_constants(true);
6    $env_array = explode('|', $libxmlOptions);
7    $libxml_constants = array_intersect_key($defined_constants['libxml'], array_flip($env_array));
8
9    $sum = 0;
10    foreach($libxml_constants as $value) {
11        $sum = $sum|$value;
12    }
13
14    return $sum;
15}
16?>
17