Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 9, 2024 via composer

masterminds/html5 2.8.1

An HTML5 parser and serializer.
Package summary
Share
0
issues
1
license
1
MIT
Package created
1 Jun 2013
Version published
10 May 2023
Maintainers
3
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
masterminds/html5@2.8.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of masterminds/html5 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does masterminds/html5 do?

Masterminds/html5 is a standards-compliant HTML5 parser and writer designed exclusively in PHP. With over five million downloads, it offers stability and tested performance for a wide array of production websites. The package provides a host of features such as an HTML5 serializer, compatibility with PHP namespaces, support for Composer, an event-based parser akin to SAX, a DOM tree builder, and interoperability with QueryPath. It functions seamlessly with PHP versions 5.3.0 and above.

How do you use masterminds/html5?

To utilize the masterminds/html5 package, you will first need to install it using Composer. This can be done by either adding the "masterminds/html5" as a dependency to your composer.json file or by invoking the require command that goes like "composer require masterminds/html5" via the composer executable.

Post-installation, there are two ways of using HTML5-PHP, via a high-level API or a low-level API. For a high-level application, you need to initiate an instance of HTML5 and use its object methods to load and save HTML content. View the below example:

<?php
require "vendor/autoload.php";
use Masterminds\HTML5;

$html = <<< 'HERE'
  <html>
  <head>
    <title>TEST</title>
  </head>
  <body id='foo'>
    <h1>Hello World</h1>
    <p>This is a test of the HTML5 parser.</p>
  </body>
  </html>
HERE;

$html5 = new HTML5();
$dom = $html5->loadHTML($html);

print $html5->saveHTML($dom);
$html5->save($dom, 'out.html');

The package also allows users to pass an array of configuration options when loading an HTML5 document.

Where are the masterminds/html5 docs?

The documentation and deep-dive details for the masterminds/html5 package can be found directly on their GitHub repository page. The Readme file offers comprehensive instructions and examples for installation, usage (basic and advanced), package design, known issues, license details, and additional resources. Users can consult this page for any general troubleshooting or advanced tinkering with the package. The repo page also harbors unit tests for the API and each public function is well-documented for user comprehension.