• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

extphprs / ext-php-rs / 23717201024
34%
master: 65%

Build:
Build:
LAST BUILD BRANCH: fix/184-property-type-stubs
DEFAULT BRANCH: master
Ran 29 Mar 2026 07:32PM UTC
Jobs 1
Files 92
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Mar 2026 07:29PM UTC coverage: 34.103% (+0.04%) from 34.063%
23717201024

push

github

ptondereau
perf: use `zend_string_init_fast()` for non-persistent strings

Eliminate heap allocations for empty and single-character PHP strings by
routing non-persistent allocations through `zend_string_init_fast()`,
which returns PHP's pre-allocated interned globals (`zend_empty_string`
and `zend_one_char_string[256]`) instead of calling `emalloc`.

Available since PHP 8.0, `zend_string_release()` is a no-op on interned
strings (`ZSTR_IS_INTERNED` guard), so `ZBox::drop()` remains safe with
no Rust-side ownership changes needed.

The interned string globals are declared as weak symbols via
`#pragma weak` so the extension `.so` can be loaded outside of PHP
(e.g. by `cargo-php stubs`). When the globals are unavailable or
uninitialized, the fast path is skipped and `zend_string_init()` is
used as fallback.

Also fix `set_zend_string()` to detect interned strings via
`GC_IMMUTABLE` and set `InternedStringEx` type flags instead of
`StringEx`. Without this, PHP's debug build asserts when destroying
interned strings stored in zvals marked as refcounted. This fixes 4
pre-existing integration test failures on debug PHP builds.

5 of 5 new or added lines in 1 file covered. (100.0%)

2215 of 6495 relevant lines covered (34.1%)

23.76 hits per line

Jobs
ID Job ID Ran Files Coverage
1 23717201024.1 29 Mar 2026 07:32PM UTC 92
34.1
GitHub Action Run
Source Files on build 23717201024
  • Tree
  • List 92
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23717201024
  • 2b8a7a0a on github
  • Prev Build on master (#23639519635)
  • Next Build on perf/zend-string-init-fast (#23717260177)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc