diff --git a/.github/workflows/build-unix.yml b/.github/workflows/build-unix.yml index 1c358e03d..f2d137781 100644 --- a/.github/workflows/build-unix.yml +++ b/.github/workflows/build-unix.yml @@ -124,13 +124,6 @@ jobs: restore-keys: | ${{ runner.os }}-composer- - - name: Setup Composer Token - run: | - # To increase the GitHub rate limit we're use GitHub authentication - if [ ! -z '${{ secrets.COMPOSER_TOKEN }}' ]; then - composer config github-oauth.github.com ${{ secrets.COMPOSER_TOKEN }} - fi - - name: Install Project Dependencies for PHP run: composer install --prefer-dist --no-interaction --no-ansi --no-progress --no-suggest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf86ed37d..03cc64f2b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Setup Environment Variables - run: echo "BOX_VERSION=3.10.0" >> $GITHUB_ENV + run: echo "BOX_VERSION=3.12.2" >> $GITHUB_ENV - name: Checkout Code uses: actions/checkout@v2 @@ -38,13 +38,6 @@ jobs: restore-keys: | ${{ runner.os }}-composer- - - name: Setup GitHub Token - run: | - # To increase the GitHub rate limit we're use GitHub authentication - if [ ! -z '${{ secrets.COMPOSER_TOKEN }}' ]; then - composer config github-oauth.github.com ${{ secrets.COMPOSER_TOKEN }} - fi - - name: Install Project Dependencies run: composer install --prefer-dist --no-interaction --no-ansi --no-progress --no-suggest diff --git a/.gitignore b/.gitignore index f658a947d..e0854891d 100644 --- a/.gitignore +++ b/.gitignore @@ -31,9 +31,11 @@ box.json phpcs.xml phpmd.xml phpunit.xml +.phpunit.result.cache # Build artefact zephir.phar +box.phar # Ignore codecoverage stuff. *.profraw @@ -44,3 +46,4 @@ zephir.phar # Use this as your own wish list or a temporary buffer LATER php-zephir-parser/ + diff --git a/CHANGELOG.md b/CHANGELOG.md index f1bacee3f..b445eceb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org). ## [Unreleased] +## [0.13.5] - 2021-05-09 +### Fixed +- Fixed `zephir build` command [#2240](https://github.com/zephir-lang/zephir/pull/2240) +- Fixed `zephir generate` when processing Closure [#2241](https://github.com/zephir-lang/zephir/pull/2241) +- Fixed stubs generation with variable-length argument [#2239](https://github.com/zephir-lang/zephir/issues/2239) + + ## [0.13.4] - 2021-04-26 ### Fixed - Fixed cast string from null [#2232](https://github.com/zephir-lang/zephir/issues/2232) @@ -23,6 +30,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). ### Added - Added support syntax assign-bitwise operators [#1103](https://github.com/zephir-lang/zephir/issues/1103) + ## [0.13.2] - 2021-04-10 ### Fixed - Fixed default value of nullable string parameter [#2180](https://github.com/zephir-lang/zephir/issues/2180) @@ -30,6 +38,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Fix `uint` cast to `unsigned int` in function params [#812](https://github.com/zephir-lang/zephir/issues/812) - Fixed `null` strict check when variable is `string` type [#2186](https://github.com/zephir-lang/zephir/issues/2186) + ## [0.13.1] - 2021-03-31 ### Added - Added jobs `-j, --jobs` option for `zephir compile` [#2174](https://github.com/zephir-lang/zephir/issues/2174) @@ -38,6 +47,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Fixed not used arginfo for interface static method without parameters (PHP `>= 8.0` only) [#2178](https://github.com/zephir-lang/zephir/pull/2178) - Fixed `zephir install` command [#2175](https://github.com/zephir-lang/zephir/issues/2175) + ## [0.13.0] - 2021-03-25 ### Added - Added support of PHP `8.0` [#2111](https://github.com/zephir-lang/zephir/pull/2111), [#2165](https://github.com/zephir-lang/zephir/pull/2165) @@ -51,10 +61,12 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Fixed parameters type detection in methods/functions (PHP `>= 8.0` only) - Fixed not adding all build directories [#2144](https://github.com/zephir-lang/zephir/pull/2144) + ## [0.12.21] - 2021-03-05 ### Fixed - Fixed path separators in generated `config.m4` file on Windows [#2153](https://github.com/zephir-lang/zephir/issues/2153) + ## [0.12.20] - 2020-12-16 ### Added - Added supports void type return value for stubs @@ -66,6 +78,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Fixed stubs generation for case with array declaration with square brackets in params - Fixed parameters positioning for `implode()` php function [#2120](https://github.com/zephir-lang/zephir/issues/2120) + ## [0.12.19] - 2020-05-13 ### Fixed - Fixed duplicate definition with GCC 10 @@ -78,6 +91,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Improved stubs generation for methods which may return object or null [#2092](https://github.com/zephir-lang/zephir/issues/2092) + ## [0.12.18] - 2020-04-25 ### Fixed - In some cases for C "control characters" aren't properly escaped @@ -88,6 +102,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). [phalcon/cphalcon#14810](https://github.com/phalcon/cphalcon/issues/14810), [phalcon/cphalcon#14766](https://github.com/phalcon/cphalcon/issues/14766) + ## [0.12.17] - 2020-02-14 ### Fixed - On some platforms special alpha characters aren't correctly escaped. @@ -97,6 +112,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Changed the internal DI environment mode when compile PHAR [#2049](https://github.com/zephir-lang/zephir/pull/2049) + ## [0.12.16] - 2020-01-16 ### Fixed - Do not dump config file if config was changed. @@ -122,14 +138,17 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Improved type hint for arrays when generating stubs [#2026](https://github.com/zephir-lang/zephir/issues/2026) + ## [0.12.15] - 2019-12-12 ### Removed - Removed `uint` typedef usage + ## [0.12.14] - 2019-12-11 ### Removed - Removed `zend_uint` typedef usage + ## [0.12.13] - 2019-12-08 ### Fixed - Fixed PHP 7.4 support for macOS [phalcon/cphalcon#14577](https://github.com/phalcon/cphalcon/issues/14577) @@ -137,6 +156,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). ### Removed - Removed `uint` and `ulong` typedefs usage + ## [0.12.12] - 2019-11-25 ### Added - Option to set banner for stubs generator @@ -157,6 +177,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Fixed incorrect stubs generation for classes in the same namespace [#2016](https://github.com/zephir-lang/zephir/issues/2016) + ## [0.12.11] - 2019-11-02 ### Fixed - Fixed arithmetical operations with `zvals` which stores `double` numbers @@ -171,6 +192,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Fixed incorrect namespace on type hinted return when generating API docs [#1229](https://github.com/zephir-lang/zephir/issues/1229) + ## [0.12.10] - 2019-10-19 ### Fixed - Fixed incorrect behavior in `zephir_get_global` if `zval` reference count <= 1 @@ -189,6 +211,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Introduced support of multi line `@param` body for generated stubs [#1968](https://github.com/zephir-lang/zephir/issues/1968) + ## [0.12.9] - 2019-10-14 ### Added - Added a single hyphen version of `dumpversion` option (just `-dumpversion`) @@ -214,6 +237,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). ### Removed - Removed no longer used `zephir_dtor` macro + ## [0.12.8] - 2019-10-03 ### Fixed - Fixed `zephir_preg_match` to use `ZVAL_NULL` instead of `ZEPHIR_NULL` @@ -221,6 +245,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Fixed `Extension\InternalClassesTest` test to be able run full test suite without Phalcon [#1949](https://github.com/zephir-lang/zephir/issues/1949) + ## [0.12.7] - 2019-10-03 ### Fixed - Fixed regression introduced in `0.12.5` for those users who doesn't use @@ -229,11 +254,13 @@ and this project adheres to [Semantic Versioning](http://semver.org). [#1940](https://github.com/zephir-lang/zephir/issues/1940) - Fixed sitemap API generator [#1940](https://github.com/zephir-lang/zephir/issues/1940) + ## [0.12.6] - 2019-10-03 ### Fixed - Fixed regression introduced in `0.12.5` for those users who doesn't use bundled `ext/json/php_json.h` [#1940](https://github.com/zephir-lang/zephir/issues/1940) + ## [0.12.5] - 2019-10-02 ### Changed - Update `zend_update_static_property` to be compatible with PHP >= 7.3 @@ -251,10 +278,12 @@ and this project adheres to [Semantic Versioning](http://semver.org). [#1934](https://github.com/zephir-lang/zephir/issues/1934), [phalcon/cphalcon#14426](https://github.com/phalcon/cphalcon/issues/14426) + ## [0.12.4] - 2019-09-22 ### Fixed - Fixed install template + ## [0.12.3] - 2019-09-22 ### Fixed - Fixed concatenation support of strings with `double` numbers @@ -264,6 +293,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Fixed updating array properties [#1915](https://github.com/zephir-lang/zephir/issues/1915) + ## [0.12.2] - 2019-08-05 ### Added - Introduced initial ability to generate `zend_module_deps` @@ -274,6 +304,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). ### Changed - Write errors compiler to stderr if available + ## [0.12.1] - 2019-07-30 ### Added - Added initial bash completion support (see `zephir-autocomplete` file) @@ -297,6 +328,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Fixed modifying array values in loops [#1879](https://github.com/zephir-lang/zephir/issues/1879) + ## [0.12.0] - 2019-06-20 ### Added - Added initial support of "use" keyword in closures @@ -325,6 +357,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Fixed exception on call undefined method [#1863](https://github.com/zephir-lang/zephir/issues/1863) + ## [0.11.12] - 2019-03-24 ### Fixed - Compilation error for instanceof [#1828](https://github.com/zephir-lang/zephir/issues/1828) @@ -333,6 +366,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Fixed reference counting while changing object's properties that are arrays [#1833](https://github.com/zephir-lang/zephir/pull/1833) + ## [0.11.11] - 2019-02-26 ### Fixed - Objects are not traversable with `foreach` @@ -341,6 +375,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Recursion for array_push on PHP 7 [#1140](https://github.com/zephir-lang/zephir/issues/1140) - Invalid array initialization [#1159](https://github.com/zephir-lang/zephir/issues/1159) + ## [0.11.10] - 2019-02-23 ### Changed - Moved internal cache and logs to the user's home directory. @@ -361,9 +396,11 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Fixed incorrect behavior during work with ArrayAccess [#1061](https://github.com/zephir-lang/zephir/issues/1061), [#1400](https://github.com/zephir-lang/zephir/issues/1400) + ## [0.11.9] - 2019-01-15 - Fixed `zend_closure` declaration to reflect PHP 7.3 changes + ## [0.11.8] - 2018-12-01 ### Fixed - Fixed compilation error with inheritance of prototype interfaces @@ -371,6 +408,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Fixed compilation error when a new file is added or removed to the project [#1776](https://github.com/zephir-lang/zephir/issues/1776) + ## [0.11.7] - 2018-11-27 ### Changed - The cache directory, formerly known as `.temp`, used for temporary operations was moved to @@ -386,6 +424,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). ### Fixed - Fixed incorrect behavior of `func_get_arg` and `func_get_args` functions for PHP 7.3 + ## [0.11.6] - 2018-11-19 ### Fixed - Fixed incorrect behavior of `require` statement for ZendEngine3 @@ -393,6 +432,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). [#1403](https://github.com/zephir-lang/zephir/issues/1403) [#1428](https://github.com/zephir-lang/zephir/pull/1428) + ## [0.11.4] - 2018-11-18 ### Added - Introduced a brand new CLI interface @@ -409,6 +449,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Fixed regression introduced in the 0.10.12 related to `require` file using protocols [#1713](https://github.com/zephir-lang/zephir/issues/1713) + ## [0.11.3] - 2018-11-13 ### Changed - Remove legacy installers and provide a common way to install Zephir @@ -418,6 +459,7 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Install as a Git clone (using `git clone` and `composer install` inside cloned project) - Install as a project's dependency (using `composer require`) + ## [0.11.2] - 2018-11-11 ### Added - Introduced an ability to pack project into one `zephir.phar` file (for PHP 7.1 and later) @@ -432,20 +474,24 @@ and this project adheres to [Semantic Versioning](http://semver.org). ### Fixed - Correct return types hint check + ## [0.11.1] - 2018-10-19 ### Added - Initial support of PHP 7.3 (ported from the 0.10.x branch) + ## [0.11.0] - 2018-08-05 ### Added - Add type hints for scalar arguments and return values in ZendEngine 3 [1656](https://github.com/zephir-lang/zephir/issues/1656) + ## [0.10.14] - 2018-11-20 ### Fixed - Fixed incorrect behavior of `func_get_arg` and `func_get_args` functions for PHP 7.3 (backported from the upstream) + ## [0.10.13] - 2018-11-18 ### Fixed - Fixed regression introduced in the 0.10.12 related to `require` file using protocols @@ -456,10 +502,12 @@ and this project adheres to [Semantic Versioning](http://semver.org). [#1428](https://github.com/zephir-lang/zephir/pull/1428) (backported from the upstream) + ## [0.10.12] - 2018-10-19 ### Added - Initial support of PHP 7.3 + ## [0.10.11] - 2018-08-05 ### Added - Allow extension to be loaded prior to the tests @@ -471,7 +519,9 @@ and this project adheres to [Semantic Versioning](http://semver.org). - Fixed casting resource to int (only ZendEngine 3) [#1524](https://github.com/zephir-lang/zephir/issues/1524) -[Unreleased]: https://github.com/zephir-lang/zephir/compare/0.13.4...HEAD + +[Unreleased]: https://github.com/zephir-lang/zephir/compare/0.13.5...HEAD +[0.13.5]: https://github.com/zephir-lang/zephir/compare/0.13.4...0.13.5 [0.13.4]: https://github.com/zephir-lang/zephir/compare/0.13.3...0.13.4 [0.13.3]: https://github.com/zephir-lang/zephir/compare/0.13.2...0.13.3 [0.13.2]: https://github.com/zephir-lang/zephir/compare/0.13.1...0.13.2 diff --git a/Library/ClassMethod.php b/Library/ClassMethod.php index 3a51f95ec..37daaadaa 100644 --- a/Library/ClassMethod.php +++ b/Library/ClassMethod.php @@ -2446,6 +2446,9 @@ private function detectClassNameEntry(string $className, CompilationContext $com $isAlias = false; $aliasManager = $this->classDefinition->getAliasManager(); + if (is_null($aliasManager)) { + return null; + } if ($aliasManager->isAlias($className)) { $isAlias = true; $className = $aliasManager->getAlias($className); diff --git a/Library/Console/Command/BuildCommand.php b/Library/Console/Command/BuildCommand.php index 979d002da..9e2740d65 100644 --- a/Library/Console/Command/BuildCommand.php +++ b/Library/Console/Command/BuildCommand.php @@ -43,6 +43,42 @@ protected function configure() protected function execute(InputInterface $input, OutputInterface $output) { + // call generate + $command = $this->getApplication()->find('generate'); + $io = new SymfonyStyle($input, $output); + + $arguments = [ + 'command' => 'generate', + '--backend' => $input->getOption('backend'), + ]; + + try { + $command->run(new ArrayInput($arguments), $output); + } catch (\Exception $e) { + $io->getErrorStyle()->error($e->getMessage()); + + return 1; + } + + // call compile + $command = $this->getApplication()->find('compile'); + $io = new SymfonyStyle($input, $output); + + $arguments = [ + 'command' => 'compile', + '--backend' => $input->getOption('backend'), + '--dev' => $this->isDevelopmentModeEnabled($input), + ]; + + try { + $command->run(new ArrayInput($arguments), $output); + } catch (\Exception $e) { + $io->getErrorStyle()->error($e->getMessage()); + + return 1; + } + + // call install $command = $this->getApplication()->find('install'); $io = new SymfonyStyle($input, $output); diff --git a/Library/Stubs/DocBlock.php b/Library/Stubs/DocBlock.php index 3b67eff8c..f6057dac0 100644 --- a/Library/Stubs/DocBlock.php +++ b/Library/Stubs/DocBlock.php @@ -9,8 +9,12 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + namespace Zephir\Stubs; +use function count; + /** * @author Gusakov Nikita */ @@ -19,27 +23,27 @@ class DocBlock /** * @var string */ - protected $indent; + protected string $indent; /** * @var string */ - protected $description = ''; + protected string $description = ''; /** * @var array */ - protected $lines = []; + protected array $lines = []; /** - * @param string $source Raw doc-block + * @param string|null $source Raw doc-block * @param string $indent Indent, 4 spaces by default */ - public function __construct($source, $indent = ' ') + public function __construct(?string $source, string $indent = ' ') { $this->indent = $indent; - $lines = explode("\n", trim($source)); - $count = \count($lines); + $lines = explode("\n", trim($source ?: '')); + $count = count($lines); foreach ($lines as $i => $line) { $line = preg_replace('#^([\s\t]+)?/?([*]+)([\s\t]+)?$#im', '', rtrim($line)); @@ -53,11 +57,11 @@ public function __construct($source, $indent = ' ') $cleaned = str_replace('$$', '$', $cleaned); if (0 === strpos($cleaned, '@')) { - $this->lines[] = $line = $cleaned; + $this->lines[] = $cleaned; } else { $line = preg_replace('#([\s\t]+)?[*]#', '', $line); $line = preg_replace('#([\s\t]+)?[*]([\s\t]){1,2}#', '$1* ', ' * '.$line); - $line = preg_replace('#[*]([\s\t]){1,}$#', '*', $line); + $line = preg_replace('#[*]([\s\t])+$#', '*', $line); $line = preg_replace('#\t#', $indent, $line); $this->lines[] = array_pop($this->lines)."\n{$this->indent}".$line; @@ -96,7 +100,7 @@ public function __construct($source, $indent = ' ') /** * @return string */ - public function __toString() + public function __toString(): string { $doc = ''; $indent = $this->indent; diff --git a/Library/Stubs/Generator.php b/Library/Stubs/Generator.php index db4feba6e..e68a1ed69 100644 --- a/Library/Stubs/Generator.php +++ b/Library/Stubs/Generator.php @@ -9,16 +9,23 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + namespace Zephir\Stubs; use Zephir\AliasManager; use Zephir\ClassConstant; use Zephir\ClassDefinition; use Zephir\ClassMethod; +use Zephir\ClassMethodParameters; use Zephir\ClassProperty; use Zephir\CompilerFile; use Zephir\Exception; +use function array_key_exists; +use function count; +use function in_array; + /** * Stubs Generator. */ @@ -29,7 +36,7 @@ class Generator * * @var array */ - protected $ignoreModifiers = [ + protected array $ignoreModifiers = [ 'inline', 'internal', 'scoped', @@ -39,7 +46,7 @@ class Generator /** * @var CompilerFile[] */ - protected $files; + protected array $files; /** * @param CompilerFile[] $files @@ -59,7 +66,7 @@ public function __construct(array $files) * * @throws Exception\LogicException */ - public function generate(string $namespace, string $path, string $indent, string $banner) + public function generate(string $namespace, string $path, string $indent, string $banner): void { if (empty($path)) { throw new Exception\LogicException( @@ -267,7 +274,7 @@ protected function buildMethod(ClassMethod $method, bool $isInterface, string $i $parameters = []; - if ($methodParameters) { + if ($methodParameters instanceof ClassMethodParameters) { foreach ($methodParameters->getParameters() as $parameter) { $paramStr = ''; if (isset($parameter['cast'])) { @@ -276,17 +283,18 @@ protected function buildMethod(ClassMethod $method, bool $isInterface, string $i } else { $cast = $parameter['cast']['value']; } + $paramStr .= $cast.' '; - } elseif (isset($parameter['data-type']) && 'array' == $parameter['data-type']) { + } elseif (isset($parameter['data-type']) && 'array' === $parameter['data-type']) { $paramStr .= 'array '; - } elseif (isset($parameter['data-type']) && version_compare(PHP_VERSION, '7.0.0', '>=')) { - if (\in_array($parameter['data-type'], ['bool', 'boolean'])) { + } elseif (isset($parameter['data-type'])) { + if (in_array($parameter['data-type'], ['bool', 'boolean'])) { $paramStr .= 'bool '; } elseif ('double' == $parameter['data-type']) { $paramStr .= 'float '; - } elseif (\in_array($parameter['data-type'], ['int', 'uint', 'long', 'ulong', 'uchar'])) { + } elseif (in_array($parameter['data-type'], ['int', 'uint', 'long', 'ulong', 'uchar'])) { $paramStr .= 'int '; - } elseif (\in_array($parameter['data-type'], ['char', 'string'])) { + } elseif (in_array($parameter['data-type'], ['char', 'string'])) { $paramStr .= 'string '; } } @@ -302,16 +310,10 @@ protected function buildMethod(ClassMethod $method, bool $isInterface, string $i } $return = ''; - /** - * TODO: Add $method->isVoid() check after removing PHP 7.0 support. - * - * @see https://github.com/zephir-lang/zephir/issues/1977 - * @see https://github.com/zephir-lang/zephir/pull/1978 - */ - if (version_compare(PHP_VERSION, '7.0.0', '>=') && $method->hasReturnTypes()) { + if ($method->hasReturnTypes()) { $supported = 0; - if (\array_key_exists('object', $method->getReturnTypes()) && 1 == \count($method->getReturnClassTypes())) { + if (array_key_exists('object', $method->getReturnTypes()) && 1 === count($method->getReturnClassTypes())) { $return = key($method->getReturnClassTypes()); ++$supported; } @@ -320,36 +322,36 @@ protected function buildMethod(ClassMethod $method, bool $isInterface, string $i $return = 'int'; ++$supported; } + if ($method->areReturnTypesDoubleCompatible()) { $return = 'float'; ++$supported; } + if ($method->areReturnTypesBoolCompatible()) { $return = 'bool'; ++$supported; } + if ($method->areReturnTypesStringCompatible()) { $return = 'string'; ++$supported; } - if (\array_key_exists('array', $method->getReturnTypes())) { + + if (array_key_exists('array', $method->getReturnTypes())) { $return = 'array'; ++$supported; } if (!empty($return) && $method->areReturnTypesNullCompatible()) { - if (version_compare(PHP_VERSION, '7.1.0', '>=')) { - $return = '?'.$return; - } else { - $return = ''; - } + $return = '?'.$return; } // PHP doesn't support multiple return types (yet?) if ($supported > 1) { $return = ''; } - } elseif (version_compare(PHP_VERSION, '7.1.0', '>=') && $method->isVoid()) { + } elseif ($method->isVoid()) { $return = 'void'; } @@ -391,7 +393,7 @@ protected function wrapPHPValue(array $parameter): string break; case 'empty-array': - $returnValue = 'array()'; + $returnValue = '[]'; break; case 'array': @@ -413,7 +415,7 @@ protected function wrapPHPValue(array $parameter): string ]); } - $returnValue = 'array('.implode(', ', $parameters).')'; + $returnValue = '['.implode(', ', $parameters).']'; break; case 'static-constant-access': @@ -435,6 +437,6 @@ protected function wrapPHPValue(array $parameter): string ); } - return $returnValue; + return (string)$returnValue; } } diff --git a/Library/Stubs/MethodDocBlock.php b/Library/Stubs/MethodDocBlock.php index 0ceaaf362..93184cc49 100644 --- a/Library/Stubs/MethodDocBlock.php +++ b/Library/Stubs/MethodDocBlock.php @@ -9,6 +9,8 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + namespace Zephir\Stubs; use Zephir\AliasManager; @@ -22,30 +24,51 @@ */ class MethodDocBlock extends DocBlock { - private $parameters = []; + private array $parameters = []; - /** Parameters which are described by User into docblock */ - private $predefinedParams = []; + /** + * Parameters which are described by User into docblock + * + * @var array + */ + private array $predefinedParams = []; - private $return; + /** + * @var array + */ + private array $return = []; - private $shortcutName = ''; + /** + * @var string|mixed + */ + private string $shortcutName; - private $deprecated = false; + /** + * @var bool + */ + private bool $deprecated; /** * @var AliasManager */ - private $aliasManager; - - /** @var ClassMethod */ - private $classMethod; + private AliasManager $aliasManager; - /** @var Types */ - private $types; + /** + * @var ClassMethod + */ + private ClassMethod $classMethod; - public function __construct(ClassMethod $method, AliasManager $aliasManager, $indent = ' ', Types $types = null) - { + /** + * @var Types + */ + private Types $types; + + public function __construct( + ClassMethod $method, + AliasManager $aliasManager, + string $indent = ' ', + ?Types $types = null + ) { parent::__construct($method->getDocBlock(), $indent); $this->deprecated = $method->isDeprecated(); @@ -74,7 +97,7 @@ public function processMethodDocBlock(): string return $this->__toString(); } - protected function parseMethodReturnType(ClassMethod $method) + protected function parseMethodReturnType(ClassMethod $method): void { $return = []; $returnTypes = $method->getReturnTypes(); @@ -152,7 +175,7 @@ protected function parseDocBlockParam(string $line): array return $matched; } - protected function parseLines() + protected function parseLines(): void { $lines = []; @@ -165,13 +188,15 @@ protected function parseLines() $description = $parsedLine['description'] ?? ''; $type = $parsedLine['type'] ?? ''; - // remember docblock @param to avoid param duplication when parse input args + // Remember docblock @param to avoid param duplication when parse input args. if ($identifier) { $this->predefinedParams[$identifier] = true; } - // remember docblock @return to avoid duplication - // also replace @var to @mixed for PHP docblock + /** + * Remember docblock `@return` to avoid duplication. + * Also replace `@var` to `@mixed` for PHP docblock. + */ if ('return' === $docType) { $this->predefinedParams['return'] = true; @@ -187,7 +212,7 @@ protected function parseLines() $line = str_replace('@var', '@param', $line); } - if ('var' == $docType && 'set' == $this->shortcutName) { + if ('var' === $docType && 'set' === $this->shortcutName) { $docType = 'param'; $name = array_keys($this->parameters); $name = $name[0]; @@ -212,7 +237,7 @@ protected function parseLines() $this->lines = $lines; } - private function appendReturnLine() + private function appendReturnLine(): void { if (!isset($this->predefinedParams['return'])) { list($type, $description) = $this->return; @@ -251,9 +276,13 @@ private function parseMethodParameters(ClassMethod $method) } } - private function appendParametersLines() + private function appendParametersLines(): void { foreach ($this->parameters as $name => $parameter) { + if (empty($name)) { + continue; + } + if (!isset($this->predefinedParams[trim($name, '$')])) { list($type, $description) = $parameter; diff --git a/Library/Zephir.php b/Library/Zephir.php index d748b845f..34ef7d883 100644 --- a/Library/Zephir.php +++ b/Library/Zephir.php @@ -16,7 +16,7 @@ */ final class Zephir { - const VERSION = '0.13.4-$Id$'; + const VERSION = '0.13.5-$Id$'; const LOGO = <<<'ASCII' _____ __ _ diff --git a/ext/php_stub.h b/ext/php_stub.h index ef4326c65..c63f94780 100644 --- a/ext/php_stub.h +++ b/ext/php_stub.h @@ -14,7 +14,7 @@ #define PHP_STUB_VERSION "1.0.0" #define PHP_STUB_EXTNAME "stub" #define PHP_STUB_AUTHOR "Phalcon Team and contributors" -#define PHP_STUB_ZEPVERSION "0.13.4-$Id$" +#define PHP_STUB_ZEPVERSION "0.13.5-$Id$" #define PHP_STUB_DESCRIPTION "Description test for
Test Extension." typedef struct _zephir_struct_db { diff --git a/ext/stub/builtin/intmethods.zep.c b/ext/stub/builtin/intmethods.zep.c index d22227e3c..b573864dc 100644 --- a/ext/stub/builtin/intmethods.zep.c +++ b/ext/stub/builtin/intmethods.zep.c @@ -311,13 +311,11 @@ PHP_METHOD(Stub_BuiltIn_IntMethods, getTan) PHP_METHOD(Stub_BuiltIn_IntMethods, getAsin) { - zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zval *num_param = NULL, _0, _1; - zend_long num, ZEPHIR_LAST_CALL_STATUS; + zval *num_param = NULL, _0; + zend_long num; zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - ZVAL_UNDEF(&_1); #if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) @@ -326,26 +324,21 @@ PHP_METHOD(Stub_BuiltIn_IntMethods, getAsin) #endif - ZEPHIR_MM_GROW(); - zephir_fetch_params(1, 1, 0, &num_param); + zephir_fetch_params_without_memory_grow(1, 0, &num_param); num = zephir_get_intval(num_param); ZVAL_LONG(&_0, num); - ZEPHIR_CALL_FUNCTION(&_1, "asin", NULL, 13, &_0); - zephir_check_call_status(); - RETURN_CCTOR(&_1); + RETURN_DOUBLE(asin(num)); } PHP_METHOD(Stub_BuiltIn_IntMethods, getAcos) { - zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zval *num_param = NULL, _0, _1; - zend_long num, ZEPHIR_LAST_CALL_STATUS; + zval *num_param = NULL, _0; + zend_long num; zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - ZVAL_UNDEF(&_1); #if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) @@ -354,15 +347,12 @@ PHP_METHOD(Stub_BuiltIn_IntMethods, getAcos) #endif - ZEPHIR_MM_GROW(); - zephir_fetch_params(1, 1, 0, &num_param); + zephir_fetch_params_without_memory_grow(1, 0, &num_param); num = zephir_get_intval(num_param); ZVAL_LONG(&_0, num); - ZEPHIR_CALL_FUNCTION(&_1, "acos", NULL, 14, &_0); - zephir_check_call_status(); - RETURN_CCTOR(&_1); + RETURN_DOUBLE(acos(num)); } PHP_METHOD(Stub_BuiltIn_IntMethods, getAtan) @@ -388,7 +378,7 @@ PHP_METHOD(Stub_BuiltIn_IntMethods, getAtan) ZVAL_LONG(&_0, num); - ZEPHIR_CALL_FUNCTION(&_1, "atan", NULL, 15, &_0); + ZEPHIR_CALL_FUNCTION(&_1, "atan", NULL, 13, &_0); zephir_check_call_status(); RETURN_CCTOR(&_1); } @@ -427,13 +417,13 @@ PHP_METHOD(Stub_BuiltIn_IntMethods, getLog) if (base == -1) { ZVAL_LONG(&_0$$3, num); - ZEPHIR_CALL_FUNCTION(&_1$$3, "log", NULL, 16, &_0$$3); + ZEPHIR_CALL_FUNCTION(&_1$$3, "log", NULL, 14, &_0$$3); zephir_check_call_status(); RETURN_CCTOR(&_1$$3); } ZVAL_LONG(&_2, num); ZVAL_LONG(&_3, base); - ZEPHIR_CALL_FUNCTION(&_4, "log", NULL, 16, &_2, &_3); + ZEPHIR_CALL_FUNCTION(&_4, "log", NULL, 14, &_2, &_3); zephir_check_call_status(); RETURN_CCTOR(&_4); } diff --git a/ext/stub/builtin/stringmethods.zep.c b/ext/stub/builtin/stringmethods.zep.c index 223e605c5..d24556460 100644 --- a/ext/stub/builtin/stringmethods.zep.c +++ b/ext/stub/builtin/stringmethods.zep.c @@ -438,7 +438,7 @@ PHP_METHOD(Stub_BuiltIn_StringMethods, getLowerFirst) zephir_get_strval(&str, str_param); - ZEPHIR_CALL_FUNCTION(&_0, "lcfirst", NULL, 17, &str); + ZEPHIR_CALL_FUNCTION(&_0, "lcfirst", NULL, 15, &str); zephir_check_call_status(); RETURN_CCTOR(&_0); } @@ -496,7 +496,7 @@ PHP_METHOD(Stub_BuiltIn_StringMethods, getFormatted) ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "hello %s!"); - ZEPHIR_CALL_FUNCTION(&_1, "sprintf", NULL, 18, &_0, &str); + ZEPHIR_CALL_FUNCTION(&_1, "sprintf", NULL, 16, &_0, &str); zephir_check_call_status(); RETURN_CCTOR(&_1); } @@ -551,7 +551,7 @@ PHP_METHOD(Stub_BuiltIn_StringMethods, getSha1) zephir_get_strval(&str, str_param); - ZEPHIR_CALL_FUNCTION(&_0, "sha1", NULL, 19, &str); + ZEPHIR_CALL_FUNCTION(&_0, "sha1", NULL, 17, &str); zephir_check_call_status(); RETURN_CCTOR(&_0); } @@ -579,7 +579,7 @@ PHP_METHOD(Stub_BuiltIn_StringMethods, getNl2br) zephir_get_strval(&str, str_param); - ZEPHIR_CALL_FUNCTION(&_0, "nl2br", NULL, 20, &str); + ZEPHIR_CALL_FUNCTION(&_0, "nl2br", NULL, 18, &str); zephir_check_call_status(); RETURN_CCTOR(&_0); } @@ -607,7 +607,7 @@ PHP_METHOD(Stub_BuiltIn_StringMethods, getParsedCsv) zephir_get_strval(&str, str_param); - ZEPHIR_CALL_FUNCTION(&_0, "str_getcsv", NULL, 21, &str); + ZEPHIR_CALL_FUNCTION(&_0, "str_getcsv", NULL, 19, &str); zephir_check_call_status(); RETURN_CCTOR(&_0); } @@ -676,7 +676,7 @@ PHP_METHOD(Stub_BuiltIn_StringMethods, getRepeatted) ZVAL_LONG(&_0, count); - ZEPHIR_CALL_FUNCTION(&_1, "str_repeat", NULL, 22, &str, &_0); + ZEPHIR_CALL_FUNCTION(&_1, "str_repeat", NULL, 20, &str, &_0); zephir_check_call_status(); RETURN_CCTOR(&_1); } @@ -704,7 +704,7 @@ PHP_METHOD(Stub_BuiltIn_StringMethods, getShuffled) zephir_get_strval(&str, str_param); - ZEPHIR_CALL_FUNCTION(&_0, "str_shuffle", NULL, 23, &str); + ZEPHIR_CALL_FUNCTION(&_0, "str_shuffle", NULL, 21, &str); zephir_check_call_status(); RETURN_CCTOR(&_0); } @@ -735,7 +735,7 @@ PHP_METHOD(Stub_BuiltIn_StringMethods, getSplited) zephir_get_strval(&del, del_param); - ZEPHIR_CALL_FUNCTION(&_0, "str_split", NULL, 24, &str, &del); + ZEPHIR_CALL_FUNCTION(&_0, "str_split", NULL, 22, &str, &del); zephir_check_call_status(); RETURN_CCTOR(&_0); } @@ -766,7 +766,7 @@ PHP_METHOD(Stub_BuiltIn_StringMethods, getCompare) zephir_get_strval(&right, right_param); - ZEPHIR_CALL_FUNCTION(&_0, "strcmp", NULL, 25, &left, &right); + ZEPHIR_CALL_FUNCTION(&_0, "strcmp", NULL, 23, &left, &right); zephir_check_call_status(); RETURN_CCTOR(&_0); } @@ -797,7 +797,7 @@ PHP_METHOD(Stub_BuiltIn_StringMethods, getCompareLocale) zephir_get_strval(&right, right_param); - ZEPHIR_CALL_FUNCTION(&_0, "strcoll", NULL, 26, &left, &right); + ZEPHIR_CALL_FUNCTION(&_0, "strcoll", NULL, 24, &left, &right); zephir_check_call_status(); RETURN_CCTOR(&_0); } @@ -825,7 +825,7 @@ PHP_METHOD(Stub_BuiltIn_StringMethods, getReversed) zephir_get_strval(&str, str_param); - ZEPHIR_CALL_FUNCTION(&_0, "strrev", NULL, 27, &str); + ZEPHIR_CALL_FUNCTION(&_0, "strrev", NULL, 25, &str); zephir_check_call_status(); RETURN_CCTOR(&_0); } @@ -853,7 +853,7 @@ PHP_METHOD(Stub_BuiltIn_StringMethods, getHtmlSpecialChars) zephir_get_strval(&str, str_param); - ZEPHIR_CALL_FUNCTION(&_0, "htmlspecialchars", NULL, 28, &str); + ZEPHIR_CALL_FUNCTION(&_0, "htmlspecialchars", NULL, 26, &str); zephir_check_call_status(); RETURN_CCTOR(&_0); } diff --git a/ext/stub/closures.zep.c b/ext/stub/closures.zep.c index ba175fc36..fd3274dbb 100644 --- a/ext/stub/closures.zep.c +++ b/ext/stub/closures.zep.c @@ -231,7 +231,7 @@ PHP_METHOD(Stub_Closures, issue1036Call) zephir_read_property(&_0, this_ptr, ZEND_STRL("_function"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_1, this_ptr, ZEND_STRL("_argument"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_RETURN_CALL_FUNCTION("call_user_func", NULL, 29, &_0, &_1); + ZEPHIR_RETURN_CALL_FUNCTION("call_user_func", NULL, 27, &_0, &_1); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/stub/exceptions.zep.c b/ext/stub/exceptions.zep.c index 3f45304d4..637687549 100644 --- a/ext/stub/exceptions.zep.c +++ b/ext/stub/exceptions.zep.c @@ -66,7 +66,7 @@ PHP_METHOD(Stub_Exceptions, testException2) ZVAL_STRING(&msg, "hello2"); ZEPHIR_INIT_VAR(&_0); object_init_ex(&_0, stub_exception_ce); - ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 30, &msg); + ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 28, &msg); zephir_check_call_status(); zephir_throw_exception_debug(&_0, "stub/exceptions.zep", 23); ZEPHIR_MM_RESTORE(); @@ -90,7 +90,7 @@ PHP_METHOD(Stub_Exceptions, testException3) ZVAL_STRING(&msg, "hello3"); ZEPHIR_INIT_VAR(&ex); object_init_ex(&ex, stub_exception_ce); - ZEPHIR_CALL_METHOD(NULL, &ex, "__construct", NULL, 30, &msg); + ZEPHIR_CALL_METHOD(NULL, &ex, "__construct", NULL, 28, &msg); zephir_check_call_status(); zephir_throw_exception_debug(&ex, "stub/exceptions.zep", 31); ZEPHIR_MM_RESTORE(); @@ -112,7 +112,7 @@ PHP_METHOD(Stub_Exceptions, getException) object_init_ex(return_value, stub_exception_ce); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "hello4"); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 30, &_0); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 28, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -153,7 +153,7 @@ PHP_METHOD(Stub_Exceptions, testException5) object_init_ex(&exception, stub_exception_ce); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "hello5"); - ZEPHIR_CALL_METHOD(NULL, &exception, "__construct", NULL, 30, &_0); + ZEPHIR_CALL_METHOD(NULL, &exception, "__construct", NULL, 28, &_0); zephir_check_call_status(); zephir_throw_exception_debug(&exception, "stub/exceptions.zep", 49); ZEPHIR_MM_RESTORE(); @@ -229,7 +229,7 @@ PHP_METHOD(Stub_Exceptions, testExceptionSprintf) ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "Hello, %s"); - ZEPHIR_CALL_FUNCTION(&_1, "sprintf", NULL, 18, &_0, &name); + ZEPHIR_CALL_FUNCTION(&_1, "sprintf", NULL, 16, &_0, &name); zephir_check_call_status(); zephir_throw_exception_debug(&_1, "stub/exceptions.zep", 68); ZEPHIR_MM_RESTORE(); @@ -442,7 +442,7 @@ PHP_METHOD(Stub_Exceptions, issue1325) /* try_start_1: */ - ZEPHIR_CALL_METHOD(&status, this_ptr, "donoopexception", NULL, 31); + ZEPHIR_CALL_METHOD(&status, this_ptr, "donoopexception", NULL, 29); zephir_check_call_status_or_jump(try_end_1); try_end_1: diff --git a/ext/stub/factorial.zep.c b/ext/stub/factorial.zep.c index b75a05a82..238f1ebb6 100644 --- a/ext/stub/factorial.zep.c +++ b/ext/stub/factorial.zep.c @@ -99,7 +99,7 @@ PHP_METHOD(Stub_Factorial, intRecursiveFactorial) ZVAL_LONG(&_0, 1); } else { ZVAL_LONG(&_3, (num - 1)); - ZEPHIR_CALL_METHOD(&_2, this_ptr, "intrecursivefactorial", NULL, 32, &_3); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "intrecursivefactorial", NULL, 30, &_3); zephir_check_call_status(); ZVAL_LONG(&_0, (num * zephir_get_numberval(&_2))); } diff --git a/ext/stub/fcall.zep.c b/ext/stub/fcall.zep.c index 90ec311d8..42ebc0121 100644 --- a/ext/stub/fcall.zep.c +++ b/ext/stub/fcall.zep.c @@ -97,18 +97,18 @@ PHP_METHOD(Stub_Fcall, testCall3) ZVAL_STRING(&_0, "inputfile.txt"); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "r"); - ZEPHIR_CALL_FUNCTION(&handle, "fopen", &_2, 33, &_0, &_1); + ZEPHIR_CALL_FUNCTION(&handle, "fopen", &_2, 31, &_0, &_1); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_0); ZVAL_STRING(&_0, "outputfile.txt"); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "w"); - ZEPHIR_CALL_FUNCTION(&handle2, "fopen", &_2, 33, &_0, &_1); + ZEPHIR_CALL_FUNCTION(&handle2, "fopen", &_2, 31, &_0, &_1); zephir_check_call_status(); if (zephir_is_true(&handle)) { while (1) { ZVAL_LONG(&_3$$4, 4096); - ZEPHIR_CALL_FUNCTION(&buffer, "fgets", &_4, 34, &handle, &_3$$4); + ZEPHIR_CALL_FUNCTION(&buffer, "fgets", &_4, 32, &handle, &_3$$4); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&buffer)) { break; @@ -143,18 +143,18 @@ PHP_METHOD(Stub_Fcall, testCall4) ZVAL_STRING(&_0, "r"); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "inputfile.txt"); - ZEPHIR_CALL_FUNCTION(&handle, "fopen", &_2, 33, &_0, &_1); + ZEPHIR_CALL_FUNCTION(&handle, "fopen", &_2, 31, &_0, &_1); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_0); ZVAL_STRING(&_0, "outputfile.txt"); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "w"); - ZEPHIR_CALL_FUNCTION(&handle2, "fopen", &_2, 33, &_0, &_1); + ZEPHIR_CALL_FUNCTION(&handle2, "fopen", &_2, 31, &_0, &_1); zephir_check_call_status(); if (zephir_is_true(&handle)) { while (1) { ZVAL_LONG(&_3$$4, 4096); - ZEPHIR_CALL_FUNCTION(&buffer, "fgets", &_4, 34, &handle, &_3$$4); + ZEPHIR_CALL_FUNCTION(&buffer, "fgets", &_4, 32, &handle, &_3$$4); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&buffer)) { break; @@ -189,7 +189,7 @@ PHP_METHOD(Stub_Fcall, testCall5) zephir_fetch_params(1, 2, 0, &a, &b); - ZEPHIR_RETURN_CALL_FUNCTION("str_repeat", NULL, 22, a, b); + ZEPHIR_RETURN_CALL_FUNCTION("str_repeat", NULL, 20, a, b); zephir_check_call_status(); RETURN_MM(); } @@ -204,7 +204,7 @@ PHP_METHOD(Stub_Fcall, testCall6) ZEPHIR_MM_GROW(); - ZEPHIR_RETURN_CALL_FUNCTION("rand", NULL, 35); + ZEPHIR_RETURN_CALL_FUNCTION("rand", NULL, 33); zephir_check_call_status(); RETURN_MM(); } @@ -219,7 +219,7 @@ PHP_METHOD(Stub_Fcall, testCall7) ZEPHIR_MM_GROW(); - ZEPHIR_CALL_FUNCTION(NULL, "memory_get_usage", NULL, 36); + ZEPHIR_CALL_FUNCTION(NULL, "memory_get_usage", NULL, 34); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -280,7 +280,7 @@ PHP_METHOD(Stub_Fcall, testCall8) zephir_fetch_params(1, 2, 0, &a, &b); - ZEPHIR_CALL_FUNCTION(&x, "str_repeat", NULL, 22, a, b); + ZEPHIR_CALL_FUNCTION(&x, "str_repeat", NULL, 20, a, b); zephir_check_call_status(); RETURN_CCTOR(&x); } @@ -342,7 +342,7 @@ PHP_METHOD(Stub_Fcall, testStrtokVarBySlash) ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "/"); - ZEPHIR_RETURN_CALL_FUNCTION("strtok", NULL, 37, value, &_0); + ZEPHIR_RETURN_CALL_FUNCTION("strtok", NULL, 35, value, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -536,7 +536,7 @@ PHP_FUNCTION(g_stub_zephir_global_method_test) { zephir_check_call_status(); } - ZEPHIR_RETURN_CALL_METHOD(&_0, "teststrtokvarbyslash", NULL, 38, str); + ZEPHIR_RETURN_CALL_METHOD(&_0, "teststrtokvarbyslash", NULL, 36, str); zephir_check_call_status(); RETURN_MM(); } @@ -586,7 +586,7 @@ PHP_FUNCTION(f_Stub_zephir_namespaced_method_test) { } ZVAL_LONG(&_1, 5); - ZEPHIR_RETURN_CALL_METHOD(&_0, "testcall5", NULL, 39, str, &_1); + ZEPHIR_RETURN_CALL_METHOD(&_0, "testcall5", NULL, 37, str, &_1); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/stub/fibonnaci.zep.c b/ext/stub/fibonnaci.zep.c index ca6139779..1fe26ec1b 100644 --- a/ext/stub/fibonnaci.zep.c +++ b/ext/stub/fibonnaci.zep.c @@ -185,10 +185,10 @@ PHP_METHOD(Stub_Fibonnaci, fibonacciRecursive) RETURN_MM_LONG(1); } else { ZVAL_LONG(&_1$$6, (n - 1)); - ZEPHIR_CALL_METHOD(&_0$$6, this_ptr, "fibonaccirecursive", &_2, 40, &_1$$6); + ZEPHIR_CALL_METHOD(&_0$$6, this_ptr, "fibonaccirecursive", &_2, 38, &_1$$6); zephir_check_call_status(); ZVAL_LONG(&_1$$6, (n - 2)); - ZEPHIR_CALL_METHOD(&_3$$6, this_ptr, "fibonaccirecursive", &_2, 40, &_1$$6); + ZEPHIR_CALL_METHOD(&_3$$6, this_ptr, "fibonaccirecursive", &_2, 38, &_1$$6); zephir_check_call_status(); zephir_add_function(return_value, &_0$$6, &_3$$6); RETURN_MM(); @@ -227,10 +227,10 @@ PHP_METHOD(Stub_Fibonnaci, fibonacciFinalRecursive) RETURN_MM_LONG(1); } else { ZVAL_LONG(&_1$$6, (n - 1)); - ZEPHIR_CALL_METHOD(&_0$$6, this_ptr, "fibonaccifinalrecursive", &_2, 41, &_1$$6); + ZEPHIR_CALL_METHOD(&_0$$6, this_ptr, "fibonaccifinalrecursive", &_2, 39, &_1$$6); zephir_check_call_status(); ZVAL_LONG(&_1$$6, (n - 2)); - ZEPHIR_CALL_METHOD(&_3$$6, this_ptr, "fibonaccifinalrecursive", &_2, 41, &_1$$6); + ZEPHIR_CALL_METHOD(&_3$$6, this_ptr, "fibonaccifinalrecursive", &_2, 39, &_1$$6); zephir_check_call_status(); zephir_add_function(return_value, &_0$$6, &_3$$6); RETURN_MM(); diff --git a/ext/stub/flow.zep.c b/ext/stub/flow.zep.c index 1976ab3a5..cc39ee4a7 100644 --- a/ext/stub/flow.zep.c +++ b/ext/stub/flow.zep.c @@ -775,13 +775,13 @@ PHP_METHOD(Stub_Flow, testWhileNextTest) array_init(&returnValue); while (1) { ZEPHIR_MAKE_REF(variable); - ZEPHIR_CALL_FUNCTION(&_0, "next", &_1, 42, variable); + ZEPHIR_CALL_FUNCTION(&_0, "next", &_1, 40, variable); ZEPHIR_UNREF(variable); zephir_check_call_status(); if (!(zephir_is_true(&_0))) { break; } - ZEPHIR_CALL_FUNCTION(&_2$$3, "current", &_3, 43, variable); + ZEPHIR_CALL_FUNCTION(&_2$$3, "current", &_3, 41, variable); zephir_check_call_status(); zephir_array_append(&returnValue, &_2$$3, PH_SEPARATE, "stub/flow.zep", 420); } @@ -815,11 +815,11 @@ PHP_METHOD(Stub_Flow, testWhileDoNextTest) ZEPHIR_INIT_VAR(&returnValue); array_init(&returnValue); do { - ZEPHIR_CALL_FUNCTION(&_0$$3, "current", &_1, 43, variable); + ZEPHIR_CALL_FUNCTION(&_0$$3, "current", &_1, 41, variable); zephir_check_call_status(); zephir_array_append(&returnValue, &_0$$3, PH_SEPARATE, "stub/flow.zep", 430); ZEPHIR_MAKE_REF(variable); - ZEPHIR_CALL_FUNCTION(&_2, "next", &_3, 42, variable); + ZEPHIR_CALL_FUNCTION(&_2, "next", &_3, 40, variable); ZEPHIR_UNREF(variable); zephir_check_call_status(); } while (zephir_is_true(&_2)); diff --git a/ext/stub/functions.zep.c b/ext/stub/functions.zep.c index 891d3f42f..26fb1e78a 100644 --- a/ext/stub/functions.zep.c +++ b/ext/stub/functions.zep.c @@ -47,7 +47,7 @@ PHP_METHOD(Stub_Functions, filterVar1) ZVAL_STRING(&ret, "0"); ZVAL_LONG(&_0, 259); ZVAL_LONG(&_1, 20480); - ZEPHIR_CALL_FUNCTION(&_2, "filter_var", NULL, 44, &ret, &_0, &_1); + ZEPHIR_CALL_FUNCTION(&_2, "filter_var", NULL, 42, &ret, &_0, &_1); zephir_check_call_status(); RETURN_MM_BOOL(ZEPHIR_IS_FALSE_IDENTICAL(&_2)); } @@ -74,7 +74,7 @@ PHP_METHOD(Stub_Functions, filterVar2) ZVAL_STRING(&ret, "0"); ZVAL_LONG(&_0, 259); ZVAL_LONG(&_1, 20480); - ZEPHIR_CALL_FUNCTION(&_2, "filter_var", NULL, 44, &ret, &_0, &_1); + ZEPHIR_CALL_FUNCTION(&_2, "filter_var", NULL, 42, &ret, &_0, &_1); zephir_check_call_status(); RETURN_MM_BOOL(ZEPHIR_IS_FALSE(&_2)); } diff --git a/ext/stub/globals/serverrequestfactory.zep.c b/ext/stub/globals/serverrequestfactory.zep.c index 5af6bfb50..315151b15 100644 --- a/ext/stub/globals/serverrequestfactory.zep.c +++ b/ext/stub/globals/serverrequestfactory.zep.c @@ -130,19 +130,19 @@ PHP_METHOD(Stub_Globals_ServerRequestFactory, load) if (!(ZEPHIR_IS_EMPTY(&_SERVER))) { ZEPHIR_CPY_WRT(&globalServer, &_SERVER); } - ZEPHIR_CALL_METHOD(&_0, this_ptr, "checknullarray", &_1, 45, &server, &globalServer); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "checknullarray", &_1, 43, &server, &globalServer); zephir_check_call_status(); ZEPHIR_CPY_WRT(&server, &_0); - ZEPHIR_CALL_METHOD(&_2, this_ptr, "checknullarray", &_1, 45, &files, &globalFiles); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "checknullarray", &_1, 43, &files, &globalFiles); zephir_check_call_status(); ZEPHIR_CPY_WRT(&files, &_2); - ZEPHIR_CALL_METHOD(&_3, this_ptr, "checknullarray", &_1, 45, &cookies, &globalCookies); + ZEPHIR_CALL_METHOD(&_3, this_ptr, "checknullarray", &_1, 43, &cookies, &globalCookies); zephir_check_call_status(); ZEPHIR_CPY_WRT(&cookies, &_3); - ZEPHIR_CALL_METHOD(&_4, this_ptr, "checknullarray", &_1, 45, &get, &globalGet); + ZEPHIR_CALL_METHOD(&_4, this_ptr, "checknullarray", &_1, 43, &get, &globalGet); zephir_check_call_status(); ZEPHIR_CPY_WRT(&get, &_4); - ZEPHIR_CALL_METHOD(&_5, this_ptr, "checknullarray", &_1, 45, &post, &globalPost); + ZEPHIR_CALL_METHOD(&_5, this_ptr, "checknullarray", &_1, 43, &post, &globalPost); zephir_check_call_status(); ZEPHIR_CPY_WRT(&post, &_5); zephir_create_array(return_value, 5, 0); diff --git a/ext/stub/instance.zep.c b/ext/stub/instance.zep.c index 0e6b05048..ab9430513 100644 --- a/ext/stub/instance.zep.c +++ b/ext/stub/instance.zep.c @@ -94,7 +94,7 @@ PHP_METHOD(Stub_Instance, testIssue1339) zephir_array_fast_append(¶meters, &_0); ZEPHIR_INIT_NVAR(&_0); object_init_ex(&_0, stub_arrayobject_ce); - ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 46); + ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 44); zephir_check_call_status(); zephir_array_fast_append(¶meters, &_0); ZEPHIR_INIT_NVAR(&_0); diff --git a/ext/stub/invoke.zep.c b/ext/stub/invoke.zep.c index c26084bdf..3a743f541 100644 --- a/ext/stub/invoke.zep.c +++ b/ext/stub/invoke.zep.c @@ -71,7 +71,7 @@ PHP_METHOD(Stub_Invoke, test) ZEPHIR_INIT_VAR(&func); object_init_ex(&func, stub_invoke_ce); - ZEPHIR_CALL_METHOD(NULL, &func, "__construct", NULL, 47); + ZEPHIR_CALL_METHOD(NULL, &func, "__construct", NULL, 45); zephir_check_call_status(); ZEPHIR_RETURN_CALL_ZVAL_FUNCTION(&func, NULL, 0); zephir_check_call_status(); diff --git a/ext/stub/issue2165/issue.zep.c b/ext/stub/issue2165/issue.zep.c index b12f0a575..720a3ce3b 100644 --- a/ext/stub/issue2165/issue.zep.c +++ b/ext/stub/issue2165/issue.zep.c @@ -66,7 +66,7 @@ PHP_METHOD(Stub_Issue2165_Issue, build) object_init_ex(return_value, stub_issue2165_issue_ce); ZVAL_BOOL(&_0, 1); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 48, &a, &_0); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 46, &a, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -142,11 +142,11 @@ PHP_METHOD(Stub_Issue2165_Issue, __construct) m = zephir_fast_count_int(&a); - ZEPHIR_CALL_FUNCTION(&_0, "current", NULL, 43, &a); + ZEPHIR_CALL_FUNCTION(&_0, "current", NULL, 41, &a); zephir_check_call_status(); n = zephir_fast_count_int(&_0); if (validate) { - ZEPHIR_CALL_FUNCTION(&_1$$3, "array_values", &_2, 49, &a); + ZEPHIR_CALL_FUNCTION(&_1$$3, "array_values", &_2, 47, &a); zephir_check_call_status(); ZEPHIR_CPY_WRT(&a, &_1$$3); zephir_is_iterable(&a, 0, "stub/issue2165/issue.zep", 46); @@ -165,13 +165,13 @@ PHP_METHOD(Stub_Issue2165_Issue, __construct) ZEPHIR_INIT_NVAR(&_7$$5); object_init_ex(&_7$$5, spl_ce_InvalidArgumentException); ZVAL_LONG(&_8$$5, n); - ZEPHIR_CALL_FUNCTION(&_9$$5, "strval", &_10, 50, &_8$$5); + ZEPHIR_CALL_FUNCTION(&_9$$5, "strval", &_10, 48, &_8$$5); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_11$$5); ZVAL_LONG(&_11$$5, zephir_fast_count_int(&rowA)); ZEPHIR_INIT_NVAR(&_12$$5); ZEPHIR_CONCAT_SSVSVSSVS(&_12$$5, "The number of columns", " must be equal for all rows, ", &_9$$5, " needed but ", &_11$$5, " given", " at row offset ", &i, "."); - ZEPHIR_CALL_METHOD(NULL, &_7$$5, "__construct", &_13, 51, &_12$$5); + ZEPHIR_CALL_METHOD(NULL, &_7$$5, "__construct", &_13, 49, &_12$$5); zephir_check_call_status(); zephir_throw_exception_debug(&_7$$5, "stub/issue2165/issue.zep", 33); ZEPHIR_MM_RESTORE(); @@ -185,7 +185,7 @@ PHP_METHOD(Stub_Issue2165_Issue, __construct) ZVAL_COPY(&valueA, _14$$4); _16$$6 = !(Z_TYPE_P(&valueA) == IS_LONG); if (_16$$6) { - ZEPHIR_CALL_FUNCTION(&_17$$6, "is_float", &_18, 52, &valueA); + ZEPHIR_CALL_FUNCTION(&_17$$6, "is_float", &_18, 50, &valueA); zephir_check_call_status(); _16$$6 = !zephir_is_true(&_17$$6); } @@ -196,7 +196,7 @@ PHP_METHOD(Stub_Issue2165_Issue, __construct) zephir_gettype(&_20$$7, &valueA); ZEPHIR_INIT_NVAR(&_21$$7); ZEPHIR_CONCAT_SSVS(&_21$$7, "Matrix element must", " be an integer or floating point number, ", &_20$$7, " given."); - ZEPHIR_CALL_METHOD(NULL, &_19$$7, "__construct", &_13, 51, &_21$$7); + ZEPHIR_CALL_METHOD(NULL, &_19$$7, "__construct", &_13, 49, &_21$$7); zephir_check_call_status(); zephir_throw_exception_debug(&_19$$7, "stub/issue2165/issue.zep", 40); ZEPHIR_MM_RESTORE(); @@ -216,7 +216,7 @@ PHP_METHOD(Stub_Issue2165_Issue, __construct) zephir_check_call_status(); _22$$8 = !(Z_TYPE_P(&valueA) == IS_LONG); if (_22$$8) { - ZEPHIR_CALL_FUNCTION(&_23$$8, "is_float", &_18, 52, &valueA); + ZEPHIR_CALL_FUNCTION(&_23$$8, "is_float", &_18, 50, &valueA); zephir_check_call_status(); _22$$8 = !zephir_is_true(&_23$$8); } @@ -227,7 +227,7 @@ PHP_METHOD(Stub_Issue2165_Issue, __construct) zephir_gettype(&_25$$9, &valueA); ZEPHIR_INIT_NVAR(&_26$$9); ZEPHIR_CONCAT_SSVS(&_26$$9, "Matrix element must", " be an integer or floating point number, ", &_25$$9, " given."); - ZEPHIR_CALL_METHOD(NULL, &_24$$9, "__construct", &_13, 51, &_26$$9); + ZEPHIR_CALL_METHOD(NULL, &_24$$9, "__construct", &_13, 49, &_26$$9); zephir_check_call_status(); zephir_throw_exception_debug(&_24$$9, "stub/issue2165/issue.zep", 40); ZEPHIR_MM_RESTORE(); @@ -238,7 +238,7 @@ PHP_METHOD(Stub_Issue2165_Issue, __construct) } } ZEPHIR_INIT_NVAR(&valueA); - ZEPHIR_CALL_FUNCTION(&_27$$4, "array_values", &_2, 49, &rowA); + ZEPHIR_CALL_FUNCTION(&_27$$4, "array_values", &_2, 47, &rowA); zephir_check_call_status(); zephir_array_append(&rowA, &_27$$4, PH_SEPARATE, "stub/issue2165/issue.zep", 44); } ZEND_HASH_FOREACH_END(); @@ -259,13 +259,13 @@ PHP_METHOD(Stub_Issue2165_Issue, __construct) ZEPHIR_INIT_NVAR(&_28$$11); object_init_ex(&_28$$11, spl_ce_InvalidArgumentException); ZVAL_LONG(&_29$$11, n); - ZEPHIR_CALL_FUNCTION(&_30$$11, "strval", &_10, 50, &_29$$11); + ZEPHIR_CALL_FUNCTION(&_30$$11, "strval", &_10, 48, &_29$$11); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_31$$11); ZVAL_LONG(&_31$$11, zephir_fast_count_int(&rowA)); ZEPHIR_INIT_NVAR(&_32$$11); ZEPHIR_CONCAT_SSVSVSSVS(&_32$$11, "The number of columns", " must be equal for all rows, ", &_30$$11, " needed but ", &_31$$11, " given", " at row offset ", &i, "."); - ZEPHIR_CALL_METHOD(NULL, &_28$$11, "__construct", &_13, 51, &_32$$11); + ZEPHIR_CALL_METHOD(NULL, &_28$$11, "__construct", &_13, 49, &_32$$11); zephir_check_call_status(); zephir_throw_exception_debug(&_28$$11, "stub/issue2165/issue.zep", 33); ZEPHIR_MM_RESTORE(); @@ -279,7 +279,7 @@ PHP_METHOD(Stub_Issue2165_Issue, __construct) ZVAL_COPY(&valueA, _33$$10); _35$$12 = !(Z_TYPE_P(&valueA) == IS_LONG); if (_35$$12) { - ZEPHIR_CALL_FUNCTION(&_36$$12, "is_float", &_18, 52, &valueA); + ZEPHIR_CALL_FUNCTION(&_36$$12, "is_float", &_18, 50, &valueA); zephir_check_call_status(); _35$$12 = !zephir_is_true(&_36$$12); } @@ -290,7 +290,7 @@ PHP_METHOD(Stub_Issue2165_Issue, __construct) zephir_gettype(&_38$$13, &valueA); ZEPHIR_INIT_NVAR(&_39$$13); ZEPHIR_CONCAT_SSVS(&_39$$13, "Matrix element must", " be an integer or floating point number, ", &_38$$13, " given."); - ZEPHIR_CALL_METHOD(NULL, &_37$$13, "__construct", &_13, 51, &_39$$13); + ZEPHIR_CALL_METHOD(NULL, &_37$$13, "__construct", &_13, 49, &_39$$13); zephir_check_call_status(); zephir_throw_exception_debug(&_37$$13, "stub/issue2165/issue.zep", 40); ZEPHIR_MM_RESTORE(); @@ -310,7 +310,7 @@ PHP_METHOD(Stub_Issue2165_Issue, __construct) zephir_check_call_status(); _40$$14 = !(Z_TYPE_P(&valueA) == IS_LONG); if (_40$$14) { - ZEPHIR_CALL_FUNCTION(&_41$$14, "is_float", &_18, 52, &valueA); + ZEPHIR_CALL_FUNCTION(&_41$$14, "is_float", &_18, 50, &valueA); zephir_check_call_status(); _40$$14 = !zephir_is_true(&_41$$14); } @@ -321,7 +321,7 @@ PHP_METHOD(Stub_Issue2165_Issue, __construct) zephir_gettype(&_43$$15, &valueA); ZEPHIR_INIT_NVAR(&_44$$15); ZEPHIR_CONCAT_SSVS(&_44$$15, "Matrix element must", " be an integer or floating point number, ", &_43$$15, " given."); - ZEPHIR_CALL_METHOD(NULL, &_42$$15, "__construct", &_13, 51, &_44$$15); + ZEPHIR_CALL_METHOD(NULL, &_42$$15, "__construct", &_13, 49, &_44$$15); zephir_check_call_status(); zephir_throw_exception_debug(&_42$$15, "stub/issue2165/issue.zep", 40); ZEPHIR_MM_RESTORE(); @@ -332,7 +332,7 @@ PHP_METHOD(Stub_Issue2165_Issue, __construct) } } ZEPHIR_INIT_NVAR(&valueA); - ZEPHIR_CALL_FUNCTION(&_45$$10, "array_values", &_2, 49, &rowA); + ZEPHIR_CALL_FUNCTION(&_45$$10, "array_values", &_2, 47, &rowA); zephir_check_call_status(); zephir_array_append(&rowA, &_45$$10, PH_SEPARATE, "stub/issue2165/issue.zep", 44); ZEPHIR_CALL_METHOD(NULL, &a, "next", NULL, 0); @@ -383,7 +383,7 @@ PHP_METHOD(Stub_Issue2165_Issue, quick) object_init_ex(return_value, stub_issue2165_issue_ce); ZVAL_BOOL(&_0, 0); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 48, &a, &_0); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 46, &a, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -465,7 +465,7 @@ PHP_METHOD(Stub_Issue2165_Issue, fill) _0 = !(Z_TYPE_P(value) == IS_LONG); if (_0) { - ZEPHIR_CALL_FUNCTION(&_1, "is_float", NULL, 52, value); + ZEPHIR_CALL_FUNCTION(&_1, "is_float", NULL, 50, value); zephir_check_call_status(); _0 = !zephir_is_true(&_1); } @@ -476,7 +476,7 @@ PHP_METHOD(Stub_Issue2165_Issue, fill) zephir_gettype(&_3$$3, value); ZEPHIR_INIT_VAR(&_4$$3); ZEPHIR_CONCAT_SSVS(&_4$$3, "Value must be an", " integer or floating point number, ", &_3$$3, " given."); - ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 51, &_4$$3); + ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 49, &_4$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_2$$3, "stub/issue2165/issue.zep", 68); ZEPHIR_MM_RESTORE(); @@ -486,11 +486,11 @@ PHP_METHOD(Stub_Issue2165_Issue, fill) ZEPHIR_INIT_VAR(&_5$$4); object_init_ex(&_5$$4, spl_ce_InvalidArgumentException); ZVAL_LONG(&_6$$4, m); - ZEPHIR_CALL_FUNCTION(&_7$$4, "strval", &_8, 50, &_6$$4); + ZEPHIR_CALL_FUNCTION(&_7$$4, "strval", &_8, 48, &_6$$4); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_9$$4); ZEPHIR_CONCAT_SSVS(&_9$$4, "M must be", " greater than 0, ", &_7$$4, " given."); - ZEPHIR_CALL_METHOD(NULL, &_5$$4, "__construct", NULL, 51, &_9$$4); + ZEPHIR_CALL_METHOD(NULL, &_5$$4, "__construct", NULL, 49, &_9$$4); zephir_check_call_status(); zephir_throw_exception_debug(&_5$$4, "stub/issue2165/issue.zep", 73); ZEPHIR_MM_RESTORE(); @@ -500,11 +500,11 @@ PHP_METHOD(Stub_Issue2165_Issue, fill) ZEPHIR_INIT_VAR(&_10$$5); object_init_ex(&_10$$5, spl_ce_InvalidArgumentException); ZVAL_LONG(&_11$$5, n); - ZEPHIR_CALL_FUNCTION(&_12$$5, "strval", &_8, 50, &_11$$5); + ZEPHIR_CALL_FUNCTION(&_12$$5, "strval", &_8, 48, &_11$$5); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_13$$5); ZEPHIR_CONCAT_SSVS(&_13$$5, "N must be", " greater than 0, ", &_12$$5, " given."); - ZEPHIR_CALL_METHOD(NULL, &_10$$5, "__construct", NULL, 51, &_13$$5); + ZEPHIR_CALL_METHOD(NULL, &_10$$5, "__construct", NULL, 49, &_13$$5); zephir_check_call_status(); zephir_throw_exception_debug(&_10$$5, "stub/issue2165/issue.zep", 78); ZEPHIR_MM_RESTORE(); diff --git a/ext/stub/issue663.zep.c b/ext/stub/issue663.zep.c index 0e60752fe..a6ac3c53c 100644 --- a/ext/stub/issue663.zep.c +++ b/ext/stub/issue663.zep.c @@ -55,7 +55,7 @@ PHP_METHOD(Stub_Issue663, is_array_assoc) if (_0) { RETURN_MM_BOOL(0); } - ZEPHIR_RETURN_CALL_STATIC("is_array_assoc_internal", &_1, 53, arr); + ZEPHIR_RETURN_CALL_STATIC("is_array_assoc_internal", &_1, 51, arr); zephir_check_call_status(); RETURN_MM(); } @@ -136,7 +136,7 @@ PHP_METHOD(Stub_Issue663, is_array_indexed) if (_0) { RETURN_MM_BOOL(0); } - ZEPHIR_CALL_STATIC(&_1, "is_array_assoc_internal", &_2, 53, arr); + ZEPHIR_CALL_STATIC(&_1, "is_array_assoc_internal", &_2, 51, arr); zephir_check_call_status(); RETURN_MM_BOOL(!zephir_is_true(&_1)); } diff --git a/ext/stub/mcall.zep.c b/ext/stub/mcall.zep.c index f1aa46328..bf2668595 100644 --- a/ext/stub/mcall.zep.c +++ b/ext/stub/mcall.zep.c @@ -177,7 +177,7 @@ PHP_METHOD(Stub_Mcall, testCall3) ZEPHIR_MM_GROW(); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "testmethod3", NULL, 54); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "testmethod3", NULL, 52); zephir_check_call_status(); RETURN_MM(); } @@ -258,7 +258,7 @@ PHP_METHOD(Stub_Mcall, testCall6) zephir_fetch_params(1, 2, 0, &a, &b); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "testmethod6", NULL, 55, a, b); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "testmethod6", NULL, 53, a, b); zephir_check_call_status(); RETURN_MM(); } @@ -353,7 +353,7 @@ PHP_METHOD(Stub_Mcall, testCall9) zephir_fetch_params(1, 2, 0, &a, &b); - ZEPHIR_CALL_METHOD(&_0, this_ptr, "testmethod6", NULL, 55, a, b); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "testmethod6", NULL, 53, a, b); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_1, this_ptr, "testmethod5", NULL, 0, a, b); zephir_check_call_status(); @@ -401,7 +401,7 @@ PHP_METHOD(Stub_Mcall, testCall12) ZEPHIR_MM_GROW(); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "testmethod3", NULL, 54); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "testmethod3", NULL, 52); zephir_check_call_status(); RETURN_MM(); } @@ -482,7 +482,7 @@ PHP_METHOD(Stub_Mcall, testCall15) zephir_fetch_params(1, 2, 0, &a, &b); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "testmethod6", NULL, 55, a, b); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "testmethod6", NULL, 53, a, b); zephir_check_call_status(); RETURN_MM(); } @@ -551,7 +551,7 @@ PHP_METHOD(Stub_Mcall, testCall18) ZEPHIR_MM_GROW(); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "testmethod7", NULL, 56); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "testmethod7", NULL, 54); zephir_check_call_status(); RETURN_MM(); } @@ -692,7 +692,7 @@ PHP_METHOD(Stub_Mcall, testCall22) _0 = 1; } i = _1; - ZEPHIR_CALL_METHOD(&_3$$3, this_ptr, "testmethod21", &_4, 57, p, p); + ZEPHIR_CALL_METHOD(&_3$$3, this_ptr, "testmethod21", &_4, 55, p, p); zephir_check_call_status(); j += zephir_get_numberval(&_3$$3); } @@ -1116,7 +1116,7 @@ PHP_METHOD(Stub_Mcall, testCallablePass) ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_NVAR(&_0); zephir_create_closure_ex(&_0, NULL, stub_12__closure_ce, SL("__invoke")); - ZEPHIR_RETURN_CALL_METHOD(&a, "setcallable", NULL, 58, &_0); + ZEPHIR_RETURN_CALL_METHOD(&a, "setcallable", NULL, 56, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -1149,7 +1149,7 @@ PHP_METHOD(Stub_Mcall, testCallableArrayThisMethodPass) ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "bb"); zephir_array_fast_append(&_0, &_1); - ZEPHIR_RETURN_CALL_METHOD(&a, "setcallable", NULL, 58, &_0); + ZEPHIR_RETURN_CALL_METHOD(&a, "setcallable", NULL, 56, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -1173,7 +1173,7 @@ PHP_METHOD(Stub_Mcall, aa) zephir_check_call_status(); } - ZEPHIR_RETURN_CALL_METHOD(&a, "bb", NULL, 59); + ZEPHIR_RETURN_CALL_METHOD(&a, "bb", NULL, 57); zephir_check_call_status(); RETURN_MM(); } @@ -1203,7 +1203,7 @@ PHP_METHOD(Stub_Mcall, issue1136) ZVAL_STRING(&_1, "8.0.0"); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, ">="); - ZEPHIR_CALL_FUNCTION(&_3, "version_compare", NULL, 60, &_0, &_1, &_2); + ZEPHIR_CALL_FUNCTION(&_3, "version_compare", NULL, 58, &_0, &_1, &_2); zephir_check_call_status(); if (zephir_is_true(&_3)) { ZEPHIR_INIT_VAR(&_finfo); @@ -1211,7 +1211,7 @@ PHP_METHOD(Stub_Mcall, issue1136) ZEPHIR_CALL_METHOD(NULL, &_finfo, "__construct", NULL, 0); zephir_check_call_status(); } else { - ZEPHIR_CALL_FUNCTION(&_finfo, "finfo_open", NULL, 61); + ZEPHIR_CALL_FUNCTION(&_finfo, "finfo_open", NULL, 59); zephir_check_call_status(); } RETURN_CCTOR(&_finfo); diff --git a/ext/stub/mcallchained.zep.c b/ext/stub/mcallchained.zep.c index b16a5f3cd..0d9f39af4 100644 --- a/ext/stub/mcallchained.zep.c +++ b/ext/stub/mcallchained.zep.c @@ -109,7 +109,7 @@ PHP_METHOD(Stub_McallChained, testChained3) ZEPHIR_MM_GROW(); - ZEPHIR_CALL_METHOD(&_0, this_ptr, "testmethod3", NULL, 62); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "testmethod3", NULL, 60); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_1, &_0, "testmethod2", NULL, 0); zephir_check_call_status(); diff --git a/ext/stub/nativearray.zep.c b/ext/stub/nativearray.zep.c index e6b9e7cf6..d1fbeceb9 100644 --- a/ext/stub/nativearray.zep.c +++ b/ext/stub/nativearray.zep.c @@ -1968,7 +1968,7 @@ PHP_METHOD(Stub_NativeArray, issue709) ZEPHIR_INIT_NVAR(&_3$$3); ZVAL_LONG(&_3$$3, 2); zephir_array_fast_append(&arr, &_3$$3); - ZEPHIR_CALL_FUNCTION(&_5$$3, "array_rand", &_6, 63, &arr); + ZEPHIR_CALL_FUNCTION(&_5$$3, "array_rand", &_6, 61, &arr); zephir_check_call_status(); zephir_array_fetch(&_4$$3, &arr, &_5$$3, PH_NOISY | PH_READONLY, "stub/nativearray.zep", 626); ZEPHIR_CPY_WRT(&arr, &_4$$3); @@ -2022,7 +2022,7 @@ PHP_METHOD(Stub_NativeArray, Issue1140) zephir_read_property(&_2, this_ptr, ZEND_STRL("prefixes"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch(&_3, &_2, &prefix, PH_NOISY | PH_READONLY, "stub/nativearray.zep", 639); ZEPHIR_MAKE_REF(&_3); - ZEPHIR_CALL_FUNCTION(NULL, "array_push", NULL, 64, &_3, &baseDir); + ZEPHIR_CALL_FUNCTION(NULL, "array_push", NULL, 62, &_3, &baseDir); ZEPHIR_UNREF(&_3); zephir_check_call_status(); RETURN_MM_MEMBER(getThis(), "prefixes"); diff --git a/ext/stub/oo.zep.c b/ext/stub/oo.zep.c index 966497ffe..e12c842b5 100644 --- a/ext/stub/oo.zep.c +++ b/ext/stub/oo.zep.c @@ -59,7 +59,7 @@ PHP_METHOD(Stub_Oo, testInstance2) ZEPHIR_INIT_VAR(&o); object_init_ex(&o, stub_oo_ooconstruct_ce); - ZEPHIR_CALL_METHOD(NULL, &o, "__construct", NULL, 65); + ZEPHIR_CALL_METHOD(NULL, &o, "__construct", NULL, 63); zephir_check_call_status(); RETURN_CCTOR(&o); } @@ -106,7 +106,7 @@ PHP_METHOD(Stub_Oo, testInstance4) ZVAL_STRING(&b, "b"); ZEPHIR_INIT_VAR(&o); object_init_ex(&o, stub_oo_ooconstructparams_ce); - ZEPHIR_CALL_METHOD(NULL, &o, "__construct", NULL, 66, &a, &b); + ZEPHIR_CALL_METHOD(NULL, &o, "__construct", NULL, 64, &a, &b); zephir_check_call_status(); RETURN_CCTOR(&o); } @@ -131,7 +131,7 @@ PHP_METHOD(Stub_Oo, testInstance5) ZVAL_STRING(&_0, "a"); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "b"); - ZEPHIR_CALL_METHOD(NULL, &o, "__construct", NULL, 66, &_0, &_1); + ZEPHIR_CALL_METHOD(NULL, &o, "__construct", NULL, 64, &_0, &_1); zephir_check_call_status(); RETURN_CCTOR(&o); } @@ -154,7 +154,7 @@ PHP_METHOD(Stub_Oo, testInstance6) object_init_ex(&o, stub_oo_ooconstructparams_ce); ZVAL_LONG(&_0, 1); ZVAL_LONG(&_1, 2); - ZEPHIR_CALL_METHOD(NULL, &o, "__construct", NULL, 66, &_0, &_1); + ZEPHIR_CALL_METHOD(NULL, &o, "__construct", NULL, 64, &_0, &_1); zephir_check_call_status(); RETURN_CCTOR(&o); } @@ -177,7 +177,7 @@ PHP_METHOD(Stub_Oo, testInstance7) object_init_ex(&o, stub_oo_ooconstructparams_ce); ZVAL_BOOL(&_0, 0); ZVAL_BOOL(&_1, 1); - ZEPHIR_CALL_METHOD(NULL, &o, "__construct", NULL, 66, &_0, &_1); + ZEPHIR_CALL_METHOD(NULL, &o, "__construct", NULL, 64, &_0, &_1); zephir_check_call_status(); RETURN_CCTOR(&o); } @@ -200,7 +200,7 @@ PHP_METHOD(Stub_Oo, testInstance8) object_init_ex(&o, stub_oo_ooconstructparams_ce); ZVAL_DOUBLE(&_0, 1.2); ZVAL_DOUBLE(&_1, 7.30); - ZEPHIR_CALL_METHOD(NULL, &o, "__construct", NULL, 66, &_0, &_1); + ZEPHIR_CALL_METHOD(NULL, &o, "__construct", NULL, 64, &_0, &_1); zephir_check_call_status(); RETURN_CCTOR(&o); } @@ -259,7 +259,7 @@ PHP_METHOD(Stub_Oo, testInstance11) object_init_ex(&o, stub_oo_ooconstructparams_ce); ZVAL_LONG(&_0, 1); ZVAL_LONG(&_1, 2); - ZEPHIR_CALL_METHOD(NULL, &o, "__construct", NULL, 66, &_0, &_1); + ZEPHIR_CALL_METHOD(NULL, &o, "__construct", NULL, 64, &_0, &_1); zephir_check_call_status(); RETURN_CCTOR(&o); } diff --git a/ext/stub/oo/deprecatedmethods.zep.c b/ext/stub/oo/deprecatedmethods.zep.c index 15300481f..6597f69df 100644 --- a/ext/stub/oo/deprecatedmethods.zep.c +++ b/ext/stub/oo/deprecatedmethods.zep.c @@ -43,7 +43,7 @@ PHP_METHOD(Stub_Oo_DeprecatedMethods, normalMethod) ZEPHIR_MM_GROW(); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "privatedeprecated", NULL, 67); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "privatedeprecated", NULL, 65); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/stub/oo/oodestruct.zep.c b/ext/stub/oo/oodestruct.zep.c index a51759d54..fcfcb11f6 100644 --- a/ext/stub/oo/oodestruct.zep.c +++ b/ext/stub/oo/oodestruct.zep.c @@ -227,11 +227,11 @@ PHP_METHOD(Stub_Oo_OoDestruct, __construct) zephir_read_property(&_1, this_ptr, ZEND_STRL("file"), PH_NOISY_CC | PH_READONLY); if ((zephir_file_exists(&_1) == SUCCESS)) { zephir_read_property(&_2$$4, this_ptr, ZEND_STRL("file"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_3$$4, "realpath", NULL, 68, &_2$$4); + ZEPHIR_CALL_FUNCTION(&_3$$4, "realpath", NULL, 66, &_2$$4); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("realpath"), &_3$$4); zephir_read_property(&_4$$4, this_ptr, ZEND_STRL("file"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&imageinfo, "getimagesize", NULL, 69, &_4$$4); + ZEPHIR_CALL_FUNCTION(&imageinfo, "getimagesize", NULL, 67, &_4$$4); zephir_check_call_status(); if (zephir_is_true(&imageinfo)) { zephir_array_fetch_long(&_5$$5, &imageinfo, 0, PH_NOISY | PH_READONLY, "stub/oo/oodestruct.zep", 62); @@ -349,7 +349,7 @@ PHP_METHOD(Stub_Oo_OoDestruct, __construct) zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("image"), &_37$$13); zephir_read_property(&_35$$13, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagealphablending", NULL, 70, &_35$$13, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagealphablending", NULL, 68, &_35$$13, &__$true); zephir_check_call_status(); zephir_read_property(&_36$$13, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_BOOL(&_38$$13, 1); @@ -446,7 +446,7 @@ PHP_METHOD(Stub_Oo_OoDestruct, check) ZVAL_STRING(&_4, "2.0.1"); ZEPHIR_INIT_VAR(&_5); ZVAL_STRING(&_5, ">="); - ZEPHIR_CALL_FUNCTION(&_6, "version_compare", NULL, 60, &version, &_4, &_5); + ZEPHIR_CALL_FUNCTION(&_6, "version_compare", NULL, 58, &version, &_4, &_5); zephir_check_call_status(); if (UNEXPECTED(!zephir_is_true(&_6))) { ZEPHIR_INIT_VAR(&_7$$5); @@ -514,13 +514,13 @@ PHP_METHOD(Stub_Oo_OoDestruct, getVersion) ZVAL_NULL(&version); ZEPHIR_INIT_VAR(&_3); ZVAL_STRING(&_3, "GD_VERSION"); - ZEPHIR_CALL_FUNCTION(&_4, "defined", NULL, 71, &_3); + ZEPHIR_CALL_FUNCTION(&_4, "defined", NULL, 69, &_3); zephir_check_call_status(); if (zephir_is_true(&_4)) { ZEPHIR_INIT_NVAR(&version); ZEPHIR_GET_CONSTANT(&version, "GD_VERSION"); } else { - ZEPHIR_CALL_FUNCTION(&info, "gd_info", NULL, 72); + ZEPHIR_CALL_FUNCTION(&info, "gd_info", NULL, 70); zephir_check_call_status(); ZEPHIR_INIT_VAR(&matches); ZVAL_NULL(&matches); diff --git a/ext/stub/oo/scopes/privatescopetester.zep.c b/ext/stub/oo/scopes/privatescopetester.zep.c index 2ef99c017..59f015529 100644 --- a/ext/stub/oo/scopes/privatescopetester.zep.c +++ b/ext/stub/oo/scopes/privatescopetester.zep.c @@ -138,7 +138,7 @@ PHP_METHOD(Stub_Oo_Scopes_PrivateScopeTester, getObjVars) zephir_fetch_params(1, 1, 0, &obj); - ZEPHIR_RETURN_CALL_FUNCTION("get_object_vars", NULL, 73, obj); + ZEPHIR_RETURN_CALL_FUNCTION("get_object_vars", NULL, 71, obj); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/stub/optimizers/acos.zep.c b/ext/stub/optimizers/acos.zep.c index c726af137..5371416de 100644 --- a/ext/stub/optimizers/acos.zep.c +++ b/ext/stub/optimizers/acos.zep.c @@ -12,10 +12,11 @@ #include #include "kernel/main.h" -#include "kernel/fcall.h" +#include "math.h" #include "kernel/object.h" -#include "kernel/memory.h" #include "kernel/operators.h" +#include "kernel/memory.h" +#include "kernel/math.h" ZEPHIR_INIT_CLASS(Stub_Optimizers_ACos) @@ -28,64 +29,50 @@ ZEPHIR_INIT_CLASS(Stub_Optimizers_ACos) PHP_METHOD(Stub_Optimizers_ACos, testInt) { zval _0; - zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zend_long ZEPHIR_LAST_CALL_STATUS, a; + zend_long a; zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - ZEPHIR_MM_GROW(); a = 1; ZVAL_LONG(&_0, a); - ZEPHIR_RETURN_CALL_FUNCTION("acos", NULL, 14, &_0); - zephir_check_call_status(); - RETURN_MM(); + RETURN_DOUBLE(acos(a)); } PHP_METHOD(Stub_Optimizers_ACos, testVar) { zval _0; - zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zend_long ZEPHIR_LAST_CALL_STATUS, a; + zend_long a; zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - ZEPHIR_MM_GROW(); a = 1; ZVAL_LONG(&_0, a); - ZEPHIR_RETURN_CALL_FUNCTION("acos", NULL, 14, &_0); - zephir_check_call_status(); - RETURN_MM(); + RETURN_DOUBLE(acos(a)); } PHP_METHOD(Stub_Optimizers_ACos, testIntValue1) { zval _0; - zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - ZEPHIR_MM_GROW(); ZVAL_LONG(&_0, 0); - ZEPHIR_RETURN_CALL_FUNCTION("acos", NULL, 14, &_0); - zephir_check_call_status(); - RETURN_MM(); + RETURN_DOUBLE(acos(0)); } PHP_METHOD(Stub_Optimizers_ACos, testIntParameter) { - zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *a_param = NULL, _0; - zend_long a, ZEPHIR_LAST_CALL_STATUS; + zend_long a; zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); @@ -97,21 +84,16 @@ PHP_METHOD(Stub_Optimizers_ACos, testIntParameter) #endif - ZEPHIR_MM_GROW(); - zephir_fetch_params(1, 1, 0, &a_param); + zephir_fetch_params_without_memory_grow(1, 0, &a_param); a = zephir_get_intval(a_param); ZVAL_LONG(&_0, a); - ZEPHIR_RETURN_CALL_FUNCTION("acos", NULL, 14, &_0); - zephir_check_call_status(); - RETURN_MM(); + RETURN_DOUBLE(acos(a)); } PHP_METHOD(Stub_Optimizers_ACos, testVarParameter) { - zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zend_long ZEPHIR_LAST_CALL_STATUS; zval *a, a_sub; zval *this_ptr = getThis(); @@ -124,12 +106,9 @@ PHP_METHOD(Stub_Optimizers_ACos, testVarParameter) #endif - ZEPHIR_MM_GROW(); - zephir_fetch_params(1, 1, 0, &a); + zephir_fetch_params_without_memory_grow(1, 0, &a); - ZEPHIR_RETURN_CALL_FUNCTION("acos", NULL, 14, a); - zephir_check_call_status(); - RETURN_MM(); + RETURN_DOUBLE(zephir_acos(a)); } diff --git a/ext/stub/optimizers/asin.zep.c b/ext/stub/optimizers/asin.zep.c index c73f52c51..fe81b5d60 100644 --- a/ext/stub/optimizers/asin.zep.c +++ b/ext/stub/optimizers/asin.zep.c @@ -12,10 +12,11 @@ #include #include "kernel/main.h" -#include "kernel/fcall.h" +#include "math.h" #include "kernel/object.h" -#include "kernel/memory.h" #include "kernel/operators.h" +#include "kernel/memory.h" +#include "kernel/math.h" ZEPHIR_INIT_CLASS(Stub_Optimizers_ASin) @@ -28,64 +29,50 @@ ZEPHIR_INIT_CLASS(Stub_Optimizers_ASin) PHP_METHOD(Stub_Optimizers_ASin, testInt) { zval _0; - zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zend_long ZEPHIR_LAST_CALL_STATUS, a; + zend_long a; zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - ZEPHIR_MM_GROW(); a = 1; ZVAL_LONG(&_0, a); - ZEPHIR_RETURN_CALL_FUNCTION("asin", NULL, 13, &_0); - zephir_check_call_status(); - RETURN_MM(); + RETURN_DOUBLE(asin(a)); } PHP_METHOD(Stub_Optimizers_ASin, testVar) { zval _0; - zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zend_long ZEPHIR_LAST_CALL_STATUS, a; + zend_long a; zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - ZEPHIR_MM_GROW(); a = 1; ZVAL_LONG(&_0, a); - ZEPHIR_RETURN_CALL_FUNCTION("asin", NULL, 13, &_0); - zephir_check_call_status(); - RETURN_MM(); + RETURN_DOUBLE(asin(a)); } PHP_METHOD(Stub_Optimizers_ASin, testIntValue1) { zval _0; - zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - ZEPHIR_MM_GROW(); ZVAL_LONG(&_0, 0); - ZEPHIR_RETURN_CALL_FUNCTION("asin", NULL, 13, &_0); - zephir_check_call_status(); - RETURN_MM(); + RETURN_DOUBLE(asin(0)); } PHP_METHOD(Stub_Optimizers_ASin, testIntParameter) { - zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *a_param = NULL, _0; - zend_long a, ZEPHIR_LAST_CALL_STATUS; + zend_long a; zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); @@ -97,21 +84,16 @@ PHP_METHOD(Stub_Optimizers_ASin, testIntParameter) #endif - ZEPHIR_MM_GROW(); - zephir_fetch_params(1, 1, 0, &a_param); + zephir_fetch_params_without_memory_grow(1, 0, &a_param); a = zephir_get_intval(a_param); ZVAL_LONG(&_0, a); - ZEPHIR_RETURN_CALL_FUNCTION("asin", NULL, 13, &_0); - zephir_check_call_status(); - RETURN_MM(); + RETURN_DOUBLE(asin(a)); } PHP_METHOD(Stub_Optimizers_ASin, testVarParameter) { - zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zend_long ZEPHIR_LAST_CALL_STATUS; zval *a, a_sub; zval *this_ptr = getThis(); @@ -124,12 +106,9 @@ PHP_METHOD(Stub_Optimizers_ASin, testVarParameter) #endif - ZEPHIR_MM_GROW(); - zephir_fetch_params(1, 1, 0, &a); + zephir_fetch_params_without_memory_grow(1, 0, &a); - ZEPHIR_RETURN_CALL_FUNCTION("asin", NULL, 13, a); - zephir_check_call_status(); - RETURN_MM(); + RETURN_DOUBLE(zephir_asin(a)); } diff --git a/ext/stub/optimizers/strreplace.zep.c b/ext/stub/optimizers/strreplace.zep.c index 7e2c06b81..0ef180fef 100644 --- a/ext/stub/optimizers/strreplace.zep.c +++ b/ext/stub/optimizers/strreplace.zep.c @@ -209,7 +209,7 @@ PHP_METHOD(Stub_Optimizers_StrReplace, issue732B) zephir_array_fast_append(&replacements, &_0); ZEPHIR_INIT_VAR(&subject); ZVAL_STRING(&subject, "The quick brown fox jumped over the lazy dog."); - ZEPHIR_RETURN_CALL_FUNCTION("preg_replace", NULL, 74, &patterns, &replacements, &subject); + ZEPHIR_RETURN_CALL_FUNCTION("preg_replace", NULL, 72, &patterns, &replacements, &subject); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/stub/properties/getobjectvars.zep.c b/ext/stub/properties/getobjectvars.zep.c index 13921dda9..96b67328c 100644 --- a/ext/stub/properties/getobjectvars.zep.c +++ b/ext/stub/properties/getobjectvars.zep.c @@ -40,7 +40,7 @@ PHP_METHOD(Stub_Properties_GetObjectVars, issue1245) ZEPHIR_MM_GROW(); - ZEPHIR_RETURN_CALL_FUNCTION("get_object_vars", NULL, 73, this_ptr); + ZEPHIR_RETURN_CALL_FUNCTION("get_object_vars", NULL, 71, this_ptr); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/stub/properties/propertyarray.zep.c b/ext/stub/properties/propertyarray.zep.c index 2f7b0d8cb..0c6ddddd1 100644 --- a/ext/stub/properties/propertyarray.zep.c +++ b/ext/stub/properties/propertyarray.zep.c @@ -146,12 +146,12 @@ PHP_METHOD(Stub_Properties_PropertyArray, testIssues1831) } zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("otherArray"), PH_NOISY_CC | PH_READONLY); ZEPHIR_MAKE_REF(&_0$$3); - ZEPHIR_CALL_FUNCTION(&info, "array_shift", &_1, 75, &_0$$3); + ZEPHIR_CALL_FUNCTION(&info, "array_shift", &_1, 73, &_0$$3); ZEPHIR_UNREF(&_0$$3); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_2$$3); ZVAL_STRING(&_2$$3, "header"); - ZEPHIR_CALL_FUNCTION(&_3$$3, "stripos", &_4, 76, &info, &_2$$3); + ZEPHIR_CALL_FUNCTION(&_3$$3, "stripos", &_4, 74, &info, &_2$$3); zephir_check_call_status(); if (!ZEPHIR_IS_FALSE_IDENTICAL(&_3$$3)) { zephir_array_append(&headers, &info, PH_SEPARATE, "stub/properties/propertyarray.zep", 51); @@ -159,7 +159,7 @@ PHP_METHOD(Stub_Properties_PropertyArray, testIssues1831) } else { zephir_read_property(&_5$$5, this_ptr, ZEND_STRL("otherArray"), PH_NOISY_CC | PH_READONLY); ZEPHIR_MAKE_REF(&_5$$5); - ZEPHIR_CALL_FUNCTION(NULL, "array_unshift", &_6, 77, &_5$$5, &info); + ZEPHIR_CALL_FUNCTION(NULL, "array_unshift", &_6, 75, &_5$$5, &info); ZEPHIR_UNREF(&_5$$5); zephir_check_call_status(); break; diff --git a/ext/stub/quantum.zep.c b/ext/stub/quantum.zep.c index d9d5e7663..8b88ff05d 100644 --- a/ext/stub/quantum.zep.c +++ b/ext/stub/quantum.zep.c @@ -140,7 +140,7 @@ PHP_METHOD(Stub_Quantum, harmos) ZVAL_STRING(&_0, "harmos.txt"); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "w"); - ZEPHIR_CALL_FUNCTION(&fp, "fopen", NULL, 33, &_0, &_1); + ZEPHIR_CALL_FUNCTION(&fp, "fopen", NULL, 31, &_0, &_1); zephir_check_call_status(); if (!(zephir_is_true(&fp))) { RETURN_MM_LONG(1); @@ -345,13 +345,13 @@ PHP_METHOD(Stub_Quantum, harmos) ZVAL_STRING(&_52$$9, "%16.8lf %16.8lf %16.8lf \n"); ZVAL_DOUBLE(&_53$$9, ((double) i * dx)); ZVAL_DOUBLE(&_54$$9, ((double) n * dt)); - ZEPHIR_CALL_FUNCTION(NULL, "fprintf", &_55, 78, &fp, &_52$$9, &_53$$9, &_54$$9, &_51$$9); + ZEPHIR_CALL_FUNCTION(NULL, "fprintf", &_55, 76, &fp, &_52$$9, &_53$$9, &_54$$9, &_51$$9); zephir_check_call_status(); i = (i + 10); } ZEPHIR_INIT_NVAR(&_56$$8); ZVAL_STRING(&_56$$8, "\n"); - ZEPHIR_CALL_FUNCTION(NULL, "fprintf", &_55, 78, &fp, &_56$$8); + ZEPHIR_CALL_FUNCTION(NULL, "fprintf", &_55, 76, &fp, &_56$$8); zephir_check_call_status(); } j = 1; diff --git a/ext/stub/range.zep.c b/ext/stub/range.zep.c index 6bdd3dab7..14f5e48ce 100644 --- a/ext/stub/range.zep.c +++ b/ext/stub/range.zep.c @@ -46,7 +46,7 @@ PHP_METHOD(Stub_Range, inclusive1) ZVAL_LONG(&_0, 0); ZVAL_LONG(&_1, 10); - ZEPHIR_CALL_FUNCTION(&_2, "range", NULL, 79, &_0, &_1); + ZEPHIR_CALL_FUNCTION(&_2, "range", NULL, 77, &_0, &_1); zephir_check_call_status(); zephir_get_arrval(&_3, &_2); RETURN_CTOR(&_3); @@ -70,7 +70,7 @@ PHP_METHOD(Stub_Range, exclusive1) ZVAL_LONG(&_0, 0); ZVAL_LONG(&_1, 10); - ZEPHIR_CALL_FUNCTION(&_2, "range", NULL, 79, &_0, &_1); + ZEPHIR_CALL_FUNCTION(&_2, "range", NULL, 77, &_0, &_1); zephir_check_call_status(); zephir_get_arrval(&_3, &_2); RETURN_CTOR(&_3); diff --git a/ext/stub/reflection.zep.c b/ext/stub/reflection.zep.c index 3e70ad57d..cbb95cba7 100644 --- a/ext/stub/reflection.zep.c +++ b/ext/stub/reflection.zep.c @@ -39,7 +39,7 @@ PHP_METHOD(Stub_Reflection, getReflectionClass) ZEPHIR_INIT_VAR(&r); object_init_ex(&r, zephir_get_internal_ce(SL("reflectionclass"))); - ZEPHIR_CALL_METHOD(NULL, &r, "__construct", NULL, 80, this_ptr); + ZEPHIR_CALL_METHOD(NULL, &r, "__construct", NULL, 78, this_ptr); zephir_check_call_status(); RETURN_CCTOR(&r); } @@ -61,7 +61,7 @@ PHP_METHOD(Stub_Reflection, getReflectionFunction) object_init_ex(&r, zephir_get_internal_ce(SL("reflectionfunction"))); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "abs"); - ZEPHIR_CALL_METHOD(NULL, &r, "__construct", NULL, 81, &_0); + ZEPHIR_CALL_METHOD(NULL, &r, "__construct", NULL, 79, &_0); zephir_check_call_status(); RETURN_CCTOR(&r); } diff --git a/ext/stub/regexdna.zep.c b/ext/stub/regexdna.zep.c index e5ce4239e..8c4dba80a 100644 --- a/ext/stub/regexdna.zep.c +++ b/ext/stub/regexdna.zep.c @@ -184,7 +184,7 @@ PHP_METHOD(Stub_RegexDNA, process) ZEPHIR_CONCAT_SVS(&_1, "/", &stuffToRemove, "/mS"); ZEPHIR_INIT_NVAR(&_0); ZVAL_STRING(&_0, ""); - ZEPHIR_CALL_FUNCTION(&_2, "preg_replace", &_3, 74, &_1, &_0, &contents); + ZEPHIR_CALL_FUNCTION(&_2, "preg_replace", &_3, 72, &_1, &_0, &contents); zephir_check_call_status(); ZEPHIR_CPY_WRT(&contents, &_2); ZEPHIR_INIT_VAR(&codeLength); @@ -228,7 +228,7 @@ PHP_METHOD(Stub_RegexDNA, process) } } ZEPHIR_INIT_NVAR(®ex); - ZEPHIR_CALL_FUNCTION(&_2, "preg_replace", &_3, 74, &vIUB, &vIUBnew, &contents); + ZEPHIR_CALL_FUNCTION(&_2, "preg_replace", &_3, 72, &vIUB, &vIUBnew, &contents); zephir_check_call_status(); ZEPHIR_CPY_WRT(&contents, &_2); php_printf("%c", '\n'); diff --git a/ext/stub/requires.zep.c b/ext/stub/requires.zep.c index f481f4b4a..c38d225bd 100644 --- a/ext/stub/requires.zep.c +++ b/ext/stub/requires.zep.c @@ -111,7 +111,7 @@ PHP_METHOD(Stub_Requires, requireExternal3) zephir_check_call_status(); } - ZEPHIR_CALL_METHOD(NULL, &external3, "req", NULL, 82, path, this_ptr); + ZEPHIR_CALL_METHOD(NULL, &external3, "req", NULL, 80, path, this_ptr); zephir_check_call_status(); RETURN_MM_MEMBER(getThis(), "content"); } diff --git a/ext/stub/requires/external3.zep.c b/ext/stub/requires/external3.zep.c index eb91d26a1..3d099907c 100644 --- a/ext/stub/requires/external3.zep.c +++ b/ext/stub/requires/external3.zep.c @@ -52,12 +52,12 @@ PHP_METHOD(Stub_Requires_External3, req) zephir_fetch_params(1, 2, 0, &path, &requires); - ZEPHIR_CALL_FUNCTION(NULL, "ob_clean", NULL, 83); + ZEPHIR_CALL_FUNCTION(NULL, "ob_clean", NULL, 81); zephir_check_call_status(); if (zephir_require_zval(path) == FAILURE) { RETURN_MM_NULL(); } - ZEPHIR_CALL_FUNCTION(&_0, "ob_get_contents", NULL, 84); + ZEPHIR_CALL_FUNCTION(&_0, "ob_get_contents", NULL, 82); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, requires, "setcontent", NULL, 0, &_0); zephir_check_call_status(); diff --git a/ext/stub/resourcetest.zep.c b/ext/stub/resourcetest.zep.c index 2797ff49a..aa5af20eb 100644 --- a/ext/stub/resourcetest.zep.c +++ b/ext/stub/resourcetest.zep.c @@ -123,7 +123,7 @@ PHP_METHOD(Stub_ResourceTest, testFunctionsForSTDIN) ZEPHIR_INIT_VAR(&a); ZEPHIR_GET_CONSTANT(&a, "STDIN"); ZVAL_LONG(&_0, 1); - ZEPHIR_CALL_FUNCTION(NULL, "stream_set_blocking", NULL, 85, &a, &_0); + ZEPHIR_CALL_FUNCTION(NULL, "stream_set_blocking", NULL, 83, &a, &_0); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } diff --git a/ext/stub/router.zep.c b/ext/stub/router.zep.c index a2eb8cf2c..f9a78747b 100644 --- a/ext/stub/router.zep.c +++ b/ext/stub/router.zep.c @@ -127,7 +127,7 @@ PHP_METHOD(Stub_Router, __construct) add_assoc_long_ex(&_1$$3, SL("controller"), 1); ZEPHIR_INIT_VAR(&_2$$3); ZVAL_STRING(&_2$$3, "#^/([a-zA-Z0-9\\_\\-]+)[/]{0,1}$#"); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", &_3, 86, &_2$$3, &_1$$3); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", &_3, 84, &_2$$3, &_1$$3); zephir_check_call_status(); zephir_array_append(&routes, &_0$$3, PH_SEPARATE, "stub/router.zep", 89); ZEPHIR_INIT_NVAR(&_2$$3); @@ -139,7 +139,7 @@ PHP_METHOD(Stub_Router, __construct) add_assoc_long_ex(&_4$$3, SL("params"), 3); ZEPHIR_INIT_VAR(&_5$$3); ZVAL_STRING(&_5$$3, "#^/([a-zA-Z0-9\\_\\-]+)/([a-zA-Z0-9\\.\\_]+)(/.*)*$#"); - ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", &_3, 86, &_5$$3, &_4$$3); + ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", &_3, 84, &_5$$3, &_4$$3); zephir_check_call_status(); zephir_array_append(&routes, &_2$$3, PH_SEPARATE, "stub/router.zep", 95); } @@ -1083,7 +1083,7 @@ PHP_METHOD(Stub_Router, add) ZEPHIR_INIT_VAR(&route); object_init_ex(&route, stub_router_route_ce); - ZEPHIR_CALL_METHOD(NULL, &route, "__construct", NULL, 86, pattern, paths, httpMethods); + ZEPHIR_CALL_METHOD(NULL, &route, "__construct", NULL, 84, pattern, paths, httpMethods); zephir_check_call_status(); zephir_update_property_array_append(this_ptr, SL("_routes"), &route); RETURN_CCTOR(&route); diff --git a/ext/stub/scall.zep.c b/ext/stub/scall.zep.c index 853299940..4a6d0bac3 100644 --- a/ext/stub/scall.zep.c +++ b/ext/stub/scall.zep.c @@ -175,7 +175,7 @@ PHP_METHOD(Stub_Scall, testCall3) ZEPHIR_MM_GROW(); - ZEPHIR_RETURN_CALL_SELF("testmethod3", &_0, 87); + ZEPHIR_RETURN_CALL_SELF("testmethod3", &_0, 85); zephir_check_call_status(); RETURN_MM(); } @@ -257,7 +257,7 @@ PHP_METHOD(Stub_Scall, testCall6) zephir_fetch_params(1, 2, 0, &a, &b); - ZEPHIR_RETURN_CALL_SELF("testmethod6", &_0, 88, a, b); + ZEPHIR_RETURN_CALL_SELF("testmethod6", &_0, 86, a, b); zephir_check_call_status(); RETURN_MM(); } @@ -303,7 +303,7 @@ PHP_METHOD(Stub_Scall, testCall9) ZEPHIR_MM_GROW(); - ZEPHIR_RETURN_CALL_SELF("testmethod3", &_0, 87); + ZEPHIR_RETURN_CALL_SELF("testmethod3", &_0, 85); zephir_check_call_status(); RETURN_MM(); } @@ -385,7 +385,7 @@ PHP_METHOD(Stub_Scall, testCall12) zephir_fetch_params(1, 2, 0, &a, &b); - ZEPHIR_RETURN_CALL_SELF("testmethod6", &_0, 88, a, b); + ZEPHIR_RETURN_CALL_SELF("testmethod6", &_0, 86, a, b); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/stub/scope.zep.c b/ext/stub/scope.zep.c index e2c634c82..b77dc5726 100644 --- a/ext/stub/scope.zep.c +++ b/ext/stub/scope.zep.c @@ -80,7 +80,7 @@ PHP_METHOD(Stub_Scope, test1) ZEPHIR_INIT_VAR(&ret); ZVAL_STRING(&ret, ""); - ZEPHIR_CALL_SELF(&k, "getstr", &_0, 89); + ZEPHIR_CALL_SELF(&k, "getstr", &_0, 87); zephir_check_call_status(); r = 1; if (r == 1) { @@ -176,7 +176,7 @@ PHP_METHOD(Stub_Scope, test3) } ZEPHIR_INIT_NVAR(&c); ZVAL_LONG(&c, _1); - ZEPHIR_CALL_SELF(&str$$3, "getdystr", &_3, 90, &c); + ZEPHIR_CALL_SELF(&str$$3, "getdystr", &_3, 88, &c); zephir_check_call_status(); zephir_concat_self(&k, &str$$3); } diff --git a/ext/stub/sort.zep.c b/ext/stub/sort.zep.c index cee031dfc..b1bb49ce9 100644 --- a/ext/stub/sort.zep.c +++ b/ext/stub/sort.zep.c @@ -99,16 +99,16 @@ PHP_METHOD(Stub_Sort, quick) } } } - ZEPHIR_CALL_METHOD(&_7, this_ptr, "quick", &_8, 91, &left); + ZEPHIR_CALL_METHOD(&_7, this_ptr, "quick", &_8, 89, &left); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_9); zephir_create_array(&_9, 1, 0); ZEPHIR_INIT_VAR(&_10); ZVAL_LONG(&_10, pivot); zephir_array_fast_append(&_9, &_10); - ZEPHIR_CALL_METHOD(&_11, this_ptr, "quick", &_8, 91, &right); + ZEPHIR_CALL_METHOD(&_11, this_ptr, "quick", &_8, 89, &right); zephir_check_call_status(); - ZEPHIR_RETURN_CALL_FUNCTION("array_merge", NULL, 92, &_7, &_9, &_11); + ZEPHIR_RETURN_CALL_FUNCTION("array_merge", NULL, 90, &_7, &_9, &_11); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/stub/spectralnorm.zep.c b/ext/stub/spectralnorm.zep.c index 63b82a3c0..7f7de5c42 100644 --- a/ext/stub/spectralnorm.zep.c +++ b/ext/stub/spectralnorm.zep.c @@ -126,7 +126,7 @@ PHP_METHOD(Stub_SpectralNorm, Au) j = _4$$3; ZVAL_LONG(&_7$$4, i); ZVAL_LONG(&_8$$4, j); - ZEPHIR_CALL_METHOD(&_6$$4, this_ptr, "ax", &_9, 93, &_7$$4, &_8$$4); + ZEPHIR_CALL_METHOD(&_6$$4, this_ptr, "ax", &_9, 91, &_7$$4, &_8$$4); zephir_check_call_status(); ZVAL_LONG(&_7$$4, j); ZEPHIR_CALL_METHOD(&_10$$4, u, "offsetget", &_11, 0, &_7$$4); @@ -209,7 +209,7 @@ PHP_METHOD(Stub_SpectralNorm, Atu) j = _4$$3; ZVAL_LONG(&_7$$4, j); ZVAL_LONG(&_8$$4, i); - ZEPHIR_CALL_METHOD(&_6$$4, this_ptr, "ax", &_9, 93, &_7$$4, &_8$$4); + ZEPHIR_CALL_METHOD(&_6$$4, this_ptr, "ax", &_9, 91, &_7$$4, &_8$$4); zephir_check_call_status(); ZVAL_LONG(&_7$$4, j); ZEPHIR_CALL_METHOD(&_10$$4, u, "offsetget", &_11, 0, &_7$$4); @@ -254,9 +254,9 @@ PHP_METHOD(Stub_SpectralNorm, AtAu) zephir_fetch_params(1, 4, 0, &n, &u, &v, &w); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "au", NULL, 94, n, u, w); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "au", NULL, 92, n, u, w); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "atu", NULL, 95, n, w, v); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "atu", NULL, 93, n, w, v); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -300,17 +300,17 @@ PHP_METHOD(Stub_SpectralNorm, process) ZEPHIR_INIT_VAR(&u); object_init_ex(&u, spl_ce_SplFixedArray); ZVAL_LONG(&_0, n); - ZEPHIR_CALL_METHOD(NULL, &u, "__construct", NULL, 96, &_0); + ZEPHIR_CALL_METHOD(NULL, &u, "__construct", NULL, 94, &_0); zephir_check_call_status(); ZEPHIR_INIT_VAR(&v); object_init_ex(&v, spl_ce_SplFixedArray); ZVAL_LONG(&_0, n); - ZEPHIR_CALL_METHOD(NULL, &v, "__construct", NULL, 96, &_0); + ZEPHIR_CALL_METHOD(NULL, &v, "__construct", NULL, 94, &_0); zephir_check_call_status(); ZEPHIR_INIT_VAR(&w); object_init_ex(&w, spl_ce_SplFixedArray); ZVAL_LONG(&_0, n); - ZEPHIR_CALL_METHOD(NULL, &w, "__construct", NULL, 96, &_0); + ZEPHIR_CALL_METHOD(NULL, &w, "__construct", NULL, 94, &_0); zephir_check_call_status(); _3 = (n - 1); _2 = 0; @@ -328,15 +328,15 @@ PHP_METHOD(Stub_SpectralNorm, process) i = _2; ZVAL_LONG(&_4$$3, i); ZVAL_LONG(&_5$$3, 1); - ZEPHIR_CALL_METHOD(NULL, &u, "offsetset", &_6, 97, &_4$$3, &_5$$3); + ZEPHIR_CALL_METHOD(NULL, &u, "offsetset", &_6, 95, &_4$$3, &_5$$3); zephir_check_call_status(); ZVAL_LONG(&_4$$3, i); ZVAL_LONG(&_5$$3, 1); - ZEPHIR_CALL_METHOD(NULL, &v, "offsetset", &_6, 97, &_4$$3, &_5$$3); + ZEPHIR_CALL_METHOD(NULL, &v, "offsetset", &_6, 95, &_4$$3, &_5$$3); zephir_check_call_status(); ZVAL_LONG(&_4$$3, i); ZVAL_LONG(&_5$$3, 1); - ZEPHIR_CALL_METHOD(NULL, &w, "offsetset", &_6, 97, &_4$$3, &_5$$3); + ZEPHIR_CALL_METHOD(NULL, &w, "offsetset", &_6, 95, &_4$$3, &_5$$3); zephir_check_call_status(); } } @@ -355,10 +355,10 @@ PHP_METHOD(Stub_SpectralNorm, process) } i = _8; ZVAL_LONG(&_10$$4, n); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "atau", &_11, 98, &_10$$4, &u, &v, &w); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "atau", &_11, 96, &_10$$4, &u, &v, &w); zephir_check_call_status(); ZVAL_LONG(&_10$$4, n); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "atau", &_11, 98, &_10$$4, &v, &u, &w); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "atau", &_11, 96, &_10$$4, &v, &u, &w); zephir_check_call_status(); } } @@ -377,19 +377,19 @@ PHP_METHOD(Stub_SpectralNorm, process) } i = _13; ZVAL_LONG(&_16$$5, i); - ZEPHIR_CALL_METHOD(&_15$$5, &u, "offsetget", &_17, 99, &_16$$5); + ZEPHIR_CALL_METHOD(&_15$$5, &u, "offsetget", &_17, 97, &_16$$5); zephir_check_call_status(); ZVAL_LONG(&_16$$5, i); - ZEPHIR_CALL_METHOD(&_18$$5, &v, "offsetget", &_17, 99, &_16$$5); + ZEPHIR_CALL_METHOD(&_18$$5, &v, "offsetget", &_17, 97, &_16$$5); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_19$$5); mul_function(&_19$$5, &_15$$5, &_18$$5); vBv += zephir_get_numberval(&_19$$5); ZVAL_LONG(&_16$$5, i); - ZEPHIR_CALL_METHOD(&_15$$5, &v, "offsetget", &_17, 99, &_16$$5); + ZEPHIR_CALL_METHOD(&_15$$5, &v, "offsetget", &_17, 97, &_16$$5); zephir_check_call_status(); ZVAL_LONG(&_16$$5, i); - ZEPHIR_CALL_METHOD(&_18$$5, &v, "offsetget", &_17, 99, &_16$$5); + ZEPHIR_CALL_METHOD(&_18$$5, &v, "offsetget", &_17, 97, &_16$$5); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_20$$5); mul_function(&_20$$5, &_15$$5, &_18$$5); diff --git a/ext/stub/spl.zep.c b/ext/stub/spl.zep.c index f14f0570e..4fe91db3b 100644 --- a/ext/stub/spl.zep.c +++ b/ext/stub/spl.zep.c @@ -52,7 +52,7 @@ PHP_METHOD(Stub_Spl, issue1212) object_init_ex(return_value, spl_ce_SplFileObject); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 100, &file); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 98, &file); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/stub/statements.zep.c b/ext/stub/statements.zep.c index f6677f6d4..be99dc7bd 100644 --- a/ext/stub/statements.zep.c +++ b/ext/stub/statements.zep.c @@ -216,25 +216,25 @@ PHP_METHOD(Stub_Statements, test544Issue) unfilledWidth = (((zephir_get_numberval(&_4$$3) - 1)) - filledWidth); zephir_read_property(&_5$$3, this_ptr, ZEND_STRL("filledChar"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_6$$3, filledWidth); - ZEPHIR_CALL_FUNCTION(&_7$$3, "str_repeat", &_8, 22, &_5$$3, &_6$$3); + ZEPHIR_CALL_FUNCTION(&_7$$3, "str_repeat", &_8, 20, &_5$$3, &_6$$3); zephir_check_call_status(); zephir_read_property(&_6$$3, this_ptr, ZEND_STRL("arrow"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_9$$3, this_ptr, ZEND_STRL("unfilledChar"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_10$$3, unfilledWidth); - ZEPHIR_CALL_FUNCTION(&_11$$3, "str_repeat", &_8, 22, &_9$$3, &_10$$3); + ZEPHIR_CALL_FUNCTION(&_11$$3, "str_repeat", &_8, 20, &_9$$3, &_10$$3); zephir_check_call_status(); ZEPHIR_CONCAT_VVV(return_value, &_7$$3, &_6$$3, &_11$$3); RETURN_MM(); } else if (ZEPHIR_IS_LONG_IDENTICAL(&_1, step)) { zephir_read_property(&_12$$4, this_ptr, ZEND_STRL("filledChar"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_13$$4, this_ptr, ZEND_STRL("width"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_RETURN_CALL_FUNCTION("str_repeat", &_8, 22, &_12$$4, &_13$$4); + ZEPHIR_RETURN_CALL_FUNCTION("str_repeat", &_8, 20, &_12$$4, &_13$$4); zephir_check_call_status(); RETURN_MM(); } else { zephir_read_property(&_14$$5, this_ptr, ZEND_STRL("unfilledChar"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_15$$5, this_ptr, ZEND_STRL("width"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_RETURN_CALL_FUNCTION("str_repeat", &_8, 22, &_14$$5, &_15$$5); + ZEPHIR_RETURN_CALL_FUNCTION("str_repeat", &_8, 20, &_14$$5, &_15$$5); zephir_check_call_status(); RETURN_MM(); } @@ -287,25 +287,25 @@ PHP_METHOD(Stub_Statements, test544IssueWithVariable) unfilledWidth = (((zephir_get_numberval(&_2$$3) - 1)) - filledWidth); zephir_read_property(&_3$$3, this_ptr, ZEND_STRL("filledChar"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_4$$3, filledWidth); - ZEPHIR_CALL_FUNCTION(&_5$$3, "str_repeat", &_6, 22, &_3$$3, &_4$$3); + ZEPHIR_CALL_FUNCTION(&_5$$3, "str_repeat", &_6, 20, &_3$$3, &_4$$3); zephir_check_call_status(); zephir_read_property(&_4$$3, this_ptr, ZEND_STRL("arrow"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_7$$3, this_ptr, ZEND_STRL("unfilledChar"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_8$$3, unfilledWidth); - ZEPHIR_CALL_FUNCTION(&_9$$3, "str_repeat", &_6, 22, &_7$$3, &_8$$3); + ZEPHIR_CALL_FUNCTION(&_9$$3, "str_repeat", &_6, 20, &_7$$3, &_8$$3); zephir_check_call_status(); ZEPHIR_CONCAT_VVV(return_value, &_5$$3, &_4$$3, &_9$$3); RETURN_MM(); } else if (step == totalSteps) { zephir_read_property(&_10$$4, this_ptr, ZEND_STRL("filledChar"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_11$$4, this_ptr, ZEND_STRL("width"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_RETURN_CALL_FUNCTION("str_repeat", &_6, 22, &_10$$4, &_11$$4); + ZEPHIR_RETURN_CALL_FUNCTION("str_repeat", &_6, 20, &_10$$4, &_11$$4); zephir_check_call_status(); RETURN_MM(); } else { zephir_read_property(&_12$$5, this_ptr, ZEND_STRL("unfilledChar"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_13$$5, this_ptr, ZEND_STRL("width"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_RETURN_CALL_FUNCTION("str_repeat", &_6, 22, &_12$$5, &_13$$5); + ZEPHIR_RETURN_CALL_FUNCTION("str_repeat", &_6, 20, &_12$$5, &_13$$5); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/stub/strings.zep.c b/ext/stub/strings.zep.c index 2251cba71..07cb88b6e 100644 --- a/ext/stub/strings.zep.c +++ b/ext/stub/strings.zep.c @@ -679,7 +679,7 @@ PHP_METHOD(Stub_Strings, strToHex) _1$$3 = ZEPHIR_STRING_OFFSET(&value, i); ZEPHIR_INIT_NVAR(&_2$$3); ZVAL_STRINGL(&_2$$3, &_1$$3, 1); - ZEPHIR_CALL_FUNCTION(&_3$$3, "ord", &_4, 101, &_2$$3); + ZEPHIR_CALL_FUNCTION(&_3$$3, "ord", &_4, 99, &_2$$3); zephir_check_call_status(); ZEPHIR_CALL_FUNCTION(&_5$$3, "dechex", &_6, 11, &_3$$3); zephir_check_call_status(); @@ -737,17 +737,17 @@ PHP_METHOD(Stub_Strings, issue1267) zephir_fast_str_replace(&_0, &_1, &_2, value); ZEPHIR_CPY_WRT(value, &_0); ZVAL_LONG(&_3, 513); - ZEPHIR_CALL_FUNCTION(&_4, "filter_var", NULL, 44, value, &_3); + ZEPHIR_CALL_FUNCTION(&_4, "filter_var", NULL, 42, value, &_3); zephir_check_call_status(); ZEPHIR_CPY_WRT(value, &_4); ZEPHIR_INIT_NVAR(&_0); - ZEPHIR_CALL_FUNCTION(&_4, "strip_tags", &_5, 102, value); + ZEPHIR_CALL_FUNCTION(&_4, "strip_tags", &_5, 100, value); zephir_check_call_status(); zephir_stripslashes(&_0, &_4); ZEPHIR_INIT_VAR(&x); zephir_fast_trim(&x, &_0, NULL , ZEPHIR_TRIM_BOTH); ZEPHIR_INIT_VAR(&_6); - ZEPHIR_CALL_FUNCTION(&_7, "strip_tags", &_5, 102, value); + ZEPHIR_CALL_FUNCTION(&_7, "strip_tags", &_5, 100, value); zephir_check_call_status(); zephir_stripcslashes(&_6, &_7); zephir_fast_trim(return_value, &_6, NULL , ZEPHIR_TRIM_BOTH); diff --git a/ext/stub/stubs.zep.c b/ext/stub/stubs.zep.c index c8f0b49cc..03abe44f1 100644 --- a/ext/stub/stubs.zep.c +++ b/ext/stub/stubs.zep.c @@ -15,6 +15,8 @@ #include "kernel/object.h" #include "kernel/operators.h" #include "kernel/memory.h" +#include "kernel/array.h" +#include "kernel/main.h" /** @@ -140,3 +142,31 @@ PHP_METHOD(Stub_Stubs, testMixedInputParamsDocBlockDeclared) RETURN_LONG(number); } +/** + * @param string ...$column + * @return void + */ +PHP_METHOD(Stub_Stubs, testVariableLength) +{ + zval _0, _1; + zval data; + zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; + zval *this_ptr = getThis(); + + ZVAL_UNDEF(&data); + ZVAL_UNDEF(&_0); + ZVAL_UNDEF(&_1); + + + ZEPHIR_MM_GROW(); + + ZEPHIR_INIT_VAR(&data); + array_init(&data); + ZEPHIR_INIT_VAR(&_0); + ZEPHIR_INIT_VAR(&_1); + zephir_get_args(&_1); + zephir_fast_array_merge(&_0, &data, &_1); + ZEPHIR_CPY_WRT(&data, &_0); + ZEPHIR_MM_RESTORE(); +} + diff --git a/ext/stub/stubs.zep.h b/ext/stub/stubs.zep.h index 719bf2152..2c068a11a 100644 --- a/ext/stub/stubs.zep.h +++ b/ext/stub/stubs.zep.h @@ -7,6 +7,7 @@ PHP_METHOD(Stub_Stubs, testDockBlockAndReturnType); PHP_METHOD(Stub_Stubs, testDocBlockAndReturnTypeDeclared); PHP_METHOD(Stub_Stubs, testMixedInputParamsDocBlock); PHP_METHOD(Stub_Stubs, testMixedInputParamsDocBlockDeclared); +PHP_METHOD(Stub_Stubs, testVariableLength); ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stub_stubs_testdockblockandreturntype, 0, 0, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -24,10 +25,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stub_stubs_testmixedinputparamsd ZEND_ARG_TYPE_INFO(0, number, IS_LONG, 0) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stub_stubs_testvariablelength, 0, 0, IS_VOID, 0) +ZEND_END_ARG_INFO() + ZEPHIR_INIT_FUNCS(stub_stubs_method_entry) { PHP_ME(Stub_Stubs, testDockBlockAndReturnType, arginfo_stub_stubs_testdockblockandreturntype, ZEND_ACC_PUBLIC) PHP_ME(Stub_Stubs, testDocBlockAndReturnTypeDeclared, arginfo_stub_stubs_testdocblockandreturntypedeclared, ZEND_ACC_PUBLIC) PHP_ME(Stub_Stubs, testMixedInputParamsDocBlock, arginfo_stub_stubs_testmixedinputparamsdocblock, ZEND_ACC_PUBLIC) PHP_ME(Stub_Stubs, testMixedInputParamsDocBlockDeclared, arginfo_stub_stubs_testmixedinputparamsdocblockdeclared, ZEND_ACC_PUBLIC) + PHP_ME(Stub_Stubs, testVariableLength, arginfo_stub_stubs_testvariablelength, ZEND_ACC_PUBLIC) PHP_FE_END }; diff --git a/ext/stub/trytest.zep.c b/ext/stub/trytest.zep.c index 3a49e9594..757a5c149 100644 --- a/ext/stub/trytest.zep.c +++ b/ext/stub/trytest.zep.c @@ -54,7 +54,7 @@ PHP_METHOD(Stub_TryTest, testThrow2) ZVAL_STRING(&message, "error"); ZEPHIR_INIT_VAR(&_0); object_init_ex(&_0, zend_ce_exception); - ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 30, &message); + ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 28, &message); zephir_check_call_status(); zephir_throw_exception_debug(&_0, "stub/trytest.zep", 16); ZEPHIR_MM_RESTORE(); @@ -96,7 +96,7 @@ PHP_METHOD(Stub_TryTest, testTry2) object_init_ex(&_0$$3, zend_ce_exception); ZEPHIR_INIT_VAR(&_1$$3); ZVAL_STRING(&_1$$3, "error!"); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 30, &_1$$3); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 28, &_1$$3); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_0$$3, "stub/trytest.zep", 27); goto try_end_1; @@ -129,7 +129,7 @@ PHP_METHOD(Stub_TryTest, testTry3) object_init_ex(&_0$$3, zend_ce_exception); ZEPHIR_INIT_VAR(&_1$$3); ZVAL_STRING(&_1$$3, "error!"); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 30, &_1$$3); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 28, &_1$$3); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_0$$3, "stub/trytest.zep", 34); goto try_end_1; @@ -187,7 +187,7 @@ PHP_METHOD(Stub_TryTest, testTry4) object_init_ex(&_0$$4, zend_ce_exception); ZEPHIR_INIT_VAR(&_1$$4); ZVAL_STRING(&_1$$4, "error!"); - ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 30, &_1$$4); + ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 28, &_1$$4); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_0$$4, "stub/trytest.zep", 46); goto try_end_1; @@ -197,7 +197,7 @@ PHP_METHOD(Stub_TryTest, testTry4) object_init_ex(&_2$$5, spl_ce_RuntimeException); ZEPHIR_INIT_VAR(&_3$$5); ZVAL_STRING(&_3$$5, "error!"); - ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 103, &_3$$5); + ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 101, &_3$$5); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_2$$5, "stub/trytest.zep", 48); goto try_end_1; @@ -262,7 +262,7 @@ PHP_METHOD(Stub_TryTest, testTry5) object_init_ex(&_0$$4, zend_ce_exception); ZEPHIR_INIT_VAR(&_1$$4); ZVAL_STRING(&_1$$4, "error!"); - ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 30, &_1$$4); + ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 28, &_1$$4); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_0$$4, "stub/trytest.zep", 63); goto try_end_1; @@ -272,7 +272,7 @@ PHP_METHOD(Stub_TryTest, testTry5) object_init_ex(&_2$$5, spl_ce_RuntimeException); ZEPHIR_INIT_VAR(&_3$$5); ZVAL_STRING(&_3$$5, "error!"); - ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 103, &_3$$5); + ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 101, &_3$$5); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_2$$5, "stub/trytest.zep", 65); goto try_end_1; @@ -336,7 +336,7 @@ PHP_METHOD(Stub_TryTest, testTry6) object_init_ex(&_0$$4, zend_ce_exception); ZEPHIR_INIT_VAR(&_1$$4); ZVAL_STRING(&_1$$4, "error!"); - ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 30, &_1$$4); + ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 28, &_1$$4); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_0$$4, "stub/trytest.zep", 80); goto try_end_1; @@ -346,7 +346,7 @@ PHP_METHOD(Stub_TryTest, testTry6) object_init_ex(&_2$$5, spl_ce_RuntimeException); ZEPHIR_INIT_VAR(&_3$$5); ZVAL_STRING(&_3$$5, "error!"); - ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 103, &_3$$5); + ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 101, &_3$$5); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_2$$5, "stub/trytest.zep", 82); goto try_end_1; @@ -409,7 +409,7 @@ PHP_METHOD(Stub_TryTest, testTry7) object_init_ex(&_0$$4, zend_ce_exception); ZEPHIR_INIT_VAR(&_1$$4); ZVAL_STRING(&_1$$4, "error!"); - ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 30, &_1$$4); + ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 28, &_1$$4); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_0$$4, "stub/trytest.zep", 99); goto try_end_1; @@ -419,7 +419,7 @@ PHP_METHOD(Stub_TryTest, testTry7) object_init_ex(&_2$$5, spl_ce_RuntimeException); ZEPHIR_INIT_VAR(&_3$$5); ZVAL_STRING(&_3$$5, "error!"); - ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 103, &_3$$5); + ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 101, &_3$$5); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_2$$5, "stub/trytest.zep", 101); goto try_end_1; @@ -466,7 +466,7 @@ PHP_METHOD(Stub_TryTest, testTry8) object_init_ex(&_0$$3, zend_ce_exception); ZEPHIR_INIT_VAR(&_1$$3); ZVAL_STRING(&_1$$3, "error 1!"); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 30, &_1$$3); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 28, &_1$$3); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_0$$3, "stub/trytest.zep", 111); goto try_end_1; @@ -515,7 +515,7 @@ PHP_METHOD(Stub_TryTest, testTry9) /* try_start_1: */ - ZEPHIR_CALL_METHOD(NULL, this_ptr, "somemethod1", NULL, 104); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "somemethod1", NULL, 102); zephir_check_call_status_or_jump(try_end_1); RETURN_MM_STRING("not catched"); @@ -550,7 +550,7 @@ PHP_METHOD(Stub_TryTest, testTry10) /* try_start_1: */ - ZEPHIR_CALL_METHOD(NULL, this_ptr, "somemethod2", NULL, 105); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "somemethod2", NULL, 103); zephir_check_call_status_or_jump(try_end_1); RETURN_MM_STRING("not catched"); diff --git a/ext/stub/vars.zep.c b/ext/stub/vars.zep.c index bfd101860..c2692a3af 100644 --- a/ext/stub/vars.zep.c +++ b/ext/stub/vars.zep.c @@ -73,7 +73,7 @@ PHP_METHOD(Stub_Vars, testParam) } ZEPHIR_INIT_NVAR(&v); ZVAL_COPY(&v, _1); - ZEPHIR_CALL_FUNCTION(&_5$$3, "realpath", &_6, 68, &v); + ZEPHIR_CALL_FUNCTION(&_5$$3, "realpath", &_6, 66, &v); zephir_check_call_status(); zephir_array_update_multi(&config, &_5$$3, SL("sz"), 3, SL("dir"), &k); } ZEND_HASH_FOREACH_END(); @@ -90,7 +90,7 @@ PHP_METHOD(Stub_Vars, testParam) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&v, &_0, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&_7$$4, "realpath", &_6, 68, &v); + ZEPHIR_CALL_FUNCTION(&_7$$4, "realpath", &_6, 66, &v); zephir_check_call_status(); zephir_array_update_multi(&config, &_7$$4, SL("sz"), 3, SL("dir"), &k); ZEPHIR_CALL_METHOD(NULL, &_0, "next", NULL, 0); diff --git a/stub/stubs.zep b/stub/stubs.zep index b1d5ed8dc..aada96e1e 100644 --- a/stub/stubs.zep +++ b/stub/stubs.zep @@ -63,4 +63,15 @@ class Stubs { return number; } + + /** + * @param string ...$column + * @return void + */ + public function testVariableLength() -> void + { + array data = []; + + let data = array_merge(data, func_get_args()); + } } diff --git a/tests/Zephir/Stubs/GeneratorTest.php b/tests/Zephir/Stubs/GeneratorTest.php index 8a28bd7d4..f6d40887d 100644 --- a/tests/Zephir/Stubs/GeneratorTest.php +++ b/tests/Zephir/Stubs/GeneratorTest.php @@ -229,7 +229,7 @@ public function propertyProvider(): array ['static'], 'string', 'A', 'static private $testProperty = \'A\';', ], [ - ['static', 'error'], 'empty-array', null, 'static private $testProperty = array();', + ['static', 'error'], 'empty-array', null, 'static private $testProperty = [];', ], [ [], 'null', null, 'private $testProperty = null;', @@ -298,7 +298,7 @@ public function constantProvider(): array 'char', 'A', 'const TEST = \'A\';', ], [ - 'empty-array', null, 'const TEST = array();', + 'empty-array', null, 'const TEST = [];', ], [ 'static-constant-access', ['left' => '\Pdo', 'right' => 'FETCH_LAZY'], 'const TEST = \\Pdo::FETCH_LAZY;', @@ -321,7 +321,7 @@ public function constantProvider(): array ], ], ], - 'const TEST = array(\'first\' => 1, \'second\' => 2, 3 => 0);', + 'const TEST = [\'first\' => 1, \'second\' => 2, 3 => 0];', ], ]; }