This project benchmarks different CSV loading libraries in PHP. It supports the following libraries:
- PhpOffice
- OpenSpout
- Vanilla PHP
- PHP >= 8.1
- Composer
-
Clone the repository:
git clone https://github.com/vershart/csv-loader-benchmark.git cd csv-loader-benchmark -
Install dependencies:
composer install
To run a benchmark, use the following command:
sh php bench.php <benchmarkName> <rowCount>
For example, to run the benchmark for PhpOffice with 100 000 rows:
sh php bench.php phpoffice 100 000