Lines Matching refs:parser
65 XML_Parser parser; local
135 #define SKIP_TAGSTART(str) ((str) + (parser->toffset > (int)strlen(str) ? strlen(str) : parser->tof…
159 static void _xml_add_to_info(xml_parser *parser, const char *name);
160 inline static zend_string *_xml_decode_tag(xml_parser *parser, const XML_Char *tag);
321 static void xml_parser_free_ltags(xml_parser *parser) in xml_parser_free_ltags() argument
323 if (parser->ltags) { in xml_parser_free_ltags()
325 for (inx = 0; ((inx < parser->level) && (inx < XML_MAXLEVEL)); inx++) in xml_parser_free_ltags()
326 efree(parser->ltags[ inx ]); in xml_parser_free_ltags()
327 efree(parser->ltags); in xml_parser_free_ltags()
333 xml_parser *parser = xml_parser_from_obj(object); in xml_parser_free_obj() local
335 if (parser->parser) { in xml_parser_free_obj()
336 XML_ParserFree(parser->parser); in xml_parser_free_obj()
338 xml_parser_free_ltags(parser); in xml_parser_free_obj()
339 if (!Z_ISUNDEF(parser->startElementHandler)) { in xml_parser_free_obj()
340 zval_ptr_dtor(&parser->startElementHandler); in xml_parser_free_obj()
342 if (!Z_ISUNDEF(parser->endElementHandler)) { in xml_parser_free_obj()
343 zval_ptr_dtor(&parser->endElementHandler); in xml_parser_free_obj()
345 if (!Z_ISUNDEF(parser->characterDataHandler)) { in xml_parser_free_obj()
346 zval_ptr_dtor(&parser->characterDataHandler); in xml_parser_free_obj()
348 if (!Z_ISUNDEF(parser->processingInstructionHandler)) { in xml_parser_free_obj()
349 zval_ptr_dtor(&parser->processingInstructionHandler); in xml_parser_free_obj()
351 if (!Z_ISUNDEF(parser->defaultHandler)) { in xml_parser_free_obj()
352 zval_ptr_dtor(&parser->defaultHandler); in xml_parser_free_obj()
354 if (!Z_ISUNDEF(parser->unparsedEntityDeclHandler)) { in xml_parser_free_obj()
355 zval_ptr_dtor(&parser->unparsedEntityDeclHandler); in xml_parser_free_obj()
357 if (!Z_ISUNDEF(parser->notationDeclHandler)) { in xml_parser_free_obj()
358 zval_ptr_dtor(&parser->notationDeclHandler); in xml_parser_free_obj()
360 if (!Z_ISUNDEF(parser->externalEntityRefHandler)) { in xml_parser_free_obj()
361 zval_ptr_dtor(&parser->externalEntityRefHandler); in xml_parser_free_obj()
363 if (!Z_ISUNDEF(parser->unknownEncodingHandler)) { in xml_parser_free_obj()
364 zval_ptr_dtor(&parser->unknownEncodingHandler); in xml_parser_free_obj()
366 if (!Z_ISUNDEF(parser->startNamespaceDeclHandler)) { in xml_parser_free_obj()
367 zval_ptr_dtor(&parser->startNamespaceDeclHandler); in xml_parser_free_obj()
369 if (!Z_ISUNDEF(parser->endNamespaceDeclHandler)) { in xml_parser_free_obj()
370 zval_ptr_dtor(&parser->endNamespaceDeclHandler); in xml_parser_free_obj()
372 if (parser->baseURI) { in xml_parser_free_obj()
373 efree(parser->baseURI); in xml_parser_free_obj()
375 if (!Z_ISUNDEF(parser->object)) { in xml_parser_free_obj()
376 zval_ptr_dtor(&parser->object); in xml_parser_free_obj()
379 zend_object_std_dtor(&parser->std); in xml_parser_free_obj()
384 xml_parser *parser = xml_parser_from_obj(object); in xml_parser_get_gc() local
385 *table = &parser->object; in xml_parser_get_gc()
417 static void xml_call_handler(xml_parser *parser, zval *handler, zend_function *function_ptr, int ar… in xml_call_handler() argument
422 if (parser && handler && !EG(exception)) { in xml_call_handler()
428 fci.object = Z_OBJ(parser->object); in xml_call_handler()
556 static void _xml_add_to_info(xml_parser *parser, const char *name) in _xml_add_to_info() argument
560 if (Z_ISUNDEF(parser->info)) { in _xml_add_to_info()
565 if ((element = zend_hash_str_find(Z_ARRVAL(parser->info), name, name_len)) == NULL) { in _xml_add_to_info()
568 element = zend_hash_str_update(Z_ARRVAL(parser->info), name, name_len, &values); in _xml_add_to_info()
571 add_next_index_long(element, parser->curtag); in _xml_add_to_info()
573 parser->curtag++; in _xml_add_to_info()
578 static zend_string *_xml_decode_tag(xml_parser *parser, const XML_Char *tag) in _xml_decode_tag() argument
582 str = xml_utf8_decode(tag, _xml_xmlcharlen(tag), parser->target_encoding); in _xml_decode_tag()
584 if (parser->case_folding) { in _xml_decode_tag()
595 xml_parser *parser = (xml_parser *)userData; in _xml_startElementHandler() local
600 if (!parser) { in _xml_startElementHandler()
604 parser->level++; in _xml_startElementHandler()
606 tag_name = _xml_decode_tag(parser, name); in _xml_startElementHandler()
608 if (!Z_ISUNDEF(parser->startElementHandler)) { in _xml_startElementHandler()
609 ZVAL_COPY(&args[0], &parser->index); in _xml_startElementHandler()
616 att = _xml_decode_tag(parser, attributes[0]); in _xml_startElementHandler()
617 val = xml_utf8_decode(attributes[1], strlen((char *)attributes[1]), parser->target_encoding); in _xml_startElementHandler()
627 xml_call_handler(parser, &parser->startElementHandler, parser->startElementPtr, 3, args, &retval); in _xml_startElementHandler()
631 if (!Z_ISUNDEF(parser->data) && !EG(exception)) { in _xml_startElementHandler()
632 if (parser->level <= XML_MAXLEVEL) { in _xml_startElementHandler()
639 _xml_add_to_info(parser, ZSTR_VAL(tag_name) + parser->toffset); in _xml_startElementHandler()
643 add_assoc_long(&tag, "level", parser->level); in _xml_startElementHandler()
645 parser->ltags[parser->level-1] = estrdup(ZSTR_VAL(tag_name)); in _xml_startElementHandler()
646 parser->lastwasopen = 1; in _xml_startElementHandler()
653 att = _xml_decode_tag(parser, attributes[0]); in _xml_startElementHandler()
654 val = xml_utf8_decode(attributes[1], strlen((char *)attributes[1]), parser->target_encoding); in _xml_startElementHandler()
671 parser->ctag = zend_hash_next_index_insert(Z_ARRVAL(parser->data), &tag); in _xml_startElementHandler()
672 } else if (parser->level == (XML_MAXLEVEL + 1)) { in _xml_startElementHandler()
684 xml_parser *parser = (xml_parser *)userData; in _xml_endElementHandler() local
686 if (!parser) { in _xml_endElementHandler()
692 zend_string *tag_name = _xml_decode_tag(parser, name); in _xml_endElementHandler()
694 if (!Z_ISUNDEF(parser->endElementHandler)) { in _xml_endElementHandler()
695 ZVAL_COPY(&args[0], &parser->index); in _xml_endElementHandler()
698 xml_call_handler(parser, &parser->endElementHandler, parser->endElementPtr, 2, args, &retval); in _xml_endElementHandler()
702 if (!Z_ISUNDEF(parser->data) && !EG(exception)) { in _xml_endElementHandler()
705 if (parser->lastwasopen) { in _xml_endElementHandler()
706 add_assoc_string(parser->ctag, "type", "complete"); in _xml_endElementHandler()
710 _xml_add_to_info(parser, ZSTR_VAL(tag_name) + parser->toffset); in _xml_endElementHandler()
714 add_assoc_long(&tag, "level", parser->level); in _xml_endElementHandler()
716 zend_hash_next_index_insert(Z_ARRVAL(parser->data), &tag); in _xml_endElementHandler()
719 parser->lastwasopen = 0; in _xml_endElementHandler()
724 if ((parser->ltags) && (parser->level <= XML_MAXLEVEL)) { in _xml_endElementHandler()
725 efree(parser->ltags[parser->level-1]); in _xml_endElementHandler()
728 parser->level--; in _xml_endElementHandler()
735 xml_parser *parser = (xml_parser *)userData; in _xml_characterDataHandler() local
737 if (!parser) { in _xml_characterDataHandler()
743 if (!Z_ISUNDEF(parser->characterDataHandler)) { in _xml_characterDataHandler()
744 ZVAL_COPY(&args[0], &parser->index); in _xml_characterDataHandler()
745 _xml_xmlchar_zval(s, len, parser->target_encoding, &args[1]); in _xml_characterDataHandler()
746 …xml_call_handler(parser, &parser->characterDataHandler, parser->characterDataPtr, 2, args, &retval… in _xml_characterDataHandler()
750 if (Z_ISUNDEF(parser->data) || EG(exception)) { in _xml_characterDataHandler()
756 decoded_value = xml_utf8_decode(s, len, parser->target_encoding); in _xml_characterDataHandler()
757 if (parser->skipwhite) { in _xml_characterDataHandler()
773 if (parser->lastwasopen) { in _xml_characterDataHandler()
776 if ((myval = zend_hash_str_find(Z_ARRVAL_P(parser->ctag), "value", sizeof("value") - 1))) { in _xml_characterDataHandler()
783 if (doprint || (! parser->skipwhite)) { in _xml_characterDataHandler()
784 add_assoc_str(parser->ctag, "value", decoded_value); in _xml_characterDataHandler()
792 ZEND_HASH_REVERSE_FOREACH_VAL(Z_ARRVAL(parser->data), curtag) { in _xml_characterDataHandler()
807 if (parser->level <= XML_MAXLEVEL && parser->level > 0 && (doprint || (! parser->skipwhite))) { in _xml_characterDataHandler()
809 _xml_add_to_info(parser,SKIP_TAGSTART(parser->ltags[parser->level-1])); in _xml_characterDataHandler()
810 add_assoc_string(&tag, "tag", SKIP_TAGSTART(parser->ltags[parser->level-1])); in _xml_characterDataHandler()
813 add_assoc_long(&tag, "level", parser->level); in _xml_characterDataHandler()
814 zend_hash_next_index_insert(Z_ARRVAL(parser->data), &tag); in _xml_characterDataHandler()
815 } else if (parser->level == (XML_MAXLEVEL + 1)) { in _xml_characterDataHandler()
827 xml_parser *parser = (xml_parser *)userData; in _xml_processingInstructionHandler() local
829 if (!parser || Z_ISUNDEF(parser->processingInstructionHandler)) { in _xml_processingInstructionHandler()
835 ZVAL_COPY(&args[0], &parser->index); in _xml_processingInstructionHandler()
836 _xml_xmlchar_zval(target, 0, parser->target_encoding, &args[1]); in _xml_processingInstructionHandler()
837 _xml_xmlchar_zval(data, 0, parser->target_encoding, &args[2]); in _xml_processingInstructionHandler()
838 …xml_call_handler(parser, &parser->processingInstructionHandler, parser->processingInstructionPtr, … in _xml_processingInstructionHandler()
846 xml_parser *parser = (xml_parser *)userData; in _xml_defaultHandler() local
848 if (!parser || Z_ISUNDEF(parser->defaultHandler)) { in _xml_defaultHandler()
854 ZVAL_COPY(&args[0], &parser->index); in _xml_defaultHandler()
855 _xml_xmlchar_zval(s, len, parser->target_encoding, &args[1]); in _xml_defaultHandler()
856 xml_call_handler(parser, &parser->defaultHandler, parser->defaultPtr, 2, args, &retval); in _xml_defaultHandler()
866 xml_parser *parser = (xml_parser *)userData; in _xml_unparsedEntityDeclHandler() local
868 if (!parser || Z_ISUNDEF(parser->unparsedEntityDeclHandler)) { in _xml_unparsedEntityDeclHandler()
874 ZVAL_COPY(&args[0], &parser->index); in _xml_unparsedEntityDeclHandler()
875 _xml_xmlchar_zval(entityName, 0, parser->target_encoding, &args[1]); in _xml_unparsedEntityDeclHandler()
876 _xml_xmlchar_zval(base, 0, parser->target_encoding, &args[2]); in _xml_unparsedEntityDeclHandler()
877 _xml_xmlchar_zval(systemId, 0, parser->target_encoding, &args[3]); in _xml_unparsedEntityDeclHandler()
878 _xml_xmlchar_zval(publicId, 0, parser->target_encoding, &args[4]); in _xml_unparsedEntityDeclHandler()
879 _xml_xmlchar_zval(notationName, 0, parser->target_encoding, &args[5]); in _xml_unparsedEntityDeclHandler()
880 …xml_call_handler(parser, &parser->unparsedEntityDeclHandler, parser->unparsedEntityDeclPtr, 6, arg… in _xml_unparsedEntityDeclHandler()
889 xml_parser *parser = (xml_parser *)userData; in _xml_notationDeclHandler() local
891 if (!parser || Z_ISUNDEF(parser->notationDeclHandler)) { in _xml_notationDeclHandler()
897 ZVAL_COPY(&args[0], &parser->index); in _xml_notationDeclHandler()
898 _xml_xmlchar_zval(notationName, 0, parser->target_encoding, &args[1]); in _xml_notationDeclHandler()
899 _xml_xmlchar_zval(base, 0, parser->target_encoding, &args[2]); in _xml_notationDeclHandler()
900 _xml_xmlchar_zval(systemId, 0, parser->target_encoding, &args[3]); in _xml_notationDeclHandler()
901 _xml_xmlchar_zval(publicId, 0, parser->target_encoding, &args[4]); in _xml_notationDeclHandler()
902 xml_call_handler(parser, &parser->notationDeclHandler, parser->notationDeclPtr, 5, args, &retval); in _xml_notationDeclHandler()
911 xml_parser *parser = XML_GetUserData(parserPtr); in _xml_externalEntityRefHandler() local
913 if (!parser || Z_ISUNDEF(parser->externalEntityRefHandler)) { in _xml_externalEntityRefHandler()
920 ZVAL_COPY(&args[0], &parser->index); in _xml_externalEntityRefHandler()
921 _xml_xmlchar_zval(openEntityNames, 0, parser->target_encoding, &args[1]); in _xml_externalEntityRefHandler()
922 _xml_xmlchar_zval(base, 0, parser->target_encoding, &args[2]); in _xml_externalEntityRefHandler()
923 _xml_xmlchar_zval(systemId, 0, parser->target_encoding, &args[3]); in _xml_externalEntityRefHandler()
924 _xml_xmlchar_zval(publicId, 0, parser->target_encoding, &args[4]); in _xml_externalEntityRefHandler()
925 …xml_call_handler(parser, &parser->externalEntityRefHandler, parser->externalEntityRefPtr, 5, args,… in _xml_externalEntityRefHandler()
940 xml_parser *parser = (xml_parser *)userData; in _xml_startNamespaceDeclHandler() local
942 if (!parser || Z_ISUNDEF(parser->startNamespaceDeclHandler)) { in _xml_startNamespaceDeclHandler()
948 ZVAL_COPY(&args[0], &parser->index); in _xml_startNamespaceDeclHandler()
949 _xml_xmlchar_zval(prefix, 0, parser->target_encoding, &args[1]); in _xml_startNamespaceDeclHandler()
950 _xml_xmlchar_zval(uri, 0, parser->target_encoding, &args[2]); in _xml_startNamespaceDeclHandler()
951 …xml_call_handler(parser, &parser->startNamespaceDeclHandler, parser->startNamespaceDeclPtr, 3, arg… in _xml_startNamespaceDeclHandler()
959 xml_parser *parser = (xml_parser *)userData; in _xml_endNamespaceDeclHandler() local
961 if (!parser || Z_ISUNDEF(parser->endNamespaceDeclHandler)) { in _xml_endNamespaceDeclHandler()
967 ZVAL_COPY(&args[0], &parser->index); in _xml_endNamespaceDeclHandler()
968 _xml_xmlchar_zval(prefix, 0, parser->target_encoding, &args[1]); in _xml_endNamespaceDeclHandler()
969 …xml_call_handler(parser, &parser->endNamespaceDeclHandler, parser->endNamespaceDeclPtr, 2, args, &… in _xml_endNamespaceDeclHandler()
978 xml_parser *parser; in php_xml_parser_create_impl() local
1018 parser = Z_XMLPARSER_P(return_value); in php_xml_parser_create_impl()
1019 parser->parser = XML_ParserCreate_MM((auto_detect ? NULL : encoding), in php_xml_parser_create_impl()
1022 parser->target_encoding = encoding; in php_xml_parser_create_impl()
1023 parser->case_folding = 1; in php_xml_parser_create_impl()
1024 parser->isparsing = 0; in php_xml_parser_create_impl()
1026 XML_SetUserData(parser->parser, parser); in php_xml_parser_create_impl()
1027 ZVAL_COPY_VALUE(&parser->index, return_value); in php_xml_parser_create_impl()
1048 xml_parser *parser; in PHP_FUNCTION() local
1055 parser = Z_XMLPARSER_P(pind); in PHP_FUNCTION()
1057 zval_ptr_dtor(&parser->object); in PHP_FUNCTION()
1058 ZVAL_OBJ_COPY(&parser->object, Z_OBJ_P(mythis)); in PHP_FUNCTION()
1067 xml_parser *parser; in PHP_FUNCTION() local
1074 parser = Z_XMLPARSER_P(pind); in PHP_FUNCTION()
1075 xml_set_handler(&parser->startElementHandler, shdl); in PHP_FUNCTION()
1076 xml_set_handler(&parser->endElementHandler, ehdl); in PHP_FUNCTION()
1077 XML_SetElementHandler(parser->parser, _xml_startElementHandler, _xml_endElementHandler); in PHP_FUNCTION()
1086 xml_parser *parser; in PHP_FUNCTION() local
1093 parser = Z_XMLPARSER_P(pind); in PHP_FUNCTION()
1094 xml_set_handler(&parser->characterDataHandler, hdl); in PHP_FUNCTION()
1095 XML_SetCharacterDataHandler(parser->parser, _xml_characterDataHandler); in PHP_FUNCTION()
1104 xml_parser *parser; in PHP_FUNCTION() local
1111 parser = Z_XMLPARSER_P(pind); in PHP_FUNCTION()
1112 xml_set_handler(&parser->processingInstructionHandler, hdl); in PHP_FUNCTION()
1113 XML_SetProcessingInstructionHandler(parser->parser, _xml_processingInstructionHandler); in PHP_FUNCTION()
1122 xml_parser *parser; in PHP_FUNCTION() local
1129 parser = Z_XMLPARSER_P(pind); in PHP_FUNCTION()
1130 xml_set_handler(&parser->defaultHandler, hdl); in PHP_FUNCTION()
1131 XML_SetDefaultHandler(parser->parser, _xml_defaultHandler); in PHP_FUNCTION()
1140 xml_parser *parser; in PHP_FUNCTION() local
1147 parser = Z_XMLPARSER_P(pind); in PHP_FUNCTION()
1148 xml_set_handler(&parser->unparsedEntityDeclHandler, hdl); in PHP_FUNCTION()
1149 XML_SetUnparsedEntityDeclHandler(parser->parser, _xml_unparsedEntityDeclHandler); in PHP_FUNCTION()
1158 xml_parser *parser; in PHP_FUNCTION() local
1165 parser = Z_XMLPARSER_P(pind); in PHP_FUNCTION()
1166 xml_set_handler(&parser->notationDeclHandler, hdl); in PHP_FUNCTION()
1167 XML_SetNotationDeclHandler(parser->parser, _xml_notationDeclHandler); in PHP_FUNCTION()
1176 xml_parser *parser; in PHP_FUNCTION() local
1183 parser = Z_XMLPARSER_P(pind); in PHP_FUNCTION()
1184 xml_set_handler(&parser->externalEntityRefHandler, hdl); in PHP_FUNCTION()
1185 XML_SetExternalEntityRefHandler(parser->parser, (void *) _xml_externalEntityRefHandler); in PHP_FUNCTION()
1194 xml_parser *parser; in PHP_FUNCTION() local
1201 parser = Z_XMLPARSER_P(pind); in PHP_FUNCTION()
1202 xml_set_handler(&parser->startNamespaceDeclHandler, hdl); in PHP_FUNCTION()
1203 XML_SetStartNamespaceDeclHandler(parser->parser, _xml_startNamespaceDeclHandler); in PHP_FUNCTION()
1212 xml_parser *parser; in PHP_FUNCTION() local
1219 parser = Z_XMLPARSER_P(pind); in PHP_FUNCTION()
1220 xml_set_handler(&parser->endNamespaceDeclHandler, hdl); in PHP_FUNCTION()
1221 XML_SetEndNamespaceDeclHandler(parser->parser, _xml_endNamespaceDeclHandler); in PHP_FUNCTION()
1230 xml_parser *parser; in PHP_FUNCTION() local
1241 parser = Z_XMLPARSER_P(pind); in PHP_FUNCTION()
1242 if (parser->isparsing) { in PHP_FUNCTION()
1246 parser->isparsing = 1; in PHP_FUNCTION()
1247 ret = XML_Parse(parser->parser, (XML_Char*)data, data_len, isFinal); in PHP_FUNCTION()
1248 parser->isparsing = 0; in PHP_FUNCTION()
1257 xml_parser *parser; in PHP_FUNCTION() local
1267 parser = Z_XMLPARSER_P(pind); in PHP_FUNCTION()
1269 if (parser->isparsing) { in PHP_FUNCTION()
1286 ZVAL_COPY_VALUE(&parser->data, xdata); in PHP_FUNCTION()
1289 ZVAL_COPY_VALUE(&parser->info, info); in PHP_FUNCTION()
1292 parser->level = 0; in PHP_FUNCTION()
1293 xml_parser_free_ltags(parser); in PHP_FUNCTION()
1294 parser->ltags = safe_emalloc(XML_MAXLEVEL, sizeof(char *), 0); in PHP_FUNCTION()
1295 memset(parser->ltags, 0, XML_MAXLEVEL * sizeof(char *)); in PHP_FUNCTION()
1297 XML_SetElementHandler(parser->parser, _xml_startElementHandler, _xml_endElementHandler); in PHP_FUNCTION()
1298 XML_SetCharacterDataHandler(parser->parser, _xml_characterDataHandler); in PHP_FUNCTION()
1300 parser->isparsing = 1; in PHP_FUNCTION()
1301 ret = XML_Parse(parser->parser, (XML_Char*)data, data_len, 1); in PHP_FUNCTION()
1302 parser->isparsing = 0; in PHP_FUNCTION()
1311 xml_parser *parser; in PHP_FUNCTION() local
1318 parser = Z_XMLPARSER_P(pind); in PHP_FUNCTION()
1319 RETURN_LONG((zend_long)XML_GetErrorCode(parser->parser)); in PHP_FUNCTION()
1343 xml_parser *parser; in PHP_FUNCTION() local
1350 parser = Z_XMLPARSER_P(pind); in PHP_FUNCTION()
1351 RETVAL_LONG(XML_GetCurrentLineNumber(parser->parser)); in PHP_FUNCTION()
1358 xml_parser *parser; in PHP_FUNCTION() local
1365 parser = Z_XMLPARSER_P(pind); in PHP_FUNCTION()
1366 RETVAL_LONG(XML_GetCurrentColumnNumber(parser->parser)); in PHP_FUNCTION()
1373 xml_parser *parser; in PHP_FUNCTION() local
1380 parser = Z_XMLPARSER_P(pind); in PHP_FUNCTION()
1381 RETVAL_LONG(XML_GetCurrentByteIndex(parser->parser)); in PHP_FUNCTION()
1389 xml_parser *parser; in PHP_FUNCTION() local
1395 parser = Z_XMLPARSER_P(pind); in PHP_FUNCTION()
1396 if (parser->isparsing == 1) { in PHP_FUNCTION()
1408 xml_parser *parser; in PHP_FUNCTION() local
1416 parser = Z_XMLPARSER_P(pind); in PHP_FUNCTION()
1419 parser->case_folding = zval_get_long(val); in PHP_FUNCTION()
1422 parser->toffset = zval_get_long(val); in PHP_FUNCTION()
1423 if (parser->toffset < 0) { in PHP_FUNCTION()
1425 parser->toffset = 0; in PHP_FUNCTION()
1431 parser->skipwhite = zval_get_long(val); in PHP_FUNCTION()
1445 parser->target_encoding = enc->name; in PHP_FUNCTION()
1461 xml_parser *parser; in PHP_FUNCTION() local
1469 parser = Z_XMLPARSER_P(pind); in PHP_FUNCTION()
1472 RETURN_LONG(parser->case_folding); in PHP_FUNCTION()
1475 RETURN_LONG(parser->toffset); in PHP_FUNCTION()
1478 RETURN_LONG(parser->skipwhite); in PHP_FUNCTION()
1481 RETURN_STRING((char *)parser->target_encoding); in PHP_FUNCTION()