This project is a PHP script designed to fetch and compile the changelog of PHP functions from the official PHP documentation website. The changelogs are consolidated into a single HTML file for easy reference.
- Fetches changelogs for all PHP functions listed in the PHP manual.
- Generates a structured HTML file with a table of changelogs.
- Allows continuation from a specific function title if the process is interrupted.
- PHP 7.0 or higher
- cURL extension enabled
- simple_html_dom library
-
Clone the repository:
git clone https://github.com/denizvatan/php-changelog-fetcher.git cd php-changelog-fetcher
-
Install the dependencies: Make sure you have the
simple_html_dom.php
file in your project directory. You can download it from here.
-
Run the script:
php changelog_fetcher.php
-
Continue from a specific function title (if needed): If the process is interrupted and you need to continue from a specific function, you can modify the script to call
continueFromTitle
method with the desired function title.
Here's an example of how to use the continueFromTitle
method:
$baseUrl = 'https://www.php.net/manual/en/';
$outputFile = 'phpChangelog.html';
$changelogFetcher = new ChangelogFetcher($baseUrl, $outputFile);
$changelogFetcher->fetch();
// If interrupted, continue from a specific function title:
$changelogFetcher->continueFromTitle($baseUrl . 'indexes.functions.php', 'IntlDateFormatter::create');
This PHP script generates an HTML report of function usages in a specified folder by parsing an HTML file containing function names. The script fetches the content from a given URL, extracts function names from <h1>
tags, searches for their usages in the provided folder, and creates an HTML report.
- PHP 7.4 or later
- Ripgrep (for searching function usages)
- Clone the repository (if applicable):
git clone https://github.com/yourusername/function-report-generator.git cd function-report-generator
- Ensure Ripgrep is installed:
Follow the installation instructions for your operating system.
- ChangelogFetcher.php: Contains the
ChangelogFetcher
class which handles fetching and compiling the changelogs. - simple_html_dom.php: The
simple_html_dom
library for parsing HTML. - phpChangelog.html: The output file generated by the script.
- search-changes.php: Contains the
FunctionReportGenerator
class which generates an HTML report of function usages in a specified folder.
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to submit issues and enhancement requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a pull request
- simple_html_dom library for HTML parsing.
Deniz Vatan Buyorük - denizvtn@gmail.com
Project Link: https://github.com/denizvatan/php-changelog-fetcher