Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.3', '8.4', '8.5']
php: ['8.1', '8.2', '8.3', '8.4', '8.5']
libxl: ['5.2.0.1']
include:
- php: '8.4'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: php/php-windows-builder/extension-matrix@v1
with:
extension-url: ${{ github.event.repository.html_url }}
php-version-list: '8.3, 8.4, 8.5'
php-version-list: '8.1, 8.2, 8.3, 8.4, 8.5'

windows-build:
name: Build ${{ matrix.php-version }} ${{ matrix.arch }} ${{ matrix.ts }}
Expand Down
2 changes: 2 additions & 0 deletions .release-config
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ version_macro: PHP_EXCEL_VERSION
version_file: excel.c
repo: iliaal/php_excel
build_matrix:
- PHP-8.1
- PHP-8.2
- PHP-8.3
- PHP-8.4
- PHP-8.5
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- PHP 8.1 support (lowered the minimum from 8.3).

## [2.1.0] - 2026-06-01

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

![php_excel: 7-10× faster Excel I/O for PHP](images/php_excel-hero.jpg)

Native C extension for reading and writing Excel files in PHP, powered by [LibXL](http://www.libxl.com/). 7-10× faster than PhpSpreadsheet with substantially lower memory pressure. Full XLS and XLSX support: rich text, conditional formatting, formulas, autofilters, form controls, embedded charts, and structured tables. PHP 8.3+ minimum. 2.0 ground-up modernization shipped April 2026.
Native C extension for reading and writing Excel files in PHP, powered by [LibXL](http://www.libxl.com/). 7-10× faster than PhpSpreadsheet with substantially lower memory pressure. Full XLS and XLSX support: rich text, conditional formatting, formulas, autofilters, form controls, embedded charts, and structured tables. PHP 8.1+ minimum. 2.0 ground-up modernization shipped April 2026.

## 🚀 Install

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
],
"require": {
"php": ">=8.3"
"php": ">=8.1"
},
"php-ext": {
"extension-name": "excel",
Expand Down
6 changes: 3 additions & 3 deletions config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ PHP_ARG_ENABLE(excel-dev, whether to enable developer build flags,

if test "$PHP_EXCEL" != "no"; then

dnl Check minimum PHP version (8.3.0 = 80300)
dnl Check minimum PHP version (8.1.0 = 80100)
PHP_VERSION_ID=$($PHP_CONFIG --vernum)
if test "$PHP_VERSION_ID" -lt "80300"; then
AC_MSG_ERROR([php_excel requires PHP 8.3.0 or later (found $PHP_VERSION_ID)])
if test "$PHP_VERSION_ID" -lt "80100"; then
AC_MSG_ERROR([php_excel requires PHP 8.1.0 or later (found $PHP_VERSION_ID)])
fi

SEARCH_PATH="/usr/local /usr"
Expand Down
12 changes: 11 additions & 1 deletion excel.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,16 @@ PHP_INI_BEGIN()
PHP_INI_END()

/* {{{ OO init/structure stuff */
/* default_object_handlers is a class-entry field added in PHP 8.3; on
* 8.1/8.2 each create_object handler sets intern->std.handlers directly,
* which is the correct per-object mechanism there. */
#if PHP_VERSION_ID >= 80300
#define EXCEL_SET_DEFAULT_OBJECT_HANDLERS(c_name) \
excel_ce_ ## c_name->default_object_handlers = &excel_object_handlers_ ## c_name
#else
#define EXCEL_SET_DEFAULT_OBJECT_HANDLERS(c_name) ((void)0)
#endif

/* Class registration uses the gen_stub-generated register_class_*()
* functions from excel_arginfo.h; this macro layers on create_object,
* NOT_SERIALIZABLE, and per-class object_handlers. */
Expand All @@ -77,7 +87,7 @@ PHP_INI_END()
excel_ce_ ## c_name->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; \
excel_ce_ ## c_name->create_object = excel_object_new_ ## c_name; \
memcpy(&excel_object_handlers_ ## c_name, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); \
excel_ce_ ## c_name->default_object_handlers = &excel_object_handlers_ ## c_name; \
EXCEL_SET_DEFAULT_OBJECT_HANDLERS(c_name); \
excel_object_handlers_ ## c_name .offset = offsetof(excel_ ## c_name ## _object, std); \
excel_object_handlers_ ## c_name .free_obj = excel_ ## c_name ## _object_free_storage; \
excel_object_handlers_ ## c_name .clone_obj = clone; \
Expand Down