"Fossies" - the Fresh Open Source Software Archive

Member "php-7.4.1/ext/libxml/tests/001.phpt" (17 Dec 2019, 615 Bytes) of package /linux/www/php-7.4.1.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 --TEST--
    2 libxml_use_internal_errors()
    3 --SKIPIF--
    4 <?php if (!extension_loaded('libxml')) die('skip'); ?>
    5 --FILE--
    6 <?php
    7 
    8 var_dump(libxml_use_internal_errors(false));
    9 var_dump(libxml_use_internal_errors(true));
   10 var_dump(libxml_use_internal_errors());
   11 var_dump(libxml_use_internal_errors(new stdclass));
   12 
   13 var_dump(libxml_get_errors());
   14 var_dump(libxml_get_last_error());
   15 
   16 var_dump(libxml_clear_errors());
   17 
   18 echo "Done\n";
   19 ?>
   20 --EXPECTF--
   21 bool(false)
   22 bool(false)
   23 bool(true)
   24 
   25 Warning: libxml_use_internal_errors() expects parameter 1 to be bool, object given in %s001.php on line 6
   26 NULL
   27 array(0) {
   28 }
   29 bool(false)
   30 NULL
   31 Done