diff --git a/hphp/test/zend/bad/ext-xml/bug26528.php b/hphp/test/zend/bad/ext-xml/bug26528.php new file mode 100644 index 000000000..ce05503dc --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/bug26528.php @@ -0,0 +1,7 @@ +"; + $parser = xml_parser_create(); + $res = xml_parse_into_struct($parser,$sample,$vals,$index); + xml_parser_free($parser); + var_dump($vals); +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/bug26528.php.expectf b/hphp/test/zend/bad/ext-xml/bug26528.php.expectf new file mode 100644 index 000000000..f4e3cb42b --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/bug26528.php.expectf @@ -0,0 +1,16 @@ +array(1) { + [0]=> + array(4) { + ["tag"]=> + string(4) "TEST" + ["type"]=> + string(8) "complete" + ["level"]=> + int(1) + ["attributes"]=> + array(1) { + ["ATTR"]=> + string(13) "angle at line %d, col %d (byte %d)\n", + xml_get_current_line_number($parser), + xml_get_current_column_number($parser), + xml_get_current_byte_index($parser)); +} + +function endElement($parser, $name) { + printf(" at line %d, col %d (byte %d)\n", + xml_get_current_line_number($parser), + xml_get_current_column_number($parser), + xml_get_current_byte_index($parser)); +} + +function characterData($parser, $data) { + // dummy +} + +foreach ($xmls as $desc => $xml) { + echo "$desc\n"; + $xml_parser = xml_parser_create(); + xml_set_element_handler($xml_parser, "startElement", "endElement"); + xml_set_character_data_handler($xml_parser, "characterData"); + if (!xml_parse($xml_parser, $xml, true)) + echo "Error: ".xml_error_string(xml_get_error_code($xml_parser))."\n"; + xml_parser_free($xml_parser); +} +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/bug26614_libxml.php.expectf b/hphp/test/zend/bad/ext-xml/bug26614_libxml.php.expectf new file mode 100644 index 000000000..552e6db17 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/bug26614_libxml.php.expectf @@ -0,0 +1,9 @@ +CDATA + at line 2, col %d (byte 9) + at line 9, col %d (byte 56) +Comment + at line 2, col %d (byte 9) + at line 9, col %d (byte 56) +Text + at line 2, col %d (byte 9) + at line 9, col %d (byte 56) \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/bug32001b.php b/hphp/test/zend/bad/ext-xml/bug32001b.php new file mode 100644 index 000000000..c1c8bfbe2 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/bug32001b.php @@ -0,0 +1,97 @@ +encoding = $enc; + $this->chunk_size = $chunk_size; + $this->bom = $bom; + $this->prologue = !$omit_prologue; + $this->tags = array(); + } + + function start_element($parser, $name, $attrs) { + $attrs = array_map('bin2hex', $attrs); + $this->tags[] = bin2hex($name).": ".implode(', ', $attrs); + } + + function end_element($parser, $name) { + } + + function run() { + $data = ''; + + if ($this->prologue) { + $canonical_name = preg_replace('/BE|LE/i', '', $this->encoding); + $data .= "\n"; + } + + $data .= << + <テスト:テスト2 テスト="テスト"> + <テスト:テスト3> + test! + + + +HERE; + + $data = iconv("UTF-8", $this->encoding, $data); + + $parser = xml_parser_create(NULL); + xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); + xml_set_element_handler($parser, "start_element", "end_element"); + xml_set_object($parser, $this); + + if ($this->chunk_size == 0) { + $success = @xml_parse($parser, $data, true); + } else { + for ($offset = 0; $offset < strlen($data); + $offset += $this->chunk_size) { + $success = @xml_parse($parser, substr($data, $offset, $this->chunk_size), false); + if (!$success) { + break; + } + } + if ($success) { + $success = @xml_parse($parser, "", true); + } + } + + echo "Encoding: $this->encoding\n"; + echo "XML Prologue: ".($this->prologue ? 'present': 'not present'), "\n"; + echo "Chunk size: ".($this->chunk_size ? "$this->chunk_size byte(s)\n": "all data at once\n"); + echo "BOM: ".($this->bom ? 'prepended': 'not prepended'), "\n"; + + if ($success) { + var_dump($this->tags); + } else { + echo "[Error] ", xml_error_string(xml_get_error_code($parser)), "\n"; + } + } +} +$suite = array( + new testcase("EUC-JP" , 0), + new testcase("EUC-JP" , 1), + new testcase("Shift_JIS", 0), + new testcase("Shift_JIS", 1), + new testcase("GB2312", 0), + new testcase("GB2312", 1), +); + +if (XML_SAX_IMPL == 'libxml') { + echo "libxml2 Version => " . LIBXML_DOTTED_VERSION. "\n"; +} else { + echo "libxml2 Version => NONE\n"; +} + +foreach ($suite as $testcase) { + $testcase->run(); +} + +// vim600: sts=4 sw=4 ts=4 encoding=UTF-8 +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/bug32001b.php.expectf b/hphp/test/zend/bad/ext-xml/bug32001b.php.expectf new file mode 100644 index 000000000..9d648c8e0 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/bug32001b.php.expectf @@ -0,0 +1,73 @@ +libxml2 Version => %s +Encoding: EUC-JP +XML Prologue: present +Chunk size: all data at once +BOM: not prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: EUC-JP +XML Prologue: present +Chunk size: 1 byte(s) +BOM: not prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: Shift_JIS +XML Prologue: present +Chunk size: all data at once +BOM: not prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: Shift_JIS +XML Prologue: present +Chunk size: 1 byte(s) +BOM: not prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: GB2312 +XML Prologue: present +Chunk size: all data at once +BOM: not prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: GB2312 +XML Prologue: present +Chunk size: 1 byte(s) +BOM: not prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/bug35447.php b/hphp/test/zend/bad/ext-xml/bug35447.php new file mode 100644 index 000000000..fb42ff183 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/bug35447.php @@ -0,0 +1,20 @@ + + + +]> +A bient&244;t +END_OF_XML; + +$parser = xml_parser_create_ns('UTF-8'); +xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0); +$result = xml_parse_into_struct($parser, $data, $vals, $index); +xml_parser_free($parser); +var_dump($vals); +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/bug35447.php.expectf b/hphp/test/zend/bad/ext-xml/bug35447.php.expectf new file mode 100644 index 000000000..bf3cbf0a9 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/bug35447.php.expectf @@ -0,0 +1,20 @@ +array(1) { + [0]=> + array(5) { + ["tag"]=> + string(8) "resource" + ["type"]=> + string(8) "complete" + ["level"]=> + int(1) + ["attributes"]=> + array(2) { + ["key"]=> + string(7) "rSeeYou" + ["type"]=> + string(7) "literal" + } + ["value"]=> + string(13) "A bient&244;t" + } +} \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/bug46699.php b/hphp/test/zend/bad/ext-xml/bug46699.php new file mode 100644 index 000000000..4bc420c49 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/bug46699.php @@ -0,0 +1,20 @@ + + 1 + 2 + +HERE; + +$parser = xml_parser_create_ns("ISO-8859-1","@"); +xml_set_default_handler($parser,'defaultfunc'); +xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0); +xml_parse($parser, $xml); +xml_parser_free($parser); +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/bug46699.php.expectf b/hphp/test/zend/bad/ext-xml/bug46699.php.expectf new file mode 100644 index 000000000..0bcdf9723 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/bug46699.php.expectf @@ -0,0 +1,4 @@ + + 1 + 2 + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/bug49687.php b/hphp/test/zend/bad/ext-xml/bug49687.php new file mode 100644 index 000000000..eb515f19f --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/bug49687.php @@ -0,0 +1,11 @@ + + + +867 + + +XML; + +$xml_parser = xml_parser_create(); +xml_parser_set_option($xml_parser, XML_OPTION_SKIP_TAGSTART, 4); +xml_parse_into_struct($xml_parser, $XML, $vals, $index); +echo 'Index array' . PHP_EOL; +print_r($index); +echo 'Vals array' . PHP_EOL; +print_r($vals); +xml_parser_free($xml_parser); + +function startElement($parser, $name, $attribs) { echo $name . PHP_EOL; } +function endElement($parser, $name) { echo $name . PHP_EOL; } +$xml_parser = xml_parser_create(); +xml_set_element_handler($xml_parser, 'startElement', 'endElement'); +xml_parser_set_option($xml_parser, XML_OPTION_SKIP_TAGSTART, 4); +xml_parse($xml_parser, $XML); +xml_parser_free($xml_parser); + +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/bug50576.php.expectf b/hphp/test/zend/bad/ext-xml/bug50576.php.expectf new file mode 100644 index 000000000..6c350bdbb --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/bug50576.php.expectf @@ -0,0 +1,96 @@ +Index array +Array +( + [LISTOFAWARDS] => Array + ( + [0] => 0 + [1] => 5 + [2] => 6 + ) + + [COUNT] => Array + ( + [0] => 1 + [1] => 3 + [2] => 4 + ) + + [TOTAL] => Array + ( + [0] => 2 + ) + +) +Vals array +Array +( + [0] => Array + ( + [tag] => LISTOFAWARDS + [type] => open + [level] => 1 + [attributes] => Array + ( + [XMLNS:NS1] => http://www.fpdsng.com/FPDS + ) + + [value] => + + ) + + [1] => Array + ( + [tag] => COUNT + [type] => open + [level] => 2 + [value] => + + ) + + [2] => Array + ( + [tag] => TOTAL + [type] => complete + [level] => 3 + [value] => 867 + ) + + [3] => Array + ( + [tag] => COUNT + [value] => + + [type] => cdata + [level] => 2 + ) + + [4] => Array + ( + [tag] => COUNT + [type] => close + [level] => 2 + ) + + [5] => Array + ( + [tag] => LISTOFAWARDS + [value] => + + [type] => cdata + [level] => 1 + ) + + [6] => Array + ( + [tag] => LISTOFAWARDS + [type] => close + [level] => 1 + ) + +) +LISTOFAWARDS +COUNT +TOTAL +TOTAL +COUNT +LISTOFAWARDS \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/bug62328.php b/hphp/test/zend/bad/ext-xml/bug62328.php new file mode 100644 index 000000000..551601d67 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/bug62328.php @@ -0,0 +1,11 @@ +'); + +var_dump((string) $xml); +var_dump($xml->__toString()); \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/bug62328.php.expectf b/hphp/test/zend/bad/ext-xml/bug62328.php.expectf new file mode 100644 index 000000000..d58a38b5d --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/bug62328.php.expectf @@ -0,0 +1,2 @@ +string(15) "stringification" +string(15) "stringification" \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/utf8_decode_variation1.php b/hphp/test/zend/bad/ext-xml/utf8_decode_variation1.php new file mode 100644 index 000000000..66272137b --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/utf8_decode_variation1.php @@ -0,0 +1,78 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // object data + new aClass(), + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for data + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( utf8_decode($value) ); +}; + +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/utf8_decode_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/utf8_decode_variation1.php.expectf new file mode 100644 index 000000000..b5fc0b3a1 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/utf8_decode_variation1.php.expectf @@ -0,0 +1,82 @@ +*** Testing utf8_decode() : usage variations *** + +Arg value 0 +string(1) "0" + +Arg value 1 +string(1) "1" + +Arg value 12345 +string(5) "12345" + +Arg value -2345 +string(5) "-2345" + +Arg value 10.5 +string(4) "10.5" + +Arg value -10.5 +string(5) "-10.5" + +Arg value 101234567000 +string(12) "101234567000" + +Arg value 1.07654321E-9 +string(13) "1.07654321E-9" + +Arg value 0.5 +string(3) "0.5" + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +string(0) "" + +Arg value +string(0) "" + +Arg value 1 +string(1) "1" + +Arg value +string(0) "" + +Arg value 1 +string(1) "1" + +Arg value +string(0) "" + +Arg value +string(0) "" + +Arg value +string(0) "" + +Arg value Some Ascii Data +string(15) "Some Ascii Data" + +Arg value +string(0) "" + +Arg value +string(0) "" +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/utf8_encode_variation1.php b/hphp/test/zend/bad/ext-xml/utf8_encode_variation1.php new file mode 100644 index 000000000..4d8683844 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/utf8_encode_variation1.php @@ -0,0 +1,78 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // object data + new aClass(), + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for data + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( utf8_encode($value) ); +}; + +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/utf8_encode_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/utf8_encode_variation1.php.expectf new file mode 100644 index 000000000..65843cd72 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/utf8_encode_variation1.php.expectf @@ -0,0 +1,82 @@ +*** Testing utf8_encode() : usage variations *** + +Arg value 0 +string(1) "0" + +Arg value 1 +string(1) "1" + +Arg value 12345 +string(5) "12345" + +Arg value -2345 +string(5) "-2345" + +Arg value 10.5 +string(4) "10.5" + +Arg value -10.5 +string(5) "-10.5" + +Arg value 101234567000 +string(12) "101234567000" + +Arg value 1.07654321E-9 +string(13) "1.07654321E-9" + +Arg value 0.5 +string(3) "0.5" + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +string(0) "" + +Arg value +string(0) "" + +Arg value 1 +string(1) "1" + +Arg value +string(0) "" + +Arg value 1 +string(1) "1" + +Arg value +string(0) "" + +Arg value +string(0) "" + +Arg value +string(0) "" + +Arg value Some Ascii Data +string(15) "Some Ascii Data" + +Arg value +string(0) "" + +Arg value +string(0) "" +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml001.php b/hphp/test/zend/bad/ext-xml/xml001.php new file mode 100644 index 000000000..103213af8 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml001.php @@ -0,0 +1,67 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml001.php.expectf b/hphp/test/zend/bad/ext-xml/xml001.php.expectf new file mode 100644 index 000000000..ed3ac0a09 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml001.php.expectf @@ -0,0 +1,21 @@ +{?[]}{?[ +]}{?[]}{?[ +]}{?[%incent;]}{?[ +]}{?[]]}{?[>]}{?[ +]}{ROOT ID="elem1"}{CDATA[ +]}{CDATA[ Plain text.]}{CDATA[ +]}{CDATA[ ]}{ELEM1}{CDATA[ +]}{CDATA[ ]}{?[]}{CDATA[ +]}{CDATA[ ]}{ELEM2}{CDATA[ +]}{CDATA[ ]}{?[]}{CDATA[ +]}{CDATA[ ]}{ELEM3}{CDATA[ +]}{CDATA[ ]}{ENTREF[&included-entity;]}{CDATA[ +]}{CDATA[ ]}{ELEM4}{CDATA[ +]}{CDATA[ ]}{PI[test,processing instruction ]}{CDATA[ +]}{CDATA[ ]}{/ELEM4}{CDATA[ +]}{CDATA[ ]}{/ELEM3}{CDATA[ +]}{CDATA[ ]}{/ELEM2}{CDATA[ +]}{CDATA[ ]}{/ELEM1}{CDATA[ +]}{/ROOT}{?[ +]}parse complete \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml002.php b/hphp/test/zend/bad/ext-xml/xml002.php new file mode 100644 index 000000000..069094622 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml002.php @@ -0,0 +1,68 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml002.php.expectf b/hphp/test/zend/bad/ext-xml/xml002.php.expectf new file mode 100644 index 000000000..ed3ac0a09 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml002.php.expectf @@ -0,0 +1,21 @@ +{?[]}{?[ +]}{?[]}{?[ +]}{?[%incent;]}{?[ +]}{?[]]}{?[>]}{?[ +]}{ROOT ID="elem1"}{CDATA[ +]}{CDATA[ Plain text.]}{CDATA[ +]}{CDATA[ ]}{ELEM1}{CDATA[ +]}{CDATA[ ]}{?[]}{CDATA[ +]}{CDATA[ ]}{ELEM2}{CDATA[ +]}{CDATA[ ]}{?[]}{CDATA[ +]}{CDATA[ ]}{ELEM3}{CDATA[ +]}{CDATA[ ]}{ENTREF[&included-entity;]}{CDATA[ +]}{CDATA[ ]}{ELEM4}{CDATA[ +]}{CDATA[ ]}{PI[test,processing instruction ]}{CDATA[ +]}{CDATA[ ]}{/ELEM4}{CDATA[ +]}{CDATA[ ]}{/ELEM3}{CDATA[ +]}{CDATA[ ]}{/ELEM2}{CDATA[ +]}{CDATA[ ]}{/ELEM1}{CDATA[ +]}{/ROOT}{?[ +]}parse complete \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml003.php b/hphp/test/zend/bad/ext-xml/xml003.php new file mode 100644 index 000000000..6153c0b57 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml003.php @@ -0,0 +1,66 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml003.php.expectf b/hphp/test/zend/bad/ext-xml/xml003.php.expectf new file mode 100644 index 000000000..ed3ac0a09 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml003.php.expectf @@ -0,0 +1,21 @@ +{?[]}{?[ +]}{?[]}{?[ +]}{?[%incent;]}{?[ +]}{?[]]}{?[>]}{?[ +]}{ROOT ID="elem1"}{CDATA[ +]}{CDATA[ Plain text.]}{CDATA[ +]}{CDATA[ ]}{ELEM1}{CDATA[ +]}{CDATA[ ]}{?[]}{CDATA[ +]}{CDATA[ ]}{ELEM2}{CDATA[ +]}{CDATA[ ]}{?[]}{CDATA[ +]}{CDATA[ ]}{ELEM3}{CDATA[ +]}{CDATA[ ]}{ENTREF[&included-entity;]}{CDATA[ +]}{CDATA[ ]}{ELEM4}{CDATA[ +]}{CDATA[ ]}{PI[test,processing instruction ]}{CDATA[ +]}{CDATA[ ]}{/ELEM4}{CDATA[ +]}{CDATA[ ]}{/ELEM3}{CDATA[ +]}{CDATA[ ]}{/ELEM2}{CDATA[ +]}{CDATA[ ]}{/ELEM1}{CDATA[ +]}{/ROOT}{?[ +]}parse complete \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml007.php b/hphp/test/zend/bad/ext-xml/xml007.php new file mode 100644 index 000000000..b4ac87261 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml007.php @@ -0,0 +1,17 @@ +<äöü üäß="Üäß">ÄÖÜ'; +$parser = xml_parser_create('ISO-8859-1'); +xml_set_element_handler($parser, "startHandler", "endHandler"); +xml_parse_into_struct($parser, $xmldata, $struct, $index); +var_dump($struct); +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml007.php.expectf b/hphp/test/zend/bad/ext-xml/xml007.php.expectf new file mode 100644 index 000000000..9fd1e0829 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml007.php.expectf @@ -0,0 +1,24 @@ +string(3) "ÄÖÜ" +array(1) { + ["ÜÄß"]=> + string(3) "Üäß" +} +string(3) "ÄÖÜ" +array(1) { + [0]=> + array(5) { + ["tag"]=> + string(3) "ÄÖÜ" + ["type"]=> + string(8) "complete" + ["level"]=> + int(1) + ["attributes"]=> + array(1) { + ["ÜÄß"]=> + string(3) "Üäß" + } + ["value"]=> + string(3) "ÄÖÜ" + } +} \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml010.php b/hphp/test/zend/bad/ext-xml/xml010.php new file mode 100644 index 000000000..fbf2f5e23 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml010.php @@ -0,0 +1,27 @@ + $value) { + print "$key = $value "; + } + print "\n"; +} +function end_elem() +{ +} + +$xml = << + + + +HERE; + +$parser = xml_parser_create_ns("ISO-8859-1","@"); +xml_set_element_handler($parser,'start_elem','end_elem'); +xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0); +xml_parse($parser, $xml); +xml_parser_free($parser); +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml010.php.expectf b/hphp/test/zend/bad/ext-xml/xml010.php.expectf new file mode 100644 index 000000000..7b8f7f754 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml010.php.expectf @@ -0,0 +1,3 @@ +http://example.com/foo@a +http://example.com/bar@b foo = bar +http://example.com/bar@c http://example.com/bar@nix = null foo = bar \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml011.php b/hphp/test/zend/bad/ext-xml/xml011.php new file mode 100644 index 000000000..8edb1750b --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml011.php @@ -0,0 +1,26 @@ +"; +} +function end_elem() +{ + echo ""; +} + +$xml = 'start This & that'; + +$parser = xml_parser_create(); +xml_parse_into_struct($parser, $xml, $vals, $index); +print_r($vals); +xml_parser_free($parser); + +echo "\nChange to empty end handler\n"; +$parser = xml_parser_create(); +xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0); +xml_set_element_handler($parser,'start_elem','end_elem'); +xml_set_element_handler($parser,'start_elem',NULL); +xml_parse($parser, $xml, TRUE); + +xml_parser_free($parser); +echo "\nDone\n"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml011.php.expectf b/hphp/test/zend/bad/ext-xml/xml011.php.expectf new file mode 100644 index 000000000..ba26bb39f --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml011.php.expectf @@ -0,0 +1,37 @@ +Array +( + [0] => Array + ( + [tag] => TEXT + [type] => open + [level] => 1 + [value] => start + ) + + [1] => Array + ( + [tag] => B + [type] => complete + [level] => 2 + ) + + [2] => Array + ( + [tag] => TEXT + [value] => This & that + [type] => cdata + [level] => 1 + ) + + [3] => Array + ( + [tag] => TEXT + [type] => close + [level] => 1 + ) + +) + +Change to empty end handler + +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_closures_001.php b/hphp/test/zend/bad/ext-xml/xml_closures_001.php new file mode 100644 index 000000000..dc523d956 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_closures_001.php @@ -0,0 +1,29 @@ +\n"; +}; + +$end_element = function ($xp, $elem) +{ + print "\n"; +}; + +$xp = xml_parser_create(); +xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, false); +xml_set_element_handler($xp, $start_element, $end_element); +$fp = fopen("xmltest.xml", "r"); +while ($data = fread($fp, 4096)) { + xml_parse($xp, $data, feof($fp)); +} +xml_parser_free($xp); + +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_closures_001.php.expectf b/hphp/test/zend/bad/ext-xml/xml_closures_001.php.expectf new file mode 100644 index 000000000..fbaec76f8 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_closures_001.php.expectf @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_error_string_variation1.php b/hphp/test/zend/bad/ext-xml/xml_error_string_variation1.php new file mode 100644 index 000000000..ab5d76abd --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_error_string_variation1.php @@ -0,0 +1,76 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for code + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_error_string($value) ); +}; + +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_error_string_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_error_string_variation1.php.expectf new file mode 100644 index 000000000..4532a9540 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_error_string_variation1.php.expectf @@ -0,0 +1,81 @@ +*** Testing xml_error_string() : usage variations *** + +Arg value 10.5 +string(22) "XML_ERR_CHARREF_AT_EOF" + +Arg value -10.5 +string(7) "Unknown" + +Arg value 101234567000 +string(7) "Unknown" + +Arg value 1.07654321E-9 +string(8) "No error" + +Arg value 0.5 +string(8) "No error" + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +string(8) "No error" + +Arg value +string(8) "No error" + +Arg value 1 +string(9) "No memory" + +Arg value +string(8) "No error" + +Arg value 1 +string(9) "No memory" + +Arg value +string(8) "No error" + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value +string(8) "No error" + +Arg value +string(8) "No error" +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_get_current_byte_index_variation1.php b/hphp/test/zend/bad/ext-xml/xml_get_current_byte_index_variation1.php new file mode 100644 index 000000000..8cf4af2b1 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_get_current_byte_index_variation1.php @@ -0,0 +1,87 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for parser + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_get_current_byte_index($value) ); +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_get_current_byte_index_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_get_current_byte_index_variation1.php.expectf new file mode 100644 index 000000000..ca65cd660 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_get_current_byte_index_variation1.php.expectf @@ -0,0 +1,114 @@ +*** Testing xml_get_current_byte_index() : usage variations *** + +Arg value 0 +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value 12345 +HipHop Warning: %a +NULL + +Arg value -2345 +HipHop Warning: %a +NULL + +Arg value 10.5 +HipHop Warning: %a +NULL + +Arg value -10.5 +HipHop Warning: %a +NULL + +Arg value 101234567000 +HipHop Warning: %a +NULL + +Arg value 1.07654321E-9 +HipHop Warning: %a +NULL + +Arg value 0.5 +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_get_current_column_number_variation1.php b/hphp/test/zend/bad/ext-xml/xml_get_current_column_number_variation1.php new file mode 100644 index 000000000..d4532891a --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_get_current_column_number_variation1.php @@ -0,0 +1,88 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for parser + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_get_current_column_number($value) ); +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_get_current_column_number_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_get_current_column_number_variation1.php.expectf new file mode 100644 index 000000000..1296b9030 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_get_current_column_number_variation1.php.expectf @@ -0,0 +1,114 @@ +*** Testing xml_get_current_column_number() : usage variations *** + +Arg value 0 +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value 12345 +HipHop Warning: %a +NULL + +Arg value -2345 +HipHop Warning: %a +NULL + +Arg value 10.5 +HipHop Warning: %a +NULL + +Arg value -10.5 +HipHop Warning: %a +NULL + +Arg value 101234567000 +HipHop Warning: %a +NULL + +Arg value 1.07654321E-9 +HipHop Warning: %a +NULL + +Arg value 0.5 +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_get_current_line_number_variation1.php b/hphp/test/zend/bad/ext-xml/xml_get_current_line_number_variation1.php new file mode 100644 index 000000000..ac7d5f3ee --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_get_current_line_number_variation1.php @@ -0,0 +1,87 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for parser + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_get_current_line_number($value) ); +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_get_current_line_number_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_get_current_line_number_variation1.php.expectf new file mode 100644 index 000000000..1a377bfcb --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_get_current_line_number_variation1.php.expectf @@ -0,0 +1,114 @@ +*** Testing xml_get_current_line_number() : usage variations *** + +Arg value 0 +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value 12345 +HipHop Warning: %a +NULL + +Arg value -2345 +HipHop Warning: %a +NULL + +Arg value 10.5 +HipHop Warning: %a +NULL + +Arg value -10.5 +HipHop Warning: %a +NULL + +Arg value 101234567000 +HipHop Warning: %a +NULL + +Arg value 1.07654321E-9 +HipHop Warning: %a +NULL + +Arg value 0.5 +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_get_error_code_variation1.php b/hphp/test/zend/bad/ext-xml/xml_get_error_code_variation1.php new file mode 100644 index 000000000..d22ffabfb --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_get_error_code_variation1.php @@ -0,0 +1,87 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for parser + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_get_error_code($value) ); +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_get_error_code_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_get_error_code_variation1.php.expectf new file mode 100644 index 000000000..9d308d06b --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_get_error_code_variation1.php.expectf @@ -0,0 +1,114 @@ +*** Testing xml_get_error_code() : usage variations *** + +Arg value 0 +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value 12345 +HipHop Warning: %a +NULL + +Arg value -2345 +HipHop Warning: %a +NULL + +Arg value 10.5 +HipHop Warning: %a +NULL + +Arg value -10.5 +HipHop Warning: %a +NULL + +Arg value 101234567000 +HipHop Warning: %a +NULL + +Arg value 1.07654321E-9 +HipHop Warning: %a +NULL + +Arg value 0.5 +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parse_into_struct_variation1.php b/hphp/test/zend/bad/ext-xml/xml_parse_into_struct_variation1.php new file mode 100644 index 000000000..e27e77e79 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parse_into_struct_variation1.php @@ -0,0 +1,88 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for parser + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_parse_into_struct($value, $data, $struct, $index) ); +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parse_into_struct_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_parse_into_struct_variation1.php.expectf new file mode 100644 index 000000000..66b7f5fd3 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parse_into_struct_variation1.php.expectf @@ -0,0 +1,114 @@ +*** Testing xml_parse_into_struct() : usage variations *** + +Arg value 0 +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value 12345 +HipHop Warning: %a +NULL + +Arg value -2345 +HipHop Warning: %a +NULL + +Arg value 10.5 +HipHop Warning: %a +NULL + +Arg value -10.5 +HipHop Warning: %a +NULL + +Arg value 101234567000 +HipHop Warning: %a +NULL + +Arg value 1.07654321E-9 +HipHop Warning: %a +NULL + +Arg value 0.5 +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parse_variation1.php b/hphp/test/zend/bad/ext-xml/xml_parse_variation1.php new file mode 100644 index 000000000..a3657e68d --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parse_variation1.php @@ -0,0 +1,89 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for parser + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_parse($value, $data, $isFinal) ); +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parse_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_parse_variation1.php.expectf new file mode 100644 index 000000000..25e4d3d18 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parse_variation1.php.expectf @@ -0,0 +1,114 @@ +*** Testing xml_parse() : usage variations *** + +Arg value 0 +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value 12345 +HipHop Warning: %a +NULL + +Arg value -2345 +HipHop Warning: %a +NULL + +Arg value 10.5 +HipHop Warning: %a +NULL + +Arg value -10.5 +HipHop Warning: %a +NULL + +Arg value 101234567000 +HipHop Warning: %a +NULL + +Arg value 1.07654321E-9 +HipHop Warning: %a +NULL + +Arg value 0.5 +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parser_create_error.php b/hphp/test/zend/bad/ext-xml/xml_parser_create_error.php new file mode 100644 index 000000000..ac4622925 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parser_create_error.php @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parser_create_error.php.expectf b/hphp/test/zend/bad/ext-xml/xml_parser_create_error.php.expectf new file mode 100644 index 000000000..8d3f239f0 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parser_create_error.php.expectf @@ -0,0 +1,6 @@ +*** Testing xml_parser_create() : error conditions *** + +-- Testing xml_parser_create() function with more than expected no. of arguments -- +HipHop Warning: %a +bool(false) +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parser_create_ns_error.php b/hphp/test/zend/bad/ext-xml/xml_parser_create_ns_error.php new file mode 100644 index 000000000..ecec2ce23 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parser_create_ns_error.php @@ -0,0 +1,19 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parser_create_ns_error.php.expectf b/hphp/test/zend/bad/ext-xml/xml_parser_create_ns_error.php.expectf new file mode 100644 index 000000000..bd6b7d9fe --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parser_create_ns_error.php.expectf @@ -0,0 +1,6 @@ +*** Testing xml_parser_create_ns() : error conditions *** + +-- Testing xml_parser_create_ns() function with more than expected no. of arguments -- +HipHop Warning: %a +bool(false) +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parser_create_ns_variation1.php b/hphp/test/zend/bad/ext-xml/xml_parser_create_ns_variation1.php new file mode 100644 index 000000000..5e514f42c --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parser_create_ns_variation1.php @@ -0,0 +1,95 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + "ISO-8859-1", + "UTF-8", + "US-ASCII", + "UTF-32", + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for encoding + +foreach($values as $value) { + echo @"\nArg value $value \n"; + $res = xml_parser_create_ns($value); + var_dump($res); + if ($res !== false) { + xml_parser_free($res); + } +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parser_create_ns_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_parser_create_ns_variation1.php.expectf new file mode 100644 index 000000000..410f3b2c5 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parser_create_ns_variation1.php.expectf @@ -0,0 +1,119 @@ +*** Testing xml_parser_create_ns() : usage variations *** + +Arg value 0 +HipHop Warning: %a +bool(false) + +Arg value 1 +HipHop Warning: %a +bool(false) + +Arg value 12345 +HipHop Warning: %a +bool(false) + +Arg value -2345 +HipHop Warning: %a +bool(false) + +Arg value 10.5 +HipHop Warning: %a +bool(false) + +Arg value -10.5 +HipHop Warning: %a +bool(false) + +Arg value 101234567000 +HipHop Warning: %a +bool(false) + +Arg value 1.07654321E-9 +HipHop Warning: %a +bool(false) + +Arg value 0.5 +HipHop Warning: %a +bool(false) + +Arg value Array +HipHop Warning: %a +bool(false) + +Arg value Array +HipHop Warning: %a +bool(false) + +Arg value Array +HipHop Warning: %a +bool(false) + +Arg value Array +HipHop Warning: %a +bool(false) + +Arg value Array +HipHop Warning: %a +bool(false) + +Arg value +resource(%d) of type (xml) + +Arg value +resource(%d) of type (xml) + +Arg value 1 +HipHop Warning: %a +bool(false) + +Arg value +resource(%d) of type (xml) + +Arg value 1 +HipHop Warning: %a +bool(false) + +Arg value +resource(%d) of type (xml) + +Arg value +resource(%d) of type (xml) + +Arg value +resource(%d) of type (xml) + +Arg value string +HipHop Warning: %a +bool(false) + +Arg value string +HipHop Warning: %a +bool(false) + +Arg value ISO-8859-1 +resource(%d) of type (xml) + +Arg value UTF-8 +resource(%d) of type (xml) + +Arg value US-ASCII +resource(%d) of type (xml) + +Arg value UTF-32 +HipHop Warning: %a +bool(false) + +Arg value Some Ascii Data +HipHop Warning: %a +bool(false) + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +resource(%d) of type (xml) + +Arg value +resource(%d) of type (xml) +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parser_create_variation1.php b/hphp/test/zend/bad/ext-xml/xml_parser_create_variation1.php new file mode 100644 index 000000000..50f4cb050 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parser_create_variation1.php @@ -0,0 +1,95 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + "ISO-8859-1", + "UTF-8", + "US-ASCII", + "UTF-32", + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for encoding + +foreach($values as $value) { + echo @"\nArg value $value \n"; + $res = xml_parser_create($value); + var_dump($res); + if ($res !== false) { + xml_parser_free($res); + } +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parser_create_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_parser_create_variation1.php.expectf new file mode 100644 index 000000000..207b50660 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parser_create_variation1.php.expectf @@ -0,0 +1,119 @@ +*** Testing xml_parser_create() : usage variations *** + +Arg value 0 +HipHop Warning: %a +bool(false) + +Arg value 1 +HipHop Warning: %a +bool(false) + +Arg value 12345 +HipHop Warning: %a +bool(false) + +Arg value -2345 +HipHop Warning: %a +bool(false) + +Arg value 10.5 +HipHop Warning: %a +bool(false) + +Arg value -10.5 +HipHop Warning: %a +bool(false) + +Arg value 101234567000 +HipHop Warning: %a +bool(false) + +Arg value 1.07654321E-9 +HipHop Warning: %a +bool(false) + +Arg value 0.5 +HipHop Warning: %a +bool(false) + +Arg value Array +HipHop Warning: %a +bool(false) + +Arg value Array +HipHop Warning: %a +bool(false) + +Arg value Array +HipHop Warning: %a +bool(false) + +Arg value Array +HipHop Warning: %a +bool(false) + +Arg value Array +HipHop Warning: %a +bool(false) + +Arg value +resource(%d) of type (xml) + +Arg value +resource(%d) of type (xml) + +Arg value 1 +HipHop Warning: %a +bool(false) + +Arg value +resource(%d) of type (xml) + +Arg value 1 +HipHop Warning: %a +bool(false) + +Arg value +resource(%d) of type (xml) + +Arg value +resource(%d) of type (xml) + +Arg value +resource(%d) of type (xml) + +Arg value string +HipHop Warning: %a +bool(false) + +Arg value string +HipHop Warning: %a +bool(false) + +Arg value ISO-8859-1 +resource(%d) of type (xml) + +Arg value UTF-8 +resource(%d) of type (xml) + +Arg value US-ASCII +resource(%d) of type (xml) + +Arg value UTF-32 +HipHop Warning: %a +bool(false) + +Arg value Some Ascii Data +HipHop Warning: %a +bool(false) + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +resource(%d) of type (xml) + +Arg value +resource(%d) of type (xml) +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parser_free_variation1.php b/hphp/test/zend/bad/ext-xml/xml_parser_free_variation1.php new file mode 100644 index 000000000..5366ea775 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parser_free_variation1.php @@ -0,0 +1,87 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for parser + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_parser_free($value) ); +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parser_free_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_parser_free_variation1.php.expectf new file mode 100644 index 000000000..55e3fc184 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parser_free_variation1.php.expectf @@ -0,0 +1,114 @@ +*** Testing xml_parser_free() : usage variations *** + +Arg value 0 +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value 12345 +HipHop Warning: %a +NULL + +Arg value -2345 +HipHop Warning: %a +NULL + +Arg value 10.5 +HipHop Warning: %a +NULL + +Arg value -10.5 +HipHop Warning: %a +NULL + +Arg value 101234567000 +HipHop Warning: %a +NULL + +Arg value 1.07654321E-9 +HipHop Warning: %a +NULL + +Arg value 0.5 +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parser_get_option_variation1.php b/hphp/test/zend/bad/ext-xml/xml_parser_get_option_variation1.php new file mode 100644 index 000000000..642623fe5 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parser_get_option_variation1.php @@ -0,0 +1,88 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for parser + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_parser_get_option($value, $option) ); +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parser_get_option_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_parser_get_option_variation1.php.expectf new file mode 100644 index 000000000..a65b0aa0b --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parser_get_option_variation1.php.expectf @@ -0,0 +1,114 @@ +*** Testing xml_parser_get_option() : usage variations *** + +Arg value 0 +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value 12345 +HipHop Warning: %a +NULL + +Arg value -2345 +HipHop Warning: %a +NULL + +Arg value 10.5 +HipHop Warning: %a +NULL + +Arg value -10.5 +HipHop Warning: %a +NULL + +Arg value 101234567000 +HipHop Warning: %a +NULL + +Arg value 1.07654321E-9 +HipHop Warning: %a +NULL + +Arg value 0.5 +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parser_get_option_variation2.php b/hphp/test/zend/bad/ext-xml/xml_parser_get_option_variation2.php new file mode 100644 index 000000000..c5b646e34 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parser_get_option_variation2.php @@ -0,0 +1,87 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for option + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_parser_get_option($parser, $value) ); +}; + +fclose($fp); +xml_parser_free($parser); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parser_get_option_variation2.php.expectf b/hphp/test/zend/bad/ext-xml/xml_parser_get_option_variation2.php.expectf new file mode 100644 index 000000000..6642b86b0 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parser_get_option_variation2.php.expectf @@ -0,0 +1,104 @@ +*** Testing xml_parser_get_option() : usage variations *** + +Arg value 12345 +HipHop Warning: %a +bool(false) + +Arg value -2345 +HipHop Warning: %a +bool(false) + +Arg value 10.5 +HipHop Warning: %a +bool(false) + +Arg value -10.5 +HipHop Warning: %a +bool(false) + +Arg value 101234567000 +HipHop Warning: %a +bool(false) + +Arg value 1.07654321E-9 +HipHop Warning: %a +bool(false) + +Arg value 0.5 +HipHop Warning: %a +bool(false) + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +bool(false) + +Arg value 1 +int(1) + +Arg value +HipHop Warning: %a +bool(false) + +Arg value 1 +int(1) + +Arg value +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +bool(false) +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parser_set_option_variation1.php b/hphp/test/zend/bad/ext-xml/xml_parser_set_option_variation1.php new file mode 100644 index 000000000..d96577d79 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parser_set_option_variation1.php @@ -0,0 +1,88 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for parser + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_parser_set_option($value, $option, 1) ); +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parser_set_option_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_parser_set_option_variation1.php.expectf new file mode 100644 index 000000000..1bfc87737 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parser_set_option_variation1.php.expectf @@ -0,0 +1,114 @@ +*** Testing xml_parser_set_option() : usage variations *** + +Arg value 0 +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value 12345 +HipHop Warning: %a +NULL + +Arg value -2345 +HipHop Warning: %a +NULL + +Arg value 10.5 +HipHop Warning: %a +NULL + +Arg value -10.5 +HipHop Warning: %a +NULL + +Arg value 101234567000 +HipHop Warning: %a +NULL + +Arg value 1.07654321E-9 +HipHop Warning: %a +NULL + +Arg value 0.5 +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parser_set_option_variation2.php b/hphp/test/zend/bad/ext-xml/xml_parser_set_option_variation2.php new file mode 100644 index 000000000..858378458 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parser_set_option_variation2.php @@ -0,0 +1,81 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for option + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_parser_set_option($parser, $value, 1) ); +}; + +xml_parser_free($parser); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_parser_set_option_variation2.php.expectf b/hphp/test/zend/bad/ext-xml/xml_parser_set_option_variation2.php.expectf new file mode 100644 index 000000000..86150039a --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_parser_set_option_variation2.php.expectf @@ -0,0 +1,100 @@ +*** Testing xml_parser_set_option() : usage variations *** + +Arg value 12345 +HipHop Warning: %a +bool(false) + +Arg value -2345 +HipHop Warning: %a +bool(false) + +Arg value 10.5 +HipHop Warning: %a +bool(false) + +Arg value -10.5 +HipHop Warning: %a +bool(false) + +Arg value 101234567000 +HipHop Warning: %a +bool(false) + +Arg value 1.07654321E-9 +HipHop Warning: %a +bool(false) + +Arg value 0.5 +HipHop Warning: %a +bool(false) + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +bool(false) + +Arg value 1 +bool(true) + +Arg value +HipHop Warning: %a +bool(false) + +Arg value 1 +bool(true) + +Arg value +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +bool(false) +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_character_data_handler_variation1.php b/hphp/test/zend/bad/ext-xml/xml_set_character_data_handler_variation1.php new file mode 100644 index 000000000..a23e9ec0c --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_character_data_handler_variation1.php @@ -0,0 +1,92 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for parser + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_set_character_data_handler($value, $hdl) ); +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_character_data_handler_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_set_character_data_handler_variation1.php.expectf new file mode 100644 index 000000000..f0b531738 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_character_data_handler_variation1.php.expectf @@ -0,0 +1,114 @@ +*** Testing xml_set_character_data_handler() : usage variations *** + +Arg value 0 +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value 12345 +HipHop Warning: %a +NULL + +Arg value -2345 +HipHop Warning: %a +NULL + +Arg value 10.5 +HipHop Warning: %a +NULL + +Arg value -10.5 +HipHop Warning: %a +NULL + +Arg value 101234567000 +HipHop Warning: %a +NULL + +Arg value 1.07654321E-9 +HipHop Warning: %a +NULL + +Arg value 0.5 +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_default_handler_variation1.php b/hphp/test/zend/bad/ext-xml/xml_set_default_handler_variation1.php new file mode 100644 index 000000000..ec5c43841 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_default_handler_variation1.php @@ -0,0 +1,92 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for parser + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_set_default_handler($value, $hdl) ); +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_default_handler_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_set_default_handler_variation1.php.expectf new file mode 100644 index 000000000..f5da68638 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_default_handler_variation1.php.expectf @@ -0,0 +1,114 @@ +*** Testing xml_set_default_handler() : usage variations *** + +Arg value 0 +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value 12345 +HipHop Warning: %a +NULL + +Arg value -2345 +HipHop Warning: %a +NULL + +Arg value 10.5 +HipHop Warning: %a +NULL + +Arg value -10.5 +HipHop Warning: %a +NULL + +Arg value 101234567000 +HipHop Warning: %a +NULL + +Arg value 1.07654321E-9 +HipHop Warning: %a +NULL + +Arg value 0.5 +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_element_handler_variation1.php b/hphp/test/zend/bad/ext-xml/xml_set_element_handler_variation1.php new file mode 100644 index 000000000..030140dde --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_element_handler_variation1.php @@ -0,0 +1,92 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for parser + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_set_element_handler($value, $hdl, $hdl) ); +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_element_handler_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_set_element_handler_variation1.php.expectf new file mode 100644 index 000000000..8e01430d5 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_element_handler_variation1.php.expectf @@ -0,0 +1,114 @@ +*** Testing xml_set_element_handler() : usage variations *** + +Arg value 0 +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value 12345 +HipHop Warning: %a +NULL + +Arg value -2345 +HipHop Warning: %a +NULL + +Arg value 10.5 +HipHop Warning: %a +NULL + +Arg value -10.5 +HipHop Warning: %a +NULL + +Arg value 101234567000 +HipHop Warning: %a +NULL + +Arg value 1.07654321E-9 +HipHop Warning: %a +NULL + +Arg value 0.5 +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_end_namespace_decl_handler_variation1.php b/hphp/test/zend/bad/ext-xml/xml_set_end_namespace_decl_handler_variation1.php new file mode 100644 index 000000000..d64d9a5c6 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_end_namespace_decl_handler_variation1.php @@ -0,0 +1,92 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for parser + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_set_end_namespace_decl_handler($value, $hdl) ); +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_end_namespace_decl_handler_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_set_end_namespace_decl_handler_variation1.php.expectf new file mode 100644 index 000000000..a64aeead0 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_end_namespace_decl_handler_variation1.php.expectf @@ -0,0 +1,114 @@ +*** Testing xml_set_end_namespace_decl_handler() : usage variations *** + +Arg value 0 +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value 12345 +HipHop Warning: %a +NULL + +Arg value -2345 +HipHop Warning: %a +NULL + +Arg value 10.5 +HipHop Warning: %a +NULL + +Arg value -10.5 +HipHop Warning: %a +NULL + +Arg value 101234567000 +HipHop Warning: %a +NULL + +Arg value 1.07654321E-9 +HipHop Warning: %a +NULL + +Arg value 0.5 +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_external_entity_ref_handler_variation1.php b/hphp/test/zend/bad/ext-xml/xml_set_external_entity_ref_handler_variation1.php new file mode 100644 index 000000000..ff2c48747 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_external_entity_ref_handler_variation1.php @@ -0,0 +1,92 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for parser + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_set_external_entity_ref_handler($value, $hdl) ); +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_external_entity_ref_handler_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_set_external_entity_ref_handler_variation1.php.expectf new file mode 100644 index 000000000..ff35f8de6 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_external_entity_ref_handler_variation1.php.expectf @@ -0,0 +1,114 @@ +*** Testing xml_set_external_entity_ref_handler() : usage variations *** + +Arg value 0 +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value 12345 +HipHop Warning: %a +NULL + +Arg value -2345 +HipHop Warning: %a +NULL + +Arg value 10.5 +HipHop Warning: %a +NULL + +Arg value -10.5 +HipHop Warning: %a +NULL + +Arg value 101234567000 +HipHop Warning: %a +NULL + +Arg value 1.07654321E-9 +HipHop Warning: %a +NULL + +Arg value 0.5 +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_notation_decl_handler_variation1.php b/hphp/test/zend/bad/ext-xml/xml_set_notation_decl_handler_variation1.php new file mode 100644 index 000000000..305538395 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_notation_decl_handler_variation1.php @@ -0,0 +1,92 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for parser + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_set_notation_decl_handler($value, $hdl) ); +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_notation_decl_handler_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_set_notation_decl_handler_variation1.php.expectf new file mode 100644 index 000000000..9e9a35743 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_notation_decl_handler_variation1.php.expectf @@ -0,0 +1,114 @@ +*** Testing xml_set_notation_decl_handler() : usage variations *** + +Arg value 0 +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value 12345 +HipHop Warning: %a +NULL + +Arg value -2345 +HipHop Warning: %a +NULL + +Arg value 10.5 +HipHop Warning: %a +NULL + +Arg value -10.5 +HipHop Warning: %a +NULL + +Arg value 101234567000 +HipHop Warning: %a +NULL + +Arg value 1.07654321E-9 +HipHop Warning: %a +NULL + +Arg value 0.5 +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_object_variation1.php b/hphp/test/zend/bad/ext-xml/xml_set_object_variation1.php new file mode 100644 index 000000000..3d1de8b2f --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_object_variation1.php @@ -0,0 +1,88 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for parser + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_set_object($value, $obj) ); +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_object_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_set_object_variation1.php.expectf new file mode 100644 index 000000000..3e8ed34bc --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_object_variation1.php.expectf @@ -0,0 +1,114 @@ +*** Testing xml_set_object() : usage variations *** + +Arg value 0 +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value 12345 +HipHop Warning: %a +NULL + +Arg value -2345 +HipHop Warning: %a +NULL + +Arg value 10.5 +HipHop Warning: %a +NULL + +Arg value -10.5 +HipHop Warning: %a +NULL + +Arg value 101234567000 +HipHop Warning: %a +NULL + +Arg value 1.07654321E-9 +HipHop Warning: %a +NULL + +Arg value 0.5 +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_object_variation2.php b/hphp/test/zend/bad/ext-xml/xml_set_object_variation2.php new file mode 100644 index 000000000..207575c6e --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_object_variation2.php @@ -0,0 +1,82 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for obj + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_set_object($parser, $value) ); +}; + +xml_parser_free($parser); +fclose($fp); + +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_object_variation2.php.expectf b/hphp/test/zend/bad/ext-xml/xml_set_object_variation2.php.expectf new file mode 100644 index 000000000..daedb7af0 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_object_variation2.php.expectf @@ -0,0 +1,110 @@ +*** Testing xml_set_object() : usage variations *** + +Arg value 0 +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value 12345 +HipHop Warning: %a +NULL + +Arg value -2345 +HipHop Warning: %a +NULL + +Arg value 10.5 +HipHop Warning: %a +NULL + +Arg value -10.5 +HipHop Warning: %a +NULL + +Arg value 101234567000 +HipHop Warning: %a +NULL + +Arg value 1.07654321E-9 +HipHop Warning: %a +NULL + +Arg value 0.5 +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_processing_instruction_handler_variation1.php b/hphp/test/zend/bad/ext-xml/xml_set_processing_instruction_handler_variation1.php new file mode 100644 index 000000000..e9e82f587 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_processing_instruction_handler_variation1.php @@ -0,0 +1,92 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for parser + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_set_processing_instruction_handler($value, $hdl) ); +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_processing_instruction_handler_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_set_processing_instruction_handler_variation1.php.expectf new file mode 100644 index 000000000..9cc295001 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_processing_instruction_handler_variation1.php.expectf @@ -0,0 +1,114 @@ +*** Testing xml_set_processing_instruction_handler() : usage variations *** + +Arg value 0 +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value 12345 +HipHop Warning: %a +NULL + +Arg value -2345 +HipHop Warning: %a +NULL + +Arg value 10.5 +HipHop Warning: %a +NULL + +Arg value -10.5 +HipHop Warning: %a +NULL + +Arg value 101234567000 +HipHop Warning: %a +NULL + +Arg value 1.07654321E-9 +HipHop Warning: %a +NULL + +Arg value 0.5 +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_start_namespace_decl_handler_basic.php b/hphp/test/zend/bad/ext-xml/xml_set_start_namespace_decl_handler_basic.php new file mode 100644 index 000000000..7e31c4b94 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_start_namespace_decl_handler_basic.php @@ -0,0 +1,41 @@ + +Any old text. +An HTML table cell. + +HERE; + +$parser = xml_parser_create_ns(); +xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); + +var_dump(xml_set_start_namespace_decl_handler( $parser, "Namespace_Start_Handler" )); +var_dump(xml_set_end_namespace_decl_handler( $parser, "Namespace_End_Handler" )); + +xml_parse( $parser, $xml, true); +xml_parser_free( $parser ); + +echo "Done\n"; + +function Namespace_Start_Handler( $parser, $prefix, $uri ) { + echo "Namespace_Start_Handler called\n"; + echo "...Prefix: ". $prefix . "\n"; + echo "...Uri: ". $uri . "\n"; +} + +function Namespace_End_Handler($parser, $prefix) { + echo "Namespace_End_Handler called\n"; + echo "...Prefix: ". $prefix . "\n\n"; +} + +function DefaultHandler( $parser, $data ) { + print( 'DefaultHandler Called
' ); +} +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_start_namespace_decl_handler_basic.php.expectf b/hphp/test/zend/bad/ext-xml/xml_set_start_namespace_decl_handler_basic.php.expectf new file mode 100644 index 000000000..83fb1b91b --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_start_namespace_decl_handler_basic.php.expectf @@ -0,0 +1,9 @@ +bool(true) +bool(true) +Namespace_Start_Handler called +...Prefix: aw1 +...Uri: http://www.somewhere.com/namespace1 +Namespace_Start_Handler called +...Prefix: aw2 +...Uri: file:/DTD/somewhere.dtd +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_start_namespace_decl_handler_variation1.php b/hphp/test/zend/bad/ext-xml/xml_set_start_namespace_decl_handler_variation1.php new file mode 100644 index 000000000..a2c7fd058 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_start_namespace_decl_handler_variation1.php @@ -0,0 +1,92 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for parser + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_set_start_namespace_decl_handler($value, $hdl) ); +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_start_namespace_decl_handler_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_set_start_namespace_decl_handler_variation1.php.expectf new file mode 100644 index 000000000..15aad3c70 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_start_namespace_decl_handler_variation1.php.expectf @@ -0,0 +1,114 @@ +*** Testing xml_set_start_namespace_decl_handler() : usage variations *** + +Arg value 0 +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value 12345 +HipHop Warning: %a +NULL + +Arg value -2345 +HipHop Warning: %a +NULL + +Arg value 10.5 +HipHop Warning: %a +NULL + +Arg value -10.5 +HipHop Warning: %a +NULL + +Arg value 101234567000 +HipHop Warning: %a +NULL + +Arg value 1.07654321E-9 +HipHop Warning: %a +NULL + +Arg value 0.5 +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_unparsed_entity_decl_handler_variation1.php b/hphp/test/zend/bad/ext-xml/xml_set_unparsed_entity_decl_handler_variation1.php new file mode 100644 index 000000000..444991158 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_unparsed_entity_decl_handler_variation1.php @@ -0,0 +1,92 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for parser + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_set_unparsed_entity_decl_handler($value, $hdl) ); +}; + +fclose($fp); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-xml/xml_set_unparsed_entity_decl_handler_variation1.php.expectf b/hphp/test/zend/bad/ext-xml/xml_set_unparsed_entity_decl_handler_variation1.php.expectf new file mode 100644 index 000000000..51ca63d58 --- /dev/null +++ b/hphp/test/zend/bad/ext-xml/xml_set_unparsed_entity_decl_handler_variation1.php.expectf @@ -0,0 +1,114 @@ +*** Testing xml_set_unparsed_entity_decl_handler() : usage variations *** + +Arg value 0 +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value 12345 +HipHop Warning: %a +NULL + +Arg value -2345 +HipHop Warning: %a +NULL + +Arg value 10.5 +HipHop Warning: %a +NULL + +Arg value -10.5 +HipHop Warning: %a +NULL + +Arg value 101234567000 +HipHop Warning: %a +NULL + +Arg value 1.07654321E-9 +HipHop Warning: %a +NULL + +Arg value 0.5 +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value Array +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value 1 +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value string +HipHop Warning: %a +NULL + +Arg value Some Ascii Data +HipHop Warning: %a +NULL + +Arg value Resource id %s +HipHop Warning: %a +bool(false) + +Arg value +HipHop Warning: %a +NULL + +Arg value +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/bug25666.php b/hphp/test/zend/good/ext-xml/bug25666.php new file mode 100644 index 000000000..66aa82153 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/bug25666.php @@ -0,0 +1,23 @@ + + + + +HERE; + +$parser = xml_parser_create_ns("ISO-8859-1","@"); +xml_set_element_handler($parser,'start_elem','end_elem'); +xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0); +xml_parse($parser, $xml); +xml_parser_free($parser); +?> \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/bug25666.php.expectf b/hphp/test/zend/good/ext-xml/bug25666.php.expectf new file mode 100644 index 000000000..fcef477a2 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/bug25666.php.expectf @@ -0,0 +1,3 @@ +string(24) "http://example.com/foo@a" +string(24) "http://example.com/bar@b" +string(24) "http://example.com/baz@c" \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/bug26614.php b/hphp/test/zend/good/ext-xml/bug26614.php new file mode 100644 index 000000000..8a322fe0a --- /dev/null +++ b/hphp/test/zend/good/ext-xml/bug26614.php @@ -0,0 +1,75 @@ + + + +'; + +// Case 2: replace some characters so that we get comments instead +$xmls["Comment"] =' + + +'; + +// Case 3: replace even more characters so that only textual data is left +$xmls["Text"] =' + +-!-- ATA[ +multi +line +CDATA +block +--- +'; + +function startElement($parser, $name, $attrs) { + printf("<$name> at line %d, col %d (byte %d)\n", + xml_get_current_line_number($parser), + xml_get_current_column_number($parser), + xml_get_current_byte_index($parser)); +} + +function endElement($parser, $name) { + printf(" at line %d, col %d (byte %d)\n", + xml_get_current_line_number($parser), + xml_get_current_column_number($parser), + xml_get_current_byte_index($parser)); +} + +function characterData($parser, $data) { + // dummy +} + +foreach ($xmls as $desc => $xml) { + echo "$desc\n"; + $xml_parser = xml_parser_create(); + xml_set_element_handler($xml_parser, "startElement", "endElement"); + xml_set_character_data_handler($xml_parser, "characterData"); + if (!xml_parse($xml_parser, $xml, true)) + echo "Error: ".xml_error_string(xml_get_error_code($xml_parser))."\n"; + xml_parser_free($xml_parser); +} +?> \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/bug26614.php.expectf b/hphp/test/zend/good/ext-xml/bug26614.php.expectf new file mode 100644 index 000000000..af657e007 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/bug26614.php.expectf @@ -0,0 +1,9 @@ +CDATA + at line 2, col 0 (byte 45) + at line 9, col 0 (byte 90) +Comment + at line 2, col 0 (byte 45) + at line 9, col 0 (byte 90) +Text + at line 2, col 0 (byte 45) + at line 9, col 0 (byte 90) \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/bug27908.php b/hphp/test/zend/good/ext-xml/bug27908.php new file mode 100644 index 000000000..b785a4993 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/bug27908.php @@ -0,0 +1,12 @@ +',TRUE); +xml_parser_free($xp); +echo "Done\n"; +?> \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/bug27908.php.expectf b/hphp/test/zend/good/ext-xml/bug27908.php.expectf new file mode 100644 index 000000000..2cd3d1eb7 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/bug27908.php.expectf @@ -0,0 +1,3 @@ +x_default_handler +x_default_handler +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/bug30266.php b/hphp/test/zend/good/ext-xml/bug30266.php new file mode 100644 index 000000000..71b665711 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/bug30266.php @@ -0,0 +1,43 @@ +dummy = "b"; + throw new Exception("ex"); + } + + function endHandler($XmlParser, $tag) + { + } +} + +$p1 = new Xml_Parser(); +try { + $p1->parse(''); +} catch (Exception $e) { + echo "OK\n"; +} +?> \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/bug30266.php.expectf b/hphp/test/zend/good/ext-xml/bug30266.php.expectf new file mode 100644 index 000000000..a0aba9318 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/bug30266.php.expectf @@ -0,0 +1 @@ +OK \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/bug32001.php b/hphp/test/zend/good/ext-xml/bug32001.php new file mode 100644 index 000000000..047d07d83 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/bug32001.php @@ -0,0 +1,156 @@ +encoding = $enc; + $this->chunk_size = $chunk_size; + $this->bom = $bom; + $this->prologue = !$omit_prologue; + $this->tags = array(); + } + + function start_element($parser, $name, $attrs) { + $attrs = array_map('bin2hex', $attrs); + $this->tags[] = bin2hex($name).": ".implode(', ', $attrs); + } + + function end_element($parser, $name) { + } + + function run() { + $data = ''; + + if ($this->prologue) { + $canonical_name = preg_replace('/BE|LE/i', '', $this->encoding); + $data .= "\n"; + } + + $data .= << + <テスト:テスト2 テスト="テスト"> + <テスト:テスト3> + test! + + + +HERE; + + $data = iconv("UTF-8", $this->encoding, $data); + + if ($this->bom) { + switch (strtoupper($this->encoding)) { + case 'UTF-8': + case 'UTF8': + $data = "\xef\xbb\xbf".$data; + break; + + case 'UTF-16': + case 'UTF16': + case 'UTF-16BE': + case 'UTF16BE': + case 'UCS-2': + case 'UCS2': + case 'UCS-2BE': + case 'UCS2BE': + $data = "\xfe\xff".$data; + break; + + case 'UTF-16LE': + case 'UTF16LE': + case 'UCS-2LE': + case 'UCS2LE': + $data = "\xff\xfe".$data; + break; + + case 'UTF-32': + case 'UTF32': + case 'UTF-32BE': + case 'UTF32BE': + case 'UCS-4': + case 'UCS4': + case 'UCS-4BE': + case 'UCS4BE': + $data = "\x00\x00\xfe\xff".$data; + break; + + case 'UTF-32LE': + case 'UTF32LE': + case 'UCS-4LE': + case 'UCS4LE': + $data = "\xff\xfe\x00\x00".$data; + break; + } + } + + $parser = xml_parser_create(NULL); + xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); + xml_set_element_handler($parser, "start_element", "end_element"); + xml_set_object($parser, $this); + + if ($this->chunk_size == 0) { + $success = @xml_parse($parser, $data, true); + } else { + for ($offset = 0; $offset < strlen($data); + $offset += $this->chunk_size) { + $success = @xml_parse($parser, substr($data, $offset, $this->chunk_size), false); + if (!$success) { + break; + } + } + if ($success) { + $success = @xml_parse($parser, "", true); + } + } + + echo "Encoding: $this->encoding\n"; + echo "XML Prologue: ".($this->prologue ? 'present': 'not present'), "\n"; + echo "Chunk size: ".($this->chunk_size ? "$this->chunk_size byte(s)\n": "all data at once\n"); + echo "BOM: ".($this->bom ? 'prepended': 'not prepended'), "\n"; + + if ($success) { + var_dump($this->tags); + } else { + echo "[Error] ", xml_error_string(xml_get_error_code($parser)), "\n"; + } + } +} +$suite = array( + new testcase("UTF-8", 0, 0, 0), + new testcase("UTF-8", 0, 0, 1), + new testcase("UTF-8", 0, 1, 0), + new testcase("UTF-8", 0, 1, 1), + new testcase("UTF-16BE", 0, 0, 0), + new testcase("UTF-16BE", 0, 1, 0), + new testcase("UTF-16BE", 0, 1, 1), + new testcase("UTF-16LE", 0, 0, 0), + new testcase("UTF-16LE", 0, 1, 0), + new testcase("UTF-16LE", 0, 1, 1), + new testcase("UTF-8", 1, 0, 0), + new testcase("UTF-8", 1, 0, 1), + new testcase("UTF-8", 1, 1, 0), + new testcase("UTF-8", 1, 1, 1), + new testcase("UTF-16BE", 1, 0, 0), + new testcase("UTF-16BE", 1, 1, 0), + new testcase("UTF-16BE", 1, 1, 1), + new testcase("UTF-16LE", 1, 0, 0), + new testcase("UTF-16LE", 1, 1, 0), + new testcase("UTF-16LE", 1, 1, 1), +); + +if (XML_SAX_IMPL == 'libxml') { + echo "libxml2 Version => " . LIBXML_DOTTED_VERSION. "\n"; +} else { + echo "libxml2 Version => NONE\n"; +} + +foreach ($suite as $testcase) { + $testcase->run(); +} + +// vim600: sts=4 sw=4 ts=4 encoding=UTF-8 +?> \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/bug32001.php.expectf b/hphp/test/zend/good/ext-xml/bug32001.php.expectf new file mode 100644 index 000000000..071e712ee --- /dev/null +++ b/hphp/test/zend/good/ext-xml/bug32001.php.expectf @@ -0,0 +1,241 @@ +libxml2 Version => %s +Encoding: UTF-8 +XML Prologue: present +Chunk size: all data at once +BOM: not prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: UTF-8 +XML Prologue: not present +Chunk size: all data at once +BOM: not prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: UTF-8 +XML Prologue: present +Chunk size: all data at once +BOM: prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: UTF-8 +XML Prologue: not present +Chunk size: all data at once +BOM: prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: UTF-16BE +XML Prologue: present +Chunk size: all data at once +BOM: not prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: UTF-16BE +XML Prologue: present +Chunk size: all data at once +BOM: prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: UTF-16BE +XML Prologue: not present +Chunk size: all data at once +BOM: prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: UTF-16LE +XML Prologue: present +Chunk size: all data at once +BOM: not prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: UTF-16LE +XML Prologue: present +Chunk size: all data at once +BOM: prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: UTF-16LE +XML Prologue: not present +Chunk size: all data at once +BOM: prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: UTF-8 +XML Prologue: present +Chunk size: 1 byte(s) +BOM: not prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: UTF-8 +XML Prologue: not present +Chunk size: 1 byte(s) +BOM: not prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: UTF-8 +XML Prologue: present +Chunk size: 1 byte(s) +BOM: prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: UTF-8 +XML Prologue: not present +Chunk size: 1 byte(s) +BOM: prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: UTF-16BE +XML Prologue: present +Chunk size: 1 byte(s) +BOM: not prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: UTF-16BE +XML Prologue: present +Chunk size: 1 byte(s) +BOM: prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: UTF-16BE +XML Prologue: not present +Chunk size: 1 byte(s) +BOM: prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: UTF-16LE +XML Prologue: present +Chunk size: 1 byte(s) +BOM: not prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: UTF-16LE +XML Prologue: present +Chunk size: 1 byte(s) +BOM: prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: UTF-16LE +XML Prologue: not present +Chunk size: 1 byte(s) +BOM: prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/bug43957.php b/hphp/test/zend/good/ext-xml/bug43957.php new file mode 100644 index 000000000..e26ce508b --- /dev/null +++ b/hphp/test/zend/good/ext-xml/bug43957.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/bug43957.php.expectf b/hphp/test/zend/good/ext-xml/bug43957.php.expectf new file mode 100644 index 000000000..b13515902 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/bug43957.php.expectf @@ -0,0 +1 @@ +abc? \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/utf8_decode_error.php b/hphp/test/zend/good/ext-xml/utf8_decode_error.php new file mode 100644 index 000000000..fd39d7a50 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/utf8_decode_error.php @@ -0,0 +1,21 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/utf8_decode_error.php.expectf b/hphp/test/zend/good/ext-xml/utf8_decode_error.php.expectf new file mode 100644 index 000000000..e2c063bcf --- /dev/null +++ b/hphp/test/zend/good/ext-xml/utf8_decode_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing utf8_decode() : error conditions *** + +-- Testing utf8_decode() function with Zero arguments -- +HipHop Warning: %a +NULL + +-- Testing utf8_decode() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/utf8_encode_error.php b/hphp/test/zend/good/ext-xml/utf8_encode_error.php new file mode 100644 index 000000000..17fb833bd --- /dev/null +++ b/hphp/test/zend/good/ext-xml/utf8_encode_error.php @@ -0,0 +1,21 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/utf8_encode_error.php.expectf b/hphp/test/zend/good/ext-xml/utf8_encode_error.php.expectf new file mode 100644 index 000000000..a17f59563 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/utf8_encode_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing utf8_encode() : error conditions *** + +-- Testing utf8_encode() function with Zero arguments -- +HipHop Warning: %a +NULL + +-- Testing utf8_encode() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml004.php b/hphp/test/zend/good/ext-xml/xml004.php new file mode 100644 index 000000000..5681024d7 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml004.php @@ -0,0 +1,36 @@ +\n"; +} + +function end_element($xp, $elem) +{ + print "\n"; +} +?> \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml004.php.expectf b/hphp/test/zend/good/ext-xml/xml004.php.expectf new file mode 100644 index 000000000..4a00b5a6b --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml004.php.expectf @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml006.php b/hphp/test/zend/good/ext-xml/xml006.php new file mode 100644 index 000000000..3a76ba15e --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml006.php @@ -0,0 +1,4 @@ + %s\n", urlencode("æ"), urlencode(utf8_encode("æ"))); +printf("%s <- %s\n", urlencode(utf8_decode(urldecode("%C3%A6"))), "%C3%A6"); +?> \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml006.php.expectf b/hphp/test/zend/good/ext-xml/xml006.php.expectf new file mode 100644 index 000000000..47269ca72 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml006.php.expectf @@ -0,0 +1,2 @@ +%E6 -> %C3%A6 +%E6 <- %C3%A6 \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml009.php b/hphp/test/zend/good/ext-xml/xml009.php new file mode 100644 index 000000000..f77b485d4 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml009.php @@ -0,0 +1,23 @@ + + + + +HERE; + +$parser = xml_parser_create_ns("ISO-8859-1","@"); +xml_set_element_handler($parser,'start_elem','end_elem'); +xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0); +xml_parse($parser, $xml); +xml_parser_free($parser); +?> \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml009.php.expectf b/hphp/test/zend/good/ext-xml/xml009.php.expectf new file mode 100644 index 000000000..bddeea09d --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml009.php.expectf @@ -0,0 +1,3 @@ +string(24) "http://example.com/foo@a" +string(24) "http://example.com/bar@b" +string(24) "http://example.com/foo@c" \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_error_string_error.php b/hphp/test/zend/good/ext-xml/xml_error_string_error.php new file mode 100644 index 000000000..5a8f45353 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_error_string_error.php @@ -0,0 +1,21 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_error_string_error.php.expectf b/hphp/test/zend/good/ext-xml/xml_error_string_error.php.expectf new file mode 100644 index 000000000..ea1756f56 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_error_string_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing xml_error_string() : error conditions *** + +-- Testing xml_error_string() function with Zero arguments -- +HipHop Warning: %a +NULL + +-- Testing xml_error_string() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_get_current_byte_index_error.php b/hphp/test/zend/good/ext-xml/xml_get_current_byte_index_error.php new file mode 100644 index 000000000..700813e0f --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_get_current_byte_index_error.php @@ -0,0 +1,21 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_get_current_byte_index_error.php.expectf b/hphp/test/zend/good/ext-xml/xml_get_current_byte_index_error.php.expectf new file mode 100644 index 000000000..1a7d9120f --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_get_current_byte_index_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing xml_get_current_byte_index() : error conditions *** + +-- Testing xml_get_current_byte_index() function with Zero arguments -- +HipHop Warning: %a +NULL + +-- Testing xml_get_current_byte_index() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_get_current_column_number_error.php b/hphp/test/zend/good/ext-xml/xml_get_current_column_number_error.php new file mode 100644 index 000000000..2a46011f9 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_get_current_column_number_error.php @@ -0,0 +1,21 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_get_current_column_number_error.php.expectf b/hphp/test/zend/good/ext-xml/xml_get_current_column_number_error.php.expectf new file mode 100644 index 000000000..f0f4f2bf3 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_get_current_column_number_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing xml_get_current_column_number() : error conditions *** + +-- Testing xml_get_current_column_number() function with Zero arguments -- +HipHop Warning: %a +NULL + +-- Testing xml_get_current_column_number() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_get_current_line_number_error.php b/hphp/test/zend/good/ext-xml/xml_get_current_line_number_error.php new file mode 100644 index 000000000..64f12f750 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_get_current_line_number_error.php @@ -0,0 +1,21 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_get_current_line_number_error.php.expectf b/hphp/test/zend/good/ext-xml/xml_get_current_line_number_error.php.expectf new file mode 100644 index 000000000..342597dd1 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_get_current_line_number_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing xml_get_current_line_number() : error conditions *** + +-- Testing xml_get_current_line_number() function with Zero arguments -- +HipHop Warning: %a +NULL + +-- Testing xml_get_current_line_number() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_get_error_code_error.php b/hphp/test/zend/good/ext-xml/xml_get_error_code_error.php new file mode 100644 index 000000000..18974736c --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_get_error_code_error.php @@ -0,0 +1,21 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_get_error_code_error.php.expectf b/hphp/test/zend/good/ext-xml/xml_get_error_code_error.php.expectf new file mode 100644 index 000000000..c34d21c93 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_get_error_code_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing xml_get_error_code() : error conditions *** + +-- Testing xml_get_error_code() function with Zero arguments -- +HipHop Warning: %a +NULL + +-- Testing xml_get_error_code() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_parse_error.php b/hphp/test/zend/good/ext-xml/xml_parse_error.php new file mode 100644 index 000000000..f64226f98 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_parse_error.php @@ -0,0 +1,25 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_parse_error.php.expectf b/hphp/test/zend/good/ext-xml/xml_parse_error.php.expectf new file mode 100644 index 000000000..df2c63d55 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_parse_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing xml_parse() : error conditions *** + +-- Testing xml_parse() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL + +-- Testing xml_parse() function with less than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_parse_into_struct_error.php b/hphp/test/zend/good/ext-xml/xml_parse_into_struct_error.php new file mode 100644 index 000000000..615fbe3b7 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_parse_into_struct_error.php @@ -0,0 +1,26 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_parse_into_struct_error.php.expectf b/hphp/test/zend/good/ext-xml/xml_parse_into_struct_error.php.expectf new file mode 100644 index 000000000..8e9e590c0 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_parse_into_struct_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing xml_parse_into_struct() : error conditions *** + +-- Testing xml_parse_into_struct() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL + +-- Testing xml_parse_into_struct() function with less than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_parse_into_struct_variation.php b/hphp/test/zend/good/ext-xml/xml_parse_into_struct_variation.php new file mode 100644 index 000000000..841c2d8a4 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_parse_into_struct_variation.php @@ -0,0 +1,21 @@ +simple notesimple note"; +$p = xml_parser_create(); +xml_parse_into_struct($p, $simple, $vals, $index); +xml_parser_free($p); +echo "Index array\n"; +print_r($index); +echo "\nVals array\n"; +print_r($vals); + + +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_parse_into_struct_variation.php.expectf b/hphp/test/zend/good/ext-xml/xml_parse_into_struct_variation.php.expectf new file mode 100644 index 000000000..4d617142d --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_parse_into_struct_variation.php.expectf @@ -0,0 +1,89 @@ +*** Testing xml_parse_into_struct() : variation *** +Index array +Array +( + [MAIN] => Array + ( + [0] => 0 + [1] => 7 + ) + + [PARA] => Array + ( + [0] => 1 + [1] => 3 + [2] => 4 + [3] => 6 + ) + + [NOTE] => Array + ( + [0] => 2 + [1] => 5 + ) + +) + +Vals array +Array +( + [0] => Array + ( + [tag] => MAIN + [type] => open + [level] => 1 + ) + + [1] => Array + ( + [tag] => PARA + [type] => open + [level] => 2 + ) + + [2] => Array + ( + [tag] => NOTE + [type] => complete + [level] => 3 + [value] => simple note + ) + + [3] => Array + ( + [tag] => PARA + [type] => close + [level] => 2 + ) + + [4] => Array + ( + [tag] => PARA + [type] => open + [level] => 2 + ) + + [5] => Array + ( + [tag] => NOTE + [type] => complete + [level] => 3 + [value] => simple note + ) + + [6] => Array + ( + [tag] => PARA + [type] => close + [level] => 2 + ) + + [7] => Array + ( + [tag] => MAIN + [type] => close + [level] => 1 + ) + +) +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_parser_free_error.php b/hphp/test/zend/good/ext-xml/xml_parser_free_error.php new file mode 100644 index 000000000..bbbc6fa80 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_parser_free_error.php @@ -0,0 +1,21 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_parser_free_error.php.expectf b/hphp/test/zend/good/ext-xml/xml_parser_free_error.php.expectf new file mode 100644 index 000000000..164f08f1f --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_parser_free_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing xml_parser_free() : error conditions *** + +-- Testing xml_parser_free() function with Zero arguments -- +HipHop Warning: %a +NULL + +-- Testing xml_parser_free() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_parser_get_option_error.php b/hphp/test/zend/good/ext-xml/xml_parser_get_option_error.php new file mode 100644 index 000000000..745fc65be --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_parser_get_option_error.php @@ -0,0 +1,23 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_parser_get_option_error.php.expectf b/hphp/test/zend/good/ext-xml/xml_parser_get_option_error.php.expectf new file mode 100644 index 000000000..6c44c318f --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_parser_get_option_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing xml_parser_get_option() : error conditions *** + +-- Testing xml_parser_get_option() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL + +-- Testing xml_parser_get_option() function with less than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_parser_set_option_basic.php b/hphp/test/zend/good/ext-xml/xml_parser_set_option_basic.php new file mode 100644 index 000000000..1b3743c5a --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_parser_set_option_basic.php @@ -0,0 +1,33 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_parser_set_option_basic.php.expectf b/hphp/test/zend/good/ext-xml/xml_parser_set_option_basic.php.expectf new file mode 100644 index 000000000..2737e6f72 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_parser_set_option_basic.php.expectf @@ -0,0 +1,14 @@ +Simple testcase for xml_parser_get_option() function +int(1) +string(5) "UTF-8" +bool(true) +bool(true) +int(1) +string(10) "ISO-8859-1" +bool(true) +bool(true) +int(0) +string(5) "UTF-8" +bool(true) +string(8) "US-ASCII" +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_parser_set_option_error.php b/hphp/test/zend/good/ext-xml/xml_parser_set_option_error.php new file mode 100644 index 000000000..0258000c9 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_parser_set_option_error.php @@ -0,0 +1,26 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_parser_set_option_error.php.expectf b/hphp/test/zend/good/ext-xml/xml_parser_set_option_error.php.expectf new file mode 100644 index 000000000..e040944b2 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_parser_set_option_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing xml_parser_set_option() : error conditions *** + +-- Testing xml_parser_set_option() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL + +-- Testing xml_parser_set_option() function with less than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_parser_set_option_variation3.php b/hphp/test/zend/good/ext-xml/xml_parser_set_option_variation3.php new file mode 100644 index 000000000..e271fb3e5 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_parser_set_option_variation3.php @@ -0,0 +1,91 @@ + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'string', + + // object data + new aClass(), + + // resource data + $fp, + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for value + +foreach($values as $value) { + echo @"\nArg value $value \n"; + var_dump( xml_parser_set_option($parser, $option, $value) ); +}; + +fclose($fp); +xml_parser_free($parser); +echo "Done"; +?> \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_parser_set_option_variation3.php.expectf b/hphp/test/zend/good/ext-xml/xml_parser_set_option_variation3.php.expectf new file mode 100644 index 000000000..638950e43 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_parser_set_option_variation3.php.expectf @@ -0,0 +1,86 @@ +*** Testing xml_parser_set_option() : usage variations *** + +Arg value 0 +bool(true) + +Arg value 1 +bool(true) + +Arg value 12345 +bool(true) + +Arg value -2345 +bool(true) + +Arg value 10.5 +bool(true) + +Arg value -10.5 +bool(true) + +Arg value 101234567000 +bool(true) + +Arg value 1.07654321E-9 +bool(true) + +Arg value 0.5 +bool(true) + +Arg value Array +bool(true) + +Arg value Array +bool(true) + +Arg value Array +bool(true) + +Arg value Array +bool(true) + +Arg value Array +bool(true) + +Arg value +bool(true) + +Arg value +bool(true) + +Arg value 1 +bool(true) + +Arg value +bool(true) + +Arg value 1 +bool(true) + +Arg value +bool(true) + +Arg value +bool(true) + +Arg value +bool(true) + +Arg value string +bool(true) + +Arg value string +bool(true) + +Arg value Some Ascii Data +bool(true) + +Arg value Resource id %s +bool(true) + +Arg value +bool(true) + +Arg value +bool(true) +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_character_data_handler_error.php b/hphp/test/zend/good/ext-xml/xml_set_character_data_handler_error.php new file mode 100644 index 000000000..e56fdcff8 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_character_data_handler_error.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_character_data_handler_error.php.expectf b/hphp/test/zend/good/ext-xml/xml_set_character_data_handler_error.php.expectf new file mode 100644 index 000000000..e4ac7b3bf --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_character_data_handler_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing xml_set_character_data_handler() : error conditions *** + +-- Testing xml_set_character_data_handler() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL + +-- Testing xml_set_character_data_handler() function with less than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_default_handler_error.php b/hphp/test/zend/good/ext-xml/xml_set_default_handler_error.php new file mode 100644 index 000000000..39bc4b52c --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_default_handler_error.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_default_handler_error.php.expectf b/hphp/test/zend/good/ext-xml/xml_set_default_handler_error.php.expectf new file mode 100644 index 000000000..33c4e67c4 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_default_handler_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing xml_set_default_handler() : error conditions *** + +-- Testing xml_set_default_handler() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL + +-- Testing xml_set_default_handler() function with less than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_element_handler_error.php b/hphp/test/zend/good/ext-xml/xml_set_element_handler_error.php new file mode 100644 index 000000000..a6a0022ad --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_element_handler_error.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_element_handler_error.php.expectf b/hphp/test/zend/good/ext-xml/xml_set_element_handler_error.php.expectf new file mode 100644 index 000000000..87c0e2e51 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_element_handler_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing xml_set_element_handler() : error conditions *** + +-- Testing xml_set_element_handler() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL + +-- Testing xml_set_element_handler() function with less than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_end_namespace_decl_handler_error.php b/hphp/test/zend/good/ext-xml/xml_set_end_namespace_decl_handler_error.php new file mode 100644 index 000000000..6c93f232e --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_end_namespace_decl_handler_error.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_end_namespace_decl_handler_error.php.expectf b/hphp/test/zend/good/ext-xml/xml_set_end_namespace_decl_handler_error.php.expectf new file mode 100644 index 000000000..ad7f49735 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_end_namespace_decl_handler_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing xml_set_end_namespace_decl_handler() : error conditions *** + +-- Testing xml_set_end_namespace_decl_handler() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL + +-- Testing xml_set_end_namespace_decl_handler() function with less than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_external_entity_ref_handler_error.php b/hphp/test/zend/good/ext-xml/xml_set_external_entity_ref_handler_error.php new file mode 100644 index 000000000..590c02966 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_external_entity_ref_handler_error.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_external_entity_ref_handler_error.php.expectf b/hphp/test/zend/good/ext-xml/xml_set_external_entity_ref_handler_error.php.expectf new file mode 100644 index 000000000..3c90af260 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_external_entity_ref_handler_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing xml_set_external_entity_ref_handler() : error conditions *** + +-- Testing xml_set_external_entity_ref_handler() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL + +-- Testing xml_set_external_entity_ref_handler() function with less than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_notation_decl_handler_basic.php b/hphp/test/zend/good/ext-xml/xml_set_notation_decl_handler_basic.php new file mode 100644 index 000000000..a756a34dd --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_notation_decl_handler_basic.php @@ -0,0 +1,57 @@ + + + + + + + ]> +]> +HERE; + +echo "Simple test of xml_set_notation_decl_handler(() function\n"; +$p1 = new Xml_Parser(); +$p1->parse($xml); +echo "Done\n"; +?> \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_notation_decl_handler_basic.php.expectf b/hphp/test/zend/good/ext-xml/xml_set_notation_decl_handler_basic.php.expectf new file mode 100644 index 000000000..a531290aa --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_notation_decl_handler_basic.php.expectf @@ -0,0 +1,35 @@ +Simple test of xml_set_notation_decl_handler(() function +notation_decl_handler called +...Name=USDATE +...Base= +...System ID=http://www.schema.net/usdate.not +...Public ID= +notation_decl_handler called +...Name=AUSDATE +...Base= +...System ID=http://www.schema.net/ausdate.not +...Public ID= +notation_decl_handler called +...Name=ISODATE +...Base= +...System ID=http://www.schema.net/isodate.not +...Public ID= +unparsed_entity_decl_handler called +...Entity name=testUS +...Base= +...System ID=test_usdate.xml +...Public ID= +...Notation name=USDATE +unparsed_entity_decl_handler called +...Entity name=testAUS +...Base= +...System ID=test_ausdate.xml +...Public ID= +...Notation name=AUSDATE +unparsed_entity_decl_handler called +...Entity name=testISO +...Base= +...System ID=test_isodate_xml +...Public ID= +...Notation name=ISODATE +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_notation_decl_handler_error.php b/hphp/test/zend/good/ext-xml/xml_set_notation_decl_handler_error.php new file mode 100644 index 000000000..2575f677d --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_notation_decl_handler_error.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_notation_decl_handler_error.php.expectf b/hphp/test/zend/good/ext-xml/xml_set_notation_decl_handler_error.php.expectf new file mode 100644 index 000000000..560c7d5dc --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_notation_decl_handler_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing xml_set_notation_decl_handler() : error conditions *** + +-- Testing xml_set_notation_decl_handler() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL + +-- Testing xml_set_notation_decl_handler() function with less than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_object_error.php b/hphp/test/zend/good/ext-xml/xml_set_object_error.php new file mode 100644 index 000000000..8e0d268cd --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_object_error.php @@ -0,0 +1,28 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_object_error.php.expectf b/hphp/test/zend/good/ext-xml/xml_set_object_error.php.expectf new file mode 100644 index 000000000..b6dc3e5e3 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_object_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing xml_set_object() : error conditions *** + +-- Testing xml_set_object() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL + +-- Testing xml_set_object() function with less than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_processing_instruction_handler_basic.php b/hphp/test/zend/good/ext-xml/xml_set_processing_instruction_handler_basic.php new file mode 100644 index 000000000..e2a47554a --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_processing_instruction_handler_basic.php @@ -0,0 +1,38 @@ + + +HERE; + +echo "Simple test of xml_set_processing_instruction_handler() function\n"; +$p1 = new Xml_Parser(); +$p1->parse($xml); +echo "Done\n"; +?> \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_processing_instruction_handler_basic.php.expectf b/hphp/test/zend/good/ext-xml/xml_set_processing_instruction_handler_basic.php.expectf new file mode 100644 index 000000000..81d1cc783 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_processing_instruction_handler_basic.php.expectf @@ -0,0 +1,4 @@ +Simple test of xml_set_processing_instruction_handler() function +Target: xml-stylesheet +Data: href="default.xsl" type="text/xml" +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_processing_instruction_handler_error.php b/hphp/test/zend/good/ext-xml/xml_set_processing_instruction_handler_error.php new file mode 100644 index 000000000..da0c27da1 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_processing_instruction_handler_error.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_processing_instruction_handler_error.php.expectf b/hphp/test/zend/good/ext-xml/xml_set_processing_instruction_handler_error.php.expectf new file mode 100644 index 000000000..8e2552157 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_processing_instruction_handler_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing xml_set_processing_instruction_handler() : error conditions *** + +-- Testing xml_set_processing_instruction_handler() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL + +-- Testing xml_set_processing_instruction_handler() function with less than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_start_namespace_decl_handler_error.php b/hphp/test/zend/good/ext-xml/xml_set_start_namespace_decl_handler_error.php new file mode 100644 index 000000000..3bf847c0d --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_start_namespace_decl_handler_error.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_start_namespace_decl_handler_error.php.expectf b/hphp/test/zend/good/ext-xml/xml_set_start_namespace_decl_handler_error.php.expectf new file mode 100644 index 000000000..7634e4990 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_start_namespace_decl_handler_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing xml_set_start_namespace_decl_handler() : error conditions *** + +-- Testing xml_set_start_namespace_decl_handler() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL + +-- Testing xml_set_start_namespace_decl_handler() function with less than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_unparsed_entity_decl_handler_error.php b/hphp/test/zend/good/ext-xml/xml_set_unparsed_entity_decl_handler_error.php new file mode 100644 index 000000000..2c12a2904 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_unparsed_entity_decl_handler_error.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xml_set_unparsed_entity_decl_handler_error.php.expectf b/hphp/test/zend/good/ext-xml/xml_set_unparsed_entity_decl_handler_error.php.expectf new file mode 100644 index 000000000..fab74cc46 --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xml_set_unparsed_entity_decl_handler_error.php.expectf @@ -0,0 +1,10 @@ +*** Testing xml_set_unparsed_entity_decl_handler() : error conditions *** + +-- Testing xml_set_unparsed_entity_decl_handler() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL + +-- Testing xml_set_unparsed_entity_decl_handler() function with less than expected no. of arguments -- +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/good/ext-xml/xmltest.xml b/hphp/test/zend/good/ext-xml/xmltest.xml new file mode 100644 index 000000000..c15d6ea1a --- /dev/null +++ b/hphp/test/zend/good/ext-xml/xmltest.xml @@ -0,0 +1,20 @@ + + +%incent; +]> + + Plain text. + + + + + + &included-entity; + + + + + + + diff --git a/hphp/tools/import_zend_test.py b/hphp/tools/import_zend_test.py index 38c52f500..1db86107c 100755 --- a/hphp/tools/import_zend_test.py +++ b/hphp/tools/import_zend_test.py @@ -117,7 +117,6 @@ no_import = ( '/ext/soap', '/ext/spl', '/ext/sqlite3', - '/ext/xml', '/ext/xmlreader', '/ext/xmlwriter', '/ext/zlib', @@ -219,6 +218,7 @@ other_files = ( '/ext-openssl/public.key', '/ext-session/save_handler.inc', '/ext-simplexml/bug24392.xml', + '/ext-xml/xmltest.xml', '/tests/quicktester.inc', )