The flag checks that translate `break N` / `continue N` were emitted only
at the end of each enclosing loop body. After the inner construct exited
with the countdown flag set, every trailing statement of the enclosing
body still executed before the check ran:
foreach ([1] as $x) {
foreach ([1] as $y) { break 2; }
echo "leaked"; // ran in compiled output, not in PHP
}
The native (int-typed) switch path was worse: its check sat inside the
do-while(0) wrapper, decrementing the flag a second time for the switch
level the C++ `break` had already exited. A `break 2` from a native
switch inside a loop therefore never exited the loop at all.
Emit the propagation check immediately after every nested loop / switch
statement instead, from the statement dispatcher, and drop the dead
end-of-body emissions. The check now also distinguishes the enclosing
construct: when it sits inside a switch, a continue that lands on the
switch level lowers to `break`, matching PHP's continue-targets-switch
semantics.
parseBreak/parseContinue now reject levels exceeding the number of
enclosing breakable constructs - the same compile-time validation PHP
performs (`Cannot 'break' 2 levels`) - which the countdown scheme
relies on to terminate at an enclosing construct.
The continue-2-while scenario in break-continue-level.phpt encoded the
old leaked behavior: its `$i++` after the inner loop only ran because of
the misplaced check; standard PHP loops forever on it. The counter now
advances before the inner loop.
- Removed unnecessary null check for left and right types in binary operation detection
- Eliminated redundant null check for closure statements before global collection
- Simplified type checking logic by relying on subsequent primitive type validation
- Improved code flow by removing early returns that were masking actual logic
- Remove gen_rdata.php script that generated randomized function mappings
- Remove ignore_constants.php file containing system constants filter list
- Delete entire bin directory with PHP utility scripts for data generation
- Remove automated PHP extension function scanning functionality
- Remove constants filtering mechanism for predefined system constants
- Clean up unused configuration generation
- Update project.yml version from 0.1.0 to 0.6.6
- Update project.yml file-version from 0.6.5.1112 to 0.6.6.1112
- Update project.yml product-version from 0.6.5 to 0.6.6
- Update Translator.php VERSION constant from 0.6.5 to 0.6.6
When generating arginfo for union/intersection types with 2+ class types,
the ZEND_TYPE_INIT_CLASS macro was using toEscapedName() which preserves
backslashes (e.g. yuandian\\Database\\Db\\Expression\\Raw), but
C identifiers cannot contain backslashes.
This caused compilation errors like:
error: stray '\' in program
Fix: use toVarEscapedName() which replaces namespace separators with
underscores, consistent with the single-class-type branch (line 2901).
- Updated file-version in project.yml from 0.6.3.1112 to 0.6.5.1112
- Updated product-version in project.yml from 0.6.3 to 0.6.5
- Updated VERSION constant in Translator.php from 0.6.1 to 0.6.5
- Moved mpdecimal DLL copying to after phpx target creation on Windows
- Fixed timing issue where post-build commands were registered too early
- Updated GitHub repository URL in JNI tutorial documentation
- Added new Windows build workflow with proper PHP SDK setup
- Implemented vcpkg integration for GMP and MPFR libraries on Windows
- Added mpdecimal build step in Windows CI workflow
- Configured PHPX build with proper
chore(tests): preserve generated C++ sources for CI artifacts
- Remove copilot instructions file that was causing confusion
- Add logic to copy generated .cc and .h files when PHPT tests fail
- Set up TYPEPHP_PHPT_GENERATED_ARTIFACT_DIR environment variable in CI
- Include generated source files in uploaded artifacts for debugging
- Replace curl extension with embed extension in workflow configuration
- Remove explicit PHP embed library installation from CI steps
- Update PHPT runner to use bootstrap compiler via --compiler flag
```
- Removed custom setup-php-apt action that installed PHP from Ondrej PPA
- Switched to using shivammathur/setup-php@v2 community action
- Updated workflow jobs to use ubuntu-latest instead of ubuntu-24.04
- Configured PHP extensions (curl, redis, mbstring, ffi) via setup action
- Set PHP ini values through action configuration including FFI enable,
memory limits, and error reporting settings
- Updated PHP embed library installation
- Removed --compiler ./tpc flag from run-tests.php command
- Fixed test execution to use default compiler instead of bootstrap compiler
- Updated workflow to properly handle compiler tests without explicit compiler path
- Replace hardcoded package list with dynamic array that checks OPcache availability
- Add conditional logic to install OPcache only when available in PPA for target PHP version
- Modify phpenmod command to conditionally enable OPcache based on config file existence
- Update extension verification script to check OPcache presence conditionally
- Remove OPcache from mandatory extensions list in validation check
- Add warning message when OPcache is not available for specific PHP version
- Replace shivammathur/setup-php@v2 with custom setup-php-apt action
- Update all workflow jobs to use ubuntu-24.04 runner
- Create new composite action for installing PHP from Ondrej PPA
- Simplify PHP configuration by using predefined ini settings
- Remove redundant apt-get update commands in build steps
- Update PHP embed library configuration and linking
- Fix ldd command regex pattern for libphp.so detection
- Standardize PHP INI directory paths across all workflows
- Remove unused PHP_INI_SCAN_DIR environment variable exports
- Removed embed extension from PHP extensions list in workflow configuration
- Added explicit installation of version-matched PHP embed library using apt-get
- Implemented version verification script to ensure embed package matches PHP version
- Created symbolic links for PHP embed library with proper path configuration
- Updated environment variables to include PHP embed library path in LD_LIBRARY_PATH
- Added ldd command to verify libphp.so linking in bootstrap compiler step
- Removed file reading logic from leibniz.cpp and hardcoded rounds as 100000000u + 2u
- Removed fs module import and file reading from leibniz.js, replaced with constant 10000000
- Removed file reading code from pi.go and hardcoded rounds as 100000000
- Removed file reading from pi.php and replaced with hardcoded value 10000000
- Deleted rounds.txt file that contained the input value
- Updated version numbers in project.yml from 0.1.0.1052/0.1.0 to 0.6.3.1112/0.6.3
- Removed package.json and package-lock.json files with node dependencies
- Completely redesigned README structure with English and Chinese versions
- Added detailed explanation of TypePHP as an AOT compiler for PHP
- Documented core features including native type system, high-precision numerics, and typed containers
- Included comparison table showing benefits over traditional PHP execution models
- Provided comprehensive installation instructions and requirements
- Added quick start examples with code samples for different use cases
- Documented all three compilation modes (binary, extension, library)
- Included benchmark results demonstrating performance improvements
- Added detailed command line options and parameter
- Add empty ini directory placeholders for test isolation
- Set PHP_INI_SCAN_DIR environment in include_require and python tests
- Replace no-leak.ini with descriptive comment for dedicated configuration
- Modify ref-call-arg.phpt to use temporary files instead of fixed paths
- Add ZipArchive operations in ref-call-arg.phpt for proper test data generation
- Update expected output values in ref-call-arg.phpt test results
- Add display_startup_errors=1 to php ini-values in workflow configuration
- Enable opcache.jit=0 setting in workflow configuration for consistency
- Increase
- Remove TYPEPHP_PROJECT_NAME and TYPEPHP_RUNTIME_EXPORTS from common compile options
- Add dedicated getProjectRuntimeEntryCompileCommandOptions method for project-specific defines
- Update testEmbeddedCompileOptionsPassProjectNameForModuleAccessor to reflect new behavior
- Create new testProjectRuntimeEntryHasTargetDefineWithoutPchOrObjectCache
- Add testProjectIndependentMiscObjectsUseSharedCacheScope and testProjectIndependentMiscObjectCacheSurvivesTargetNameChange
- Update composer.json to use swoole/phpx ~2.6.4
- Modify object file caching logic to handle project-specific vs shared misc objects
- Add isProjectRuntimeEntryFile helper method for determining cache scope
- Update compileFile method to use source-specific compile options
- Handle different PHPX runtime source file layouts during embed mode builds
- Added phpy.enable_operator_overloading=0 to ini-values in workflow configuration
- Applied the setting to both PHP version matrix configurations in tests.yml
- Maintained existing PHP settings while adding the new operator overloading parameter
- Added precision=17 setting to all PHP configurations
- Increased memory limit to 4GB for all test environments
- Updated error reporting to show errors and warnings only
- Enabled display of errors in console output
- Disabled error logging to prevent interference with tests
- Applied consistent configuration across all PHP version matrices