Skip to content

Fix long type and parity with PHP (#2666) - #2678

Merged
Jeckerson merged 2 commits into
developmentfrom
#2666-fix-long
Aug 31, 2026
Merged

Fix long type and parity with PHP (#2666)#2678
Jeckerson merged 2 commits into
developmentfrom
#2666-fix-long

Conversation

@Jeckerson

Copy link
Copy Markdown
Member

Hello!

In raising this pull request, I confirm the following:

  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • I updated the CHANGELOG

@Jeckerson
Jeckerson requested a review from niden August 31, 2026 12:30
@Jeckerson Jeckerson self-assigned this Aug 31, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
5.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@github-actions

Copy link
Copy Markdown

Benchmark report

Comparison against development (b472a3724a59ceeb96885b72c9201990de7e0c7a) on #2666-fix-long (aaf8b3876dae8b00cc254bff01bac0126083be78).
Each row's mode column shows the head-branch absolute throughput and the percent delta vs base. Positive deltas on Zephir* subjects mean head is faster; deltas on Php* baseline subjects are noise-floor signal.

+------------------------+----------------------------------------+-----+------+-----+----------------+------------------------+-------------------+
| benchmark              | subject                                | set | revs | its | mem_peak       | mode                   | rstdev            |
+------------------------+----------------------------------------+-----+------+-----+----------------+------------------------+-------------------+
| NewInstanceBench       | benchZephirNewInstanceLoop             |     | 200  | 5   | 2.303mb +0.04% | 0.141575ops/μs +1.68%  | ±3.87% +748.38%   |
| NewInstanceBench       | benchPhpNewInstanceLoop                |     | 200  | 5   | 2.303mb +0.04% | 0.445110ops/μs +0.59%  | ±0.71% -71.16%    |
| StringConcatBench      | benchZephirStringConcat                |     | 500  | 5   | 2.303mb +0.04% | 1.180537ops/μs -2.33%  | ±2.34% -5.61%     |
| StringConcatBench      | benchPhpStringConcat                   |     | 500  | 5   | 2.303mb +0.04% | 0.901092ops/μs -3.30%  | ±3.47% +232.15%   |
| CallDispatchBench      | benchInstanceDispatch                  |     | 2000 | 10  | 2.303mb +0.04% | 0.003313ops/μs -0.23%  | ±1.38% +8.06%     |
| CallDispatchBench      | benchFinalDispatch                     |     | 2000 | 10  | 2.303mb +0.04% | 0.005900ops/μs +1.58%  | ±0.63% -63.57%    |
| CallDispatchBench      | benchStaticDispatch                    |     | 2000 | 10  | 2.303mb +0.04% | 0.003316ops/μs -8.02%  | ±1.67% +71.66%    |
| ArrayAccessBench       | benchZephirArrayFetchString            |     | 500  | 5   | 2.303mb +0.04% | 0.456482ops/μs -0.85%  | ±2.85% +96.39%    |
| ArrayAccessBench       | benchPhpArrayFetchString               |     | 500  | 5   | 2.303mb +0.04% | 0.469265ops/μs -0.38%  | ±0.91% -36.88%    |
| ForLoopBench           | benchZephirForOverArray                |     | 1000 | 5   | 2.303mb +0.04% | 7.950214ops/μs -3.98%  | ±2.92% +170.07%   |
| ForLoopBench           | benchPhpForOverArray                   |     | 1000 | 5   | 2.303mb +0.04% | 2.312123ops/μs -0.31%  | ±4.49% -22.68%    |
| ForLoopBench           | benchZephirForOverIterator             |     | 1000 | 5   | 2.303mb +0.04% | 0.409319ops/μs +0.15%  | ±1.00% -16.09%    |
| ForLoopBench           | benchPhpForOverIterator                |     | 1000 | 5   | 2.303mb +0.04% | 2.538399ops/μs +4.05%  | ±13.18% +115.60%  |
| ForLoopBench           | benchZephirForOverIteratorWithContinue |     | 1000 | 5   | 2.303mb +0.04% | 0.404850ops/μs +0.31%  | ±11.60% +1419.47% |
| ForLoopBench           | benchPhpForOverIteratorWithContinue    |     | 1000 | 5   | 2.303mb +0.04% | 2.395608ops/μs -0.21%  | ±2.50% -11.92%    |
| ForLoopBench           | benchZephirForOverRangeOperator        |     | 1000 | 5   | 2.303mb +0.04% | 3.406962ops/μs -0.25%  | ±1.43% -43.44%    |
| ForLoopBench           | benchZephirForOverRangeFunction        |     | 1000 | 5   | 2.303mb +0.04% | 3.400568ops/μs -0.25%  | ±3.36% +22.98%    |
| ForLoopBench           | benchPhpForOverRange                   |     | 1000 | 5   | 2.303mb +0.04% | 0.209962ops/μs +5.07%  | ±2.41% -30.93%    |
| MultiDimArrayBench     | benchZephirBuildMatrix                 |     | 1000 | 5   | 2.303mb +0.04% | 0.050475ops/μs +2.68%  | ±0.87% +29.69%    |
| MultiDimArrayBench     | benchPhpBuildMatrix                    |     | 1000 | 5   | 2.303mb +0.04% | 0.066944ops/μs +0.43%  | ±2.90% -58.80%    |
| VariadicBench          | benchZephirVariadicNarrow              |     | 1000 | 5   | 2.303mb +0.04% | 0.063787ops/μs +5.93%  | ±0.51% -62.19%    |
| VariadicBench          | benchZephirVariadicWide                |     | 1000 | 5   | 2.303mb +0.04% | 0.040696ops/μs +4.58%  | ±0.43% -28.28%    |
| VariadicBench          | benchZephirFuncGetArgs                 |     | 1000 | 5   | 2.303mb +0.04% | 0.065954ops/μs +0.13%  | ±3.03% +578.72%   |
| VariadicBench          | benchPhpVariadic                       |     | 1000 | 5   | 2.303mb +0.04% | 0.089920ops/μs +0.30%  | ±0.44% +29.39%    |
| OptimizerDispatchBench | benchAcos                              |     | 1000 | 10  | 2.303mb +0.04% | 0.242552ops/μs +0.37%  | ±1.00% -87.71%    |
| OptimizerDispatchBench | benchCountOptimized                    |     | 1000 | 10  | 2.303mb +0.04% | 0.103389ops/μs -12.49% | ±0.33% -82.43%    |
| OptimizerDispatchBench | benchCountPhp                          |     | 1000 | 10  | 2.303mb +0.04% | 0.010591ops/μs -1.57%  | ±3.42% +307.03%   |
| OptimizerDispatchBench | benchCountUnoptimized                  |     | 1000 | 10  | 2.303mb +0.04% | 0.005730ops/μs -1.65%  | ±1.62% +46.96%    |
| OptimizerDispatchBench | benchImplodeOptimized                  |     | 1000 | 10  | 2.303mb +0.04% | 0.003055ops/μs -7.79%  | ±1.35% -13.33%    |
| OptimizerDispatchBench | benchImplodeUnoptimized                |     | 1000 | 10  | 2.303mb +0.04% | 0.001968ops/μs -10.18% | ±5.49% +31.84%    |
| GeneratorBench         | benchZephirGeneratorConsume            |     | 1000 | 5   | 2.303mb +0.04% | 0.228816ops/μs +0.99%  | ±1.11% -79.31%    |
| GeneratorBench         | benchZephirArrayConsume                |     | 1000 | 5   | 2.303mb +0.04% | 1.433593ops/μs -3.58%  | ±2.40% -29.46%    |
| GeneratorBench         | benchZephirGeneratorRelayConsume       |     | 1000 | 5   | 2.303mb +0.04% | 0.194971ops/μs +0.90%  | ±0.88% +24.79%    |
| GeneratorBench         | benchPhpGeneratorConsume               |     | 1000 | 5   | 2.303mb +0.04% | 0.641995ops/μs +0.06%  | ±1.62% +30.19%    |
| GeneratorBench         | benchPhpArrayConsume                   |     | 1000 | 5   | 2.303mb +0.04% | 1.160604ops/μs -0.05%  | ±0.67% -74.20%    |
| GeneratorBench         | benchPhpArrayIteratorConsume           |     | 1000 | 5   | 2.303mb +0.04% | 0.781021ops/μs -0.42%  | ±1.23% -48.74%    |
| GeneratorBench         | benchZephirGeneratorCreate             |     | 1000 | 5   | 2.303mb +0.04% | 13.239714ops/μs -1.29% | ±10.85% +101.90%  |
| GeneratorBench         | benchZephirArrayCreate                 |     | 1000 | 5   | 2.303mb +0.04% | 0.034145ops/μs +2.21%  | ±3.75% +73.66%    |
| GeneratorBench         | benchPhpGeneratorCreate                |     | 1000 | 5   | 2.303mb +0.04% | 12.034289ops/μs +3.44% | ±5.67% -5.60%     |
| GeneratorBench         | benchZephirSumViaGenerator             |     | 1000 | 5   | 2.303mb +0.04% | 0.075683ops/μs +0.01%  | ±0.35% -51.85%    |
| GeneratorBench         | benchZephirSumViaArray                 |     | 1000 | 5   | 2.303mb +0.04% | 1.906453ops/μs +0.63%  | ±3.00% +75.99%    |
| GeneratorBench         | benchPhpSumViaGenerator                |     | 1000 | 5   | 2.303mb +0.04% | 0.586714ops/μs +0.59%  | ±2.81% +182.62%   |
| GeneratorBench         | benchZephirGeneratorConsumeLarge       |     | 50   | 5   | 2.303mb +0.04% | 0.002401ops/μs +1.93%  | ±0.37% +71.13%    |
| GeneratorBench         | benchZephirArrayConsumeLarge           |     | 50   | 5   | 2.303mb +0.04% | 0.016174ops/μs +1.60%  | ±1.10% +116.55%   |
| GeneratorBench         | benchPhpGeneratorConsumeLarge          |     | 50   | 5   | 2.303mb +0.04% | 0.007365ops/μs +0.10%  | ±9.91% +291.23%   |
| GeneratorBench         | benchPhpArrayConsumeLarge              |     | 50   | 5   | 2.303mb +0.04% | 0.013811ops/μs -0.83%  | ±1.11% +52.55%    |
| ArrayAddAssignBench    | benchZephirUnionLiteral                |     | 500  | 5   | 2.303mb +0.04% | 0.081478ops/μs +2.00%  | ±0.94% +92.96%    |
| ArrayAddAssignBench    | benchPhpUnionLiteral                   |     | 500  | 5   | 2.303mb +0.04% | 0.156124ops/μs +1.26%  | ±1.37% +255.83%   |
| ArrayAddAssignBench    | benchZephirUnionVar                    |     | 500  | 5   | 2.303mb +0.04% | 0.169037ops/μs -2.85%  | ±1.56% +2.44%     |
| ArrayAddAssignBench    | benchPhpUnionVar                       |     | 500  | 5   | 2.303mb +0.04% | 0.155445ops/μs -0.92%  | ±1.09% +1.11%     |
| ArrayAddAssignBench    | benchZephirAccumulate                  |     | 500  | 5   | 2.303mb +0.04% | 0.320415ops/μs +1.23%  | ±0.70% -71.29%    |
| ArrayAddAssignBench    | benchPhpAccumulate                     |     | 500  | 5   | 2.303mb +0.04% | 0.278807ops/μs -0.04%  | ±2.72% +39.78%    |
| MethodCallBench        | benchZephirMethodDispatch              |     | 500  | 5   | 2.303mb +0.04% | 0.163784ops/μs -0.99%  | ±0.48% -40.66%    |
| MethodCallBench        | benchPhpMethodDispatch                 |     | 500  | 5   | 2.303mb +0.04% | 0.592703ops/μs -2.54%  | ±2.39% +70.42%    |
| PropertyAccessBench    | benchZephirPropertyRead                |     | 500  | 5   | 2.303mb +0.04% | 1.192198ops/μs -8.53%  | ±10.21% -22.00%   |
| PropertyAccessBench    | benchPhpPropertyRead                   |     | 500  | 5   | 2.303mb +0.04% | 0.855081ops/μs -0.57%  | ±0.61% -55.63%    |
+------------------------+----------------------------------------+-----+------+-----+----------------+------------------------+-------------------+

PHP 8.3 on Linux (X64). Micro-benchmarks are noisy on shared runners (±5-20% per subject); treat any single-digit delta as inconclusive.

@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 3.12500% with 62 lines in your changes missing coverage. Please review.
✅ Project coverage is 30.77%. Comparing base (ba8635f) to head (aaf8b38).
⚠️ Report is 2 commits behind head on development.

Additional details and impacted files
@@               Coverage Diff               @@
##           development    #2678      +/-   ##
===============================================
- Coverage        30.98%   30.77%   -0.22%     
===============================================
  Files              308      308              
  Lines            29199    29414     +215     
===============================================
+ Hits              9047     9051       +4     
- Misses           20152    20363     +211     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Jeckerson
Jeckerson merged commit 594e50a into development Aug 31, 2026
37 of 38 checks passed
@Jeckerson
Jeckerson deleted the #2666-fix-long branch August 31, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

long/ulong truncate on Windows because they map to C long (32-bit under LLP64)

2 participants