├── .ci ├── build-phar.sh └── release-notes.sh ├── .codacy.yml ├── .codecov.yml ├── .dir-locals.el ├── .docker ├── 8.0 │ ├── .bashrc │ └── Dockerfile ├── 8.1 │ ├── .bashrc │ └── Dockerfile ├── 8.2 │ ├── .bashrc │ └── Dockerfile ├── 8.3 │ ├── .bashrc │ └── Dockerfile └── 8.4 │ ├── .bashrc │ └── Dockerfile ├── .editorconfig ├── .gitattributes ├── .github ├── FUNDING.yml ├── pull_request_template.md └── workflows │ ├── build-linux-ext │ └── action.yml │ ├── build-macos-ext │ └── action.yml │ ├── build-win-ext │ └── action.yml │ ├── main.yml │ └── release.yml ├── .gitignore ├── .php-cs-fixer.dist.php ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── WINDOWS.md ├── box.json.dist ├── codecov.yml ├── composer.json ├── composer.lock ├── config.json ├── config ├── class-entries.php └── phalcon-compatibility-headers.php ├── docker-compose.yml ├── ext ├── .gitignore ├── clean ├── config.m4 ├── config.w32 ├── ext.h ├── ext_config.h ├── install ├── kernel │ ├── array.c │ ├── array.h │ ├── backtrace.c │ ├── backtrace.h │ ├── concat.c │ ├── concat.h │ ├── debug.c │ ├── debug.h │ ├── exception.c │ ├── exception.h │ ├── exit.c │ ├── exit.h │ ├── fcall.c │ ├── fcall.h │ ├── fcall_internal.h │ ├── file.c │ ├── file.h │ ├── filter.c │ ├── filter.h │ ├── globals.h │ ├── iterator.c │ ├── iterator.h │ ├── main.c │ ├── main.h │ ├── math.c │ ├── math.h │ ├── memory.c │ ├── memory.h │ ├── object.c │ ├── object.h │ ├── operators.c │ ├── operators.h │ ├── require.c │ ├── require.h │ ├── string.c │ ├── string.h │ ├── time.c │ ├── time.h │ ├── variables.c │ └── variables.h ├── php_ext.h ├── php_stub.h ├── stub.c ├── stub.h └── stub │ ├── 0__closure.zep.c │ ├── 0__closure.zep.h │ ├── 10__closure.zep.c │ ├── 10__closure.zep.h │ ├── 11__closure.zep.c │ ├── 11__closure.zep.h │ ├── 12__closure.zep.c │ ├── 12__closure.zep.h │ ├── 13__closure.zep.c │ ├── 13__closure.zep.h │ ├── 1__closure.zep.c │ ├── 1__closure.zep.h │ ├── 2__closure.zep.c │ ├── 2__closure.zep.h │ ├── 3__closure.zep.c │ ├── 3__closure.zep.h │ ├── 4__closure.zep.c │ ├── 4__closure.zep.h │ ├── 5__closure.zep.c │ ├── 5__closure.zep.h │ ├── 6__closure.zep.c │ ├── 6__closure.zep.h │ ├── 7__closure.zep.c │ ├── 7__closure.zep.h │ ├── 8__closure.zep.c │ ├── 8__closure.zep.h │ ├── 9__closure.zep.c │ ├── 9__closure.zep.h │ ├── arithmetic.zep.c │ ├── arithmetic.zep.h │ ├── arrayaccessarr.zep.c │ ├── arrayaccessarr.zep.h │ ├── arrayaccessobj.zep.c │ ├── arrayaccessobj.zep.h │ ├── arrayaccesstest.zep.c │ ├── arrayaccesstest.zep.h │ ├── arrayiterator.zep.c │ ├── arrayiterator.zep.h │ ├── arrayiteratortest.zep.c │ ├── arrayiteratortest.zep.h │ ├── arraymanipulation.zep.c │ ├── arraymanipulation.zep.h │ ├── arrayobject.zep.c │ ├── arrayobject.zep.h │ ├── arraysearch.zep.c │ ├── arraysearch.zep.h │ ├── assign.zep.c │ ├── assign.zep.h │ ├── bench │ ├── foo.zep.c │ └── foo.zep.h │ ├── bitwise.zep.c │ ├── bitwise.zep.h │ ├── branchprediction.zep.c │ ├── branchprediction.zep.h │ ├── builtin │ ├── arraymethods.zep.c │ ├── arraymethods.zep.h │ ├── charmethods.zep.c │ ├── charmethods.zep.h │ ├── intmethods.zep.c │ ├── intmethods.zep.h │ ├── stringmethods.zep.c │ └── stringmethods.zep.h │ ├── cast.zep.c │ ├── cast.zep.h │ ├── cblock.zep.c │ ├── cblock.zep.h │ ├── chars.zep.c │ ├── chars.zep.h │ ├── closures.zep.c │ ├── closures.zep.h │ ├── compare.zep.c │ ├── compare.zep.h │ ├── concat.zep.c │ ├── concat.zep.h │ ├── constants.zep.c │ ├── constants.zep.h │ ├── constantsinterface.zep.c │ ├── constantsinterface.zep.h │ ├── constantsinterfacea.zep.c │ ├── constantsinterfacea.zep.h │ ├── constantsinterfaceb.zep.c │ ├── constantsinterfaceb.zep.h │ ├── constantsparent.zep.c │ ├── constantsparent.zep.h │ ├── constructors │ ├── issue1803.zep.c │ └── issue1803.zep.h │ ├── declaretest.zep.c │ ├── declaretest.zep.h │ ├── diinterface.zep.c │ ├── diinterface.zep.h │ ├── echoes.zep.c │ ├── echoes.zep.h │ ├── emptytest.zep.c │ ├── emptytest.zep.h │ ├── evaltest.zep.c │ ├── evaltest.zep.h │ ├── exception.zep.c │ ├── exception.zep.h │ ├── exceptions.zep.c │ ├── exceptions.zep.h │ ├── exists.zep.c │ ├── exists.zep.h │ ├── exitdie.zep.c │ ├── exitdie.zep.h │ ├── extendedinterface.zep.c │ ├── extendedinterface.zep.h │ ├── factorial.zep.c │ ├── factorial.zep.h │ ├── fannkuch.zep.c │ ├── fannkuch.zep.h │ ├── fasta.zep.c │ ├── fasta.zep.h │ ├── fcall.zep.c │ ├── fcall.zep.h │ ├── fetchtest.zep.c │ ├── fetchtest.zep.h │ ├── fibonnaci.zep.c │ ├── fibonnaci.zep.h │ ├── flow.zep.c │ ├── flow.zep.h │ ├── flow │ ├── switchflow.zep.c │ └── switchflow.zep.h │ ├── fortytwo.zep.c │ ├── fortytwo.zep.h │ ├── functional.zep.c │ ├── functional.zep.h │ ├── functionexists.zep.c │ ├── functionexists.zep.h │ ├── functions.zep.c │ ├── functions.zep.h │ ├── geometry.zep.c │ ├── geometry.zep.h │ ├── globals.zep.c │ ├── globals.zep.h │ ├── globals │ ├── env.zep.c │ ├── env.zep.h │ ├── post.zep.c │ ├── post.zep.h │ ├── server.zep.c │ ├── server.zep.h │ ├── serverrequestfactory.zep.c │ ├── serverrequestfactory.zep.h │ └── session │ │ ├── base.zep.c │ │ ├── base.zep.h │ │ ├── child.zep.c │ │ └── child.zep.h │ ├── instance.zep.c │ ├── instance.zep.h │ ├── instanceoff.zep.c │ ├── instanceoff.zep.h │ ├── integration │ └── psr │ │ ├── extendexternal.zep.c │ │ ├── extendexternal.zep.h │ │ └── http │ │ └── message │ │ ├── messageinterfaceex.zep.c │ │ └── messageinterfaceex.zep.h │ ├── interfaces │ ├── implementint.zep.c │ ├── implementint.zep.h │ ├── implementinterface.zep.c │ ├── implementinterface.zep.h │ ├── interfaceint.zep.c │ ├── interfaceint.zep.h │ ├── interfaceintsignature.zep.c │ ├── interfaceintsignature.zep.h │ ├── interfacestaticmethod.zep.c │ └── interfacestaticmethod.zep.h │ ├── internalclasses.zep.c │ ├── internalclasses.zep.h │ ├── internalinterfaces.zep.c │ ├── internalinterfaces.zep.h │ ├── invoke.zep.c │ ├── invoke.zep.h │ ├── invokes │ ├── abstractinvoker.zep.c │ ├── abstractinvoker.zep.h │ ├── abstractinvokercomplex.zep.c │ ├── abstractinvokercomplex.zep.h │ ├── abstractprotected.zep.c │ ├── abstractprotected.zep.h │ ├── invokeprotected.zep.c │ ├── invokeprotected.zep.h │ ├── invokeprotectedcomplex.zep.c │ └── invokeprotectedcomplex.zep.h │ ├── issettest.zep.c │ ├── issettest.zep.h │ ├── issue1134.zep.c │ ├── issue1134.zep.h │ ├── issue1404.zep.c │ ├── issue1404.zep.h │ ├── issue1521.zep.c │ ├── issue1521.zep.h │ ├── issue2165 │ ├── issue.zep.c │ ├── issue.zep.h │ ├── issueextendinterface.zep.c │ ├── issueextendinterface.zep.h │ ├── issueinterface.zep.c │ └── issueinterface.zep.h │ ├── issue663.zep.c │ ├── issue663.zep.h │ ├── issue887.zep.c │ ├── issue887.zep.h │ ├── issue893.zep.c │ ├── issue893.zep.h │ ├── issue914.zep.c │ ├── issue914.zep.h │ ├── issues.zep.c │ ├── issues.zep.h │ ├── json.zep.c │ ├── json.zep.h │ ├── logical.zep.c │ ├── logical.zep.h │ ├── mcall.zep.c │ ├── mcall.zep.h │ ├── mcall │ ├── caller.zep.c │ └── caller.zep.h │ ├── mcallchained.zep.c │ ├── mcallchained.zep.h │ ├── mcalldynamic.zep.c │ ├── mcalldynamic.zep.h │ ├── mcallinternal.zep.c │ ├── mcallinternal.zep.h │ ├── methodabstract.zep.c │ ├── methodabstract.zep.h │ ├── methodargs.zep.c │ ├── methodargs.zep.h │ ├── methodinterface.zep.c │ ├── methodinterface.zep.h │ ├── namespaces │ ├── a │ │ └── b │ │ │ ├── sub.zep.c │ │ │ └── sub.zep.h │ ├── classentry.zep.c │ └── classentry.zep.h │ ├── nativearray.zep.c │ ├── nativearray.zep.h │ ├── oo.zep.c │ ├── oo.zep.h │ ├── oo │ ├── abstractclass.zep.c │ ├── abstractclass.zep.h │ ├── abstractstatic.zep.c │ ├── abstractstatic.zep.h │ ├── concretestatic.zep.c │ ├── concretestatic.zep.h │ ├── constantsinterface.zep.c │ ├── constantsinterface.zep.h │ ├── deprecatedmethods.zep.c │ ├── deprecatedmethods.zep.h │ ├── dynamicprop.zep.c │ ├── dynamicprop.zep.h │ ├── extend │ │ ├── db │ │ │ ├── exception.zep.c │ │ │ ├── exception.zep.h │ │ │ └── query │ │ │ │ ├── exception.zep.c │ │ │ │ ├── exception.zep.h │ │ │ │ └── placeholder │ │ │ │ ├── exception.zep.c │ │ │ │ └── exception.zep.h │ │ ├── exception.zep.c │ │ ├── exception.zep.h │ │ └── spl │ │ │ ├── arrayobject.zep.c │ │ │ ├── arrayobject.zep.h │ │ │ ├── directoryiterator.zep.c │ │ │ ├── directoryiterator.zep.h │ │ │ ├── doublylinkedlist.zep.c │ │ │ ├── doublylinkedlist.zep.h │ │ │ ├── fileinfo.zep.c │ │ │ ├── fileinfo.zep.h │ │ │ ├── fileobject.zep.c │ │ │ ├── fileobject.zep.h │ │ │ ├── filesystemiterator.zep.c │ │ │ ├── filesystemiterator.zep.h │ │ │ ├── fixedarray.zep.c │ │ │ ├── fixedarray.zep.h │ │ │ ├── globiterator.zep.c │ │ │ ├── globiterator.zep.h │ │ │ ├── heap.zep.c │ │ │ ├── heap.zep.h │ │ │ ├── maxheap.zep.c │ │ │ ├── maxheap.zep.h │ │ │ ├── minheap.zep.c │ │ │ ├── minheap.zep.h │ │ │ ├── priorityqueue.zep.c │ │ │ ├── priorityqueue.zep.h │ │ │ ├── queue.zep.c │ │ │ ├── queue.zep.h │ │ │ ├── recursivedirectoryiterator.zep.c │ │ │ ├── recursivedirectoryiterator.zep.h │ │ │ ├── stack.zep.c │ │ │ ├── stack.zep.h │ │ │ ├── tempfileobject.zep.c │ │ │ └── tempfileobject.zep.h │ ├── extendpdoclass.zep.c │ ├── extendpdoclass.zep.h │ ├── ooconstruct.zep.c │ ├── ooconstruct.zep.h │ ├── ooconstructparams.zep.c │ ├── ooconstructparams.zep.h │ ├── oodestruct.zep.c │ ├── oodestruct.zep.h │ ├── oodynamica.zep.c │ ├── oodynamica.zep.h │ ├── oodynamicb.zep.c │ ├── oodynamicb.zep.h │ ├── oonativeimplements.zep.c │ ├── oonativeimplements.zep.h │ ├── oonoconstruct.zep.c │ ├── oonoconstruct.zep.h │ ├── ooparams.zep.c │ ├── ooparams.zep.h │ ├── param.zep.c │ ├── param.zep.h │ ├── propertyaccess.zep.c │ ├── propertyaccess.zep.h │ └── scopes │ │ ├── abstractclass.zep.c │ │ ├── abstractclass.zep.h │ │ ├── abstractclassmagic.zep.c │ │ ├── abstractclassmagic.zep.h │ │ ├── hasprivatemethod.zep.c │ │ ├── hasprivatemethod.zep.h │ │ ├── privatescopetester.zep.c │ │ ├── privatescopetester.zep.h │ │ ├── scopetesterinterface.zep.c │ │ └── scopetesterinterface.zep.h │ ├── ooimpl │ ├── abeginning.zep.c │ ├── abeginning.zep.h │ ├── zbeginning.zep.c │ └── zbeginning.zep.h │ ├── openssl.zep.c │ ├── openssl.zep.h │ ├── operator.zep.c │ ├── operator.zep.h │ ├── optimizers │ ├── acos.zep.c │ ├── acos.zep.h │ ├── arraymerge.zep.c │ ├── arraymerge.zep.h │ ├── asin.zep.c │ ├── asin.zep.h │ ├── cos.zep.c │ ├── cos.zep.h │ ├── createarray.zep.c │ ├── createarray.zep.h │ ├── isscalar.zep.c │ ├── isscalar.zep.h │ ├── ldexp.zep.c │ ├── ldexp.zep.h │ ├── sin.zep.c │ ├── sin.zep.h │ ├── sqrt.zep.c │ ├── sqrt.zep.h │ ├── strreplace.zep.c │ ├── strreplace.zep.h │ ├── substr.zep.c │ ├── substr.zep.h │ ├── tan.zep.c │ └── tan.zep.h │ ├── pdostatement.zep.c │ ├── pdostatement.zep.h │ ├── pregmatch.zep.c │ ├── pregmatch.zep.h │ ├── properties │ ├── app.zep.c │ ├── app.zep.h │ ├── extendspublicproperties.zep.c │ ├── extendspublicproperties.zep.h │ ├── getobjectvars.zep.c │ ├── getobjectvars.zep.h │ ├── privateproperties.zep.c │ ├── privateproperties.zep.h │ ├── propertyarray.zep.c │ ├── propertyarray.zep.h │ ├── propertyupdate.zep.c │ ├── propertyupdate.zep.h │ ├── protectedproperties.zep.c │ ├── protectedproperties.zep.h │ ├── publicproperties.zep.c │ ├── publicproperties.zep.h │ ├── staticprivateproperties.zep.c │ ├── staticprivateproperties.zep.h │ ├── staticpropertyarray.zep.c │ ├── staticpropertyarray.zep.h │ ├── staticprotectedproperties.zep.c │ ├── staticprotectedproperties.zep.h │ ├── staticpublicproperties.zep.c │ └── staticpublicproperties.zep.h │ ├── quantum.zep.c │ ├── quantum.zep.h │ ├── range.zep.c │ ├── range.zep.h │ ├── references.zep.c │ ├── references.zep.h │ ├── reflection.zep.c │ ├── reflection.zep.h │ ├── regexdna.zep.c │ ├── regexdna.zep.h │ ├── requires.zep.c │ ├── requires.zep.h │ ├── requires │ ├── external3.zep.c │ └── external3.zep.h │ ├── resourcetest.zep.c │ ├── resourcetest.zep.h │ ├── returns.zep.c │ ├── returns.zep.h │ ├── router.zep.c │ ├── router.zep.h │ ├── router │ ├── exception.zep.c │ ├── exception.zep.h │ ├── route.zep.c │ └── route.zep.h │ ├── scall.zep.c │ ├── scall.zep.h │ ├── scalldynamic.zep.c │ ├── scalldynamic.zep.h │ ├── scallexternal.zep.c │ ├── scallexternal.zep.h │ ├── scalllateconstruct.zep.c │ ├── scalllateconstruct.zep.h │ ├── scallparent.zep.c │ ├── scallparent.zep.h │ ├── scope.zep.c │ ├── scope.zep.h │ ├── sort.zep.c │ ├── sort.zep.h │ ├── spectralnorm.zep.c │ ├── spectralnorm.zep.h │ ├── spl.zep.c │ ├── spl.zep.h │ ├── spropertyaccess.zep.c │ ├── spropertyaccess.zep.h │ ├── statements.zep.c │ ├── statements.zep.h │ ├── strings.zep.c │ ├── strings.zep.h │ ├── stubs.zep.c │ ├── stubs.zep.h │ ├── ternary.zep.c │ ├── ternary.zep.h │ ├── testinterface.zep.c │ ├── testinterface.zep.h │ ├── trytest.zep.c │ ├── trytest.zep.h │ ├── typehinting │ ├── testabstract.zep.c │ └── testabstract.zep.h │ ├── typeinstances.zep.c │ ├── typeinstances.zep.h │ ├── typeoff.zep.c │ ├── typeoff.zep.h │ ├── types │ ├── maybe.zep.c │ ├── maybe.zep.h │ ├── mixedtype.zep.c │ ├── mixedtype.zep.h │ ├── obj.zep.c │ └── obj.zep.h │ ├── unknownclass.zep.c │ ├── unknownclass.zep.h │ ├── unsettest.zep.c │ ├── unsettest.zep.h │ ├── usetest.zep.c │ ├── usetest.zep.h │ ├── vars.zep.c │ └── vars.zep.h ├── kernel ├── README.md ├── array.c ├── array.h ├── backtrace.c ├── backtrace.h ├── debug.c ├── debug.h ├── exception.c ├── exception.h ├── exit.c ├── exit.h ├── fcall.c ├── fcall.h ├── file.c ├── file.h ├── filter.c ├── filter.h ├── globals.h ├── iterator.c ├── iterator.h ├── main.c ├── main.h ├── math.c ├── math.h ├── memory.c ├── memory.h ├── object.c ├── object.h ├── operators.c ├── operators.h ├── require.c ├── require.h ├── string.c ├── string.h ├── time.c ├── time.h ├── variables.c └── variables.h ├── phpcs.xml.dist ├── phpmd.xml.dist ├── phpunit.ext.xml ├── phpunit.xml.dist ├── prototypes ├── apache.php ├── apc.php ├── fpm.php ├── gd.php ├── iconv.php ├── igbinary.php ├── imagick.php ├── mcrypt.php ├── memcache.php ├── memcached.php ├── mongo.php ├── mongodb.php ├── msgpack.php ├── phalcon.php ├── redis.php ├── xcache.php └── yaml.php ├── qodana.sarif.json ├── qodana.yaml ├── src ├── AliasManager.php ├── Backend │ ├── Backend.php │ ├── FcallManager.php │ ├── FcallManagerInterface.php │ ├── StringsManager.php │ └── VariablesManager.php ├── Branch.php ├── BranchManager.php ├── Builder │ ├── FunctionCallBuilder.php │ ├── Operators │ │ ├── AbstractOperatorBuilder.php │ │ ├── CastOperatorBuilder.php │ │ └── UnaryOperatorBuilder.php │ ├── Statements │ │ ├── AbstractStatementBuilder.php │ │ ├── IfStatementBuilder.php │ │ └── LetStatementBuilder.php │ └── StatementsBlockBuilder.php ├── Cache │ ├── ClassEntryCache.php │ ├── FunctionCache.php │ ├── Manager.php │ ├── MethodCache.php │ ├── SlotsCache.php │ └── StaticMethodCache.php ├── Call.php ├── Class │ ├── Constant.php │ ├── Definition │ │ ├── AbstractDefinition.php │ │ ├── Definition.php │ │ └── DefinitionRuntime.php │ ├── Entry.php │ ├── Method │ │ ├── Method.php │ │ └── Parameters.php │ └── Property.php ├── Code │ ├── ArgInfoDefinition.php │ ├── Builder │ │ └── Struct.php │ └── Printer.php ├── CompilationContext.php ├── CompiledExpression.php ├── Compiler.php ├── Compiler │ ├── CompilerFileFactory.php │ └── FileInterface.php ├── CompilerFile.php ├── CompilerFileAnonymous.php ├── Config.php ├── ConfigException.php ├── Detectors │ ├── ForValueUseDetector.php │ ├── ReadDetector.php │ └── WriteDetector.php ├── Documentation.php ├── Documentation │ ├── Annotation.php │ ├── Annotation │ │ ├── Link.php │ │ ├── ReturnAnnotation.php │ │ └── See.php │ ├── Docblock.php │ ├── DocblockParser.php │ ├── File │ │ ├── ClassFile.php │ │ ├── ClassesFile.php │ │ ├── IndexFile.php │ │ ├── NamespaceFile.php │ │ ├── NamespacesFile.php │ │ ├── Sitemap.php │ │ └── SourceFile.php │ ├── FileInterface.php │ ├── NamespaceAccessor.php │ ├── NamespaceHelper.php │ ├── Template.php │ └── Theme.php ├── Exception.php ├── Exception │ ├── CompilerException.php │ ├── ExceptionExtraAwareTrait.php │ ├── ExceptionInterface.php │ ├── FileSystemException.php │ ├── IllegalOperationException.php │ ├── IllegalStateException.php │ ├── InvalidArgumentException.php │ ├── InvalidTypeException.php │ ├── LogicException.php │ ├── NotImplementedException.php │ ├── ParseException.php │ └── RuntimeException.php ├── Expression.php ├── Expression │ ├── Builder │ │ ├── AbstractBuilder.php │ │ ├── BuilderFactory.php │ │ ├── Factory │ │ │ ├── OperatorsFactory.php │ │ │ └── StatementsFactory.php │ │ ├── Operators │ │ │ ├── AbstractOperator.php │ │ │ ├── AssignPropertyOperator.php │ │ │ ├── AssignVariableOperator.php │ │ │ ├── BinaryOperator.php │ │ │ ├── RawOperator.php │ │ │ └── UnaryOperator.php │ │ ├── RawExpression.php │ │ └── Statements │ │ │ ├── AbstractStatement.php │ │ │ ├── CallFunctionStatement.php │ │ │ ├── CallMethodStatement.php │ │ │ ├── CallStaticStatement.php │ │ │ ├── IfStatement.php │ │ │ ├── LetStatement.php │ │ │ ├── RawStatement.php │ │ │ └── StatementsBlock.php │ ├── Closure.php │ ├── ClosureArrow.php │ ├── Constants.php │ ├── NativeArray.php │ ├── NativeArrayAccess.php │ ├── PropertyAccess.php │ ├── PropertyDynamicAccess.php │ ├── Reference.php │ ├── StaticConstantAccess.php │ └── StaticPropertyAccess.php ├── FileSystem │ ├── FileSystemInterface.php │ └── HardDisk.php ├── FunctionCall.php ├── FunctionDefinition.php ├── GlobalConstant.php ├── HeadersManager.php ├── LiteralCompiledExpression.php ├── Logger │ └── Formatter │ │ └── CompilerFormatter.php ├── MethodCall.php ├── Name.php ├── Operators │ ├── AbstractOperator.php │ ├── Arithmetical │ │ ├── AddOperator.php │ │ ├── ArithmeticalBaseOperator.php │ │ ├── DivOperator.php │ │ ├── ModOperator.php │ │ ├── MulOperator.php │ │ └── SubOperator.php │ ├── Bitwise │ │ ├── BitwiseAndOperator.php │ │ ├── BitwiseBaseOperator.php │ │ ├── BitwiseNotOperator.php │ │ ├── BitwiseOrOperator.php │ │ ├── BitwiseXorOperator.php │ │ ├── ShiftLeftOperator.php │ │ └── ShiftRightOperator.php │ ├── Comparison │ │ ├── ComparisonBaseOperator.php │ │ ├── EqualsOperator.php │ │ ├── GreaterEqualOperator.php │ │ ├── GreaterOperator.php │ │ ├── IdenticalOperator.php │ │ ├── LessEqualOperator.php │ │ ├── LessOperator.php │ │ ├── NotEqualsOperator.php │ │ └── NotIdenticalOperator.php │ ├── Logical │ │ ├── AndOperator.php │ │ ├── LogicalBaseOperator.php │ │ └── OrOperator.php │ ├── Other │ │ ├── CastOperator.php │ │ ├── CloneOperator.php │ │ ├── ConcatOperator.php │ │ ├── EmptyOperator.php │ │ ├── FetchOperator.php │ │ ├── InstanceOfOperator.php │ │ ├── IssetOperator.php │ │ ├── LikelyOperator.php │ │ ├── NewInstanceOperator.php │ │ ├── NewInstanceTypeOperator.php │ │ ├── RangeExclusiveOperator.php │ │ ├── RangeInclusiveOperator.php │ │ ├── RequireOnceOperator.php │ │ ├── RequireOperator.php │ │ ├── ShortTernaryOperator.php │ │ ├── TernaryOperator.php │ │ ├── TypeHintOperator.php │ │ ├── TypeOfOperator.php │ │ └── UnlikelyOperator.php │ └── Unary │ │ ├── MinusOperator.php │ │ └── NotOperator.php ├── Optimizers │ ├── EvalExpression.php │ ├── FunctionCall │ │ ├── ACosOptimizer.php │ │ ├── ASinOptimizer.php │ │ ├── AddslashesOptimizer.php │ │ ├── ArrayKeyExistsOptimizer.php │ │ ├── ArrayKeysOptimizer.php │ │ ├── ArrayMergeOptimizer.php │ │ ├── BasenameOptimizer.php │ │ ├── CallUserFuncArrayOptimizer.php │ │ ├── CallUserFuncOptimizer.php │ │ ├── CamelizeOptimizer.php │ │ ├── CeilOptimizer.php │ │ ├── ClassExistsOptimizer.php │ │ ├── CompareMtimeOptimizer.php │ │ ├── CosOptimizer.php │ │ ├── CountOptimizer.php │ │ ├── Crc32Optimizer.php │ │ ├── CreateArrayOptimizer.php │ │ ├── CreateInstanceOptimizer.php │ │ ├── CreateInstanceParamsOptimizer.php │ │ ├── CreateSymbolTableOptimizer.php │ │ ├── DieOptimizer.php │ │ ├── DoublevalOptimizer.php │ │ ├── EndsWithOptimizer.php │ │ ├── EvalOptimizer.php │ │ ├── ExitOptimizer.php │ │ ├── ExplodeOptimizer.php │ │ ├── FcloseOptimizer.php │ │ ├── FeofOptimizer.php │ │ ├── FileExistsOptimizer.php │ │ ├── FileGetContentsOptimizer.php │ │ ├── FilePutContentsOptimizer.php │ │ ├── FilemtimeOptimizer.php │ │ ├── FloorOptimizer.php │ │ ├── FuncGetArgOptimizer.php │ │ ├── FuncGetArgsOptimizer.php │ │ ├── FuncNumArgsOptimizer.php │ │ ├── FunctionExistsOptimizer.php │ │ ├── FwriteOptimizer.php │ │ ├── GetCalledClassOptimizer.php │ │ ├── GetClassLowerOptimizer.php │ │ ├── GetClassNsOptimizer.php │ │ ├── GetClassOptimizer.php │ │ ├── GetDefinedVarsOptimizer.php │ │ ├── GetNsClassOptimizer.php │ │ ├── GettypeOptimizer.php │ │ ├── GlobalsGetOptimizer.php │ │ ├── GlobalsSetOptimizer.php │ │ ├── HashEqualsOptimizer.php │ │ ├── ImplodeOptimizer.php │ │ ├── InArrayOptimizer.php │ │ ├── InterfaceExistsOptimizer.php │ │ ├── IntvalOptimizer.php │ │ ├── IsArrayOptimizer.php │ │ ├── IsBoolOptimizer.php │ │ ├── IsCallableOptimizer.php │ │ ├── IsIntOptimizer.php │ │ ├── IsNullOptimizer.php │ │ ├── IsNumericOptimizer.php │ │ ├── IsObjectOptimizer.php │ │ ├── IsPhpVersionOptimizer.php │ │ ├── IsPrivatePropertyOptimizer.php │ │ ├── IsResourceOptimizer.php │ │ ├── IsScalarOptimizer.php │ │ ├── IsStringOptimizer.php │ │ ├── JoinOptimizer.php │ │ ├── JsonDecodeOptimizer.php │ │ ├── JsonEncodeOptimizer.php │ │ ├── LdexpOptimizer.php │ │ ├── LtrimOptimizer.php │ │ ├── Md5Optimizer.php │ │ ├── MemstrOptimizer.php │ │ ├── MergeAppendOptimizer.php │ │ ├── MethodExistsOptimizer.php │ │ ├── MicrotimeOptimizer.php │ │ ├── PowOptimizer.php │ │ ├── PregMatchAllOptimizer.php │ │ ├── PregMatchOptimizer.php │ │ ├── PrepareVirtualPathOptimizer.php │ │ ├── RoundOptimizer.php │ │ ├── RtrimOptimizer.php │ │ ├── SinOptimizer.php │ │ ├── SqrtOptimizer.php │ │ ├── StartsWithOptimizer.php │ │ ├── StrReplaceOptimizer.php │ │ ├── StripcslashesOptimizer.php │ │ ├── StripslashesOptimizer.php │ │ ├── StrlenOptimizer.php │ │ ├── StrposOptimizer.php │ │ ├── StrtokOptimizer.php │ │ ├── StrtolowerOptimizer.php │ │ ├── StrtoupperOptimizer.php │ │ ├── SubstrOptimizer.php │ │ ├── TanOptimizer.php │ │ ├── TimeOptimizer.php │ │ ├── TrimOptimizer.php │ │ ├── UcfirstOptimizer.php │ │ ├── UncamelizeOptimizer.php │ │ ├── UniqueKeyOptimizer.php │ │ ├── UniquePathKeyOptimizer.php │ │ ├── VarDumpOptimizer.php │ │ ├── VarExportOptimizer.php │ │ └── ZephirStringToHexOptimizer.php │ ├── IsTypeOptimizerAbstract.php │ ├── MathOptimizer.php │ └── OptimizerAbstract.php ├── Os.php ├── Parser │ ├── Manager.php │ └── Parser.php ├── Passes │ ├── CallGathererPass.php │ ├── LocalContextPass.php │ ├── LoopBreakPass.php │ ├── MutateGathererPass.php │ ├── SkipVariantInit.php │ └── StaticTypeInference.php ├── Statements │ ├── BreakStatement.php │ ├── ContinueStatement.php │ ├── DeclareStatement.php │ ├── DoWhileStatement.php │ ├── EchoStatement.php │ ├── ForStatement.php │ ├── IfStatement.php │ ├── Let │ │ ├── ArrayIndex.php │ │ ├── ArrayIndexAppend.php │ │ ├── Decr.php │ │ ├── ExportSymbol.php │ │ ├── ExportSymbolString.php │ │ ├── Incr.php │ │ ├── ObjectDynamicProperty.php │ │ ├── ObjectDynamicStringProperty.php │ │ ├── ObjectProperty.php │ │ ├── ObjectPropertyAppend.php │ │ ├── ObjectPropertyArrayIndex.php │ │ ├── ObjectPropertyArrayIndexAppend.php │ │ ├── ObjectPropertyDecr.php │ │ ├── ObjectPropertyIncr.php │ │ ├── StaticProperty.php │ │ ├── StaticPropertyAdd.php │ │ ├── StaticPropertyAppend.php │ │ ├── StaticPropertyArrayIndex.php │ │ ├── StaticPropertyArrayIndexAppend.php │ │ ├── StaticPropertySub.php │ │ ├── Variable.php │ │ └── VariableAppend.php │ ├── LetStatement.php │ ├── LoopStatement.php │ ├── RequireOnceStatement.php │ ├── RequireStatement.php │ ├── ReturnStatement.php │ ├── StatementAbstract.php │ ├── SwitchStatement.php │ ├── ThrowStatement.php │ ├── TryCatchStatement.php │ ├── UnsetStatement.php │ └── WhileStatement.php ├── StatementsBlock.php ├── StaticCall.php ├── StringsManager.php ├── Stubs │ ├── DocBlock.php │ ├── Generator.php │ └── MethodDocBlock.php ├── SymbolTable.php ├── Traits │ ├── CompilerTrait.php │ └── VariablesTrait.php ├── TypeAwareInterface.php ├── Types │ ├── AbstractType.php │ ├── ArrayType.php │ ├── CharType.php │ ├── DoubleType.php │ ├── IntType.php │ ├── IstringType.php │ ├── StringType.php │ └── Types.php ├── Variable │ ├── Globals.php │ └── Variable.php └── Zephir.php ├── stub ├── arithmetic.zep ├── arrayaccessarr.zep ├── arrayaccessobj.zep ├── arrayaccesstest.zep ├── arrayiterator.zep ├── arrayiteratortest.zep ├── arraymanipulation.zep ├── arrayobject.zep ├── arraysearch.zep ├── assign.zep ├── bench │ └── foo.zep ├── bitwise.zep ├── branchprediction.zep ├── builtin │ ├── arraymethods.zep │ ├── charmethods.zep │ ├── intmethods.zep │ └── stringmethods.zep ├── cast.zep ├── cblock.zep ├── chars.zep ├── closures.zep ├── compare.zep ├── concat.zep ├── constants.zep ├── constantsinterface.zep ├── constantsinterfacea.zep ├── constantsinterfaceb.zep ├── constantsparent.zep ├── constructors │ └── issue1803.zep ├── declaretest.zep ├── diinterface.zep ├── echoes.zep ├── emptytest.zep ├── evaltest.zep ├── exception.zep ├── exceptions.zep ├── exists.zep ├── exitdie.zep ├── extendedinterface.zep ├── factorial.zep ├── fannkuch.zep ├── fasta.zep ├── fcall.zep ├── fetchtest.zep ├── fibonnaci.zep ├── flow.zep ├── flow │ └── switchflow.zep ├── fortytwo.zep ├── functional.zep ├── functionexists.zep ├── functions.zep ├── geometry.zep ├── globals.zep ├── globals │ ├── env.zep │ ├── post.zep │ ├── server.zep │ ├── serverrequestfactory.zep │ └── session │ │ ├── base.zep │ │ └── child.zep ├── instance.zep ├── instanceoff.zep ├── integration │ └── psr │ │ ├── extendexternal.zep │ │ └── http │ │ └── message │ │ └── messageinterfaceex.zep ├── interfaces │ ├── implementint.zep │ ├── implementinterface.zep │ ├── interfaceint.zep │ ├── interfaceintsignature.zep │ └── interfacestaticmethod.zep ├── internalclasses.zep ├── internalinterfaces.zep ├── invoke.zep ├── invokes │ ├── abstractinvoker.zep │ ├── abstractinvokercomplex.zep │ ├── abstractprotected.zep │ ├── invokeprotected.zep │ └── invokeprotectedcomplex.zep ├── issettest.zep ├── issue1134.zep ├── issue1404.zep ├── issue1521.zep ├── issue2165 │ ├── issue.zep │ ├── issueextendinterface.zep │ └── issueinterface.zep ├── issue663.zep ├── issue887.zep ├── issue893.zep ├── issue914.zep ├── issues.zep ├── json.zep ├── logical.zep ├── mcall.zep ├── mcall │ └── caller.zep ├── mcallchained.zep ├── mcalldynamic.zep ├── mcallinternal.zep ├── methodabstract.zep ├── methodargs.zep ├── methodinterface.zep ├── namespaces │ ├── a │ │ └── b │ │ │ └── sub.zep │ └── classentry.zep ├── nativearray.zep ├── oo.zep ├── oo │ ├── abstractclass.zep │ ├── abstractstatic.zep │ ├── concretestatic.zep │ ├── constantsinterface.zep │ ├── deprecatedmethods.zep │ ├── dynamicprop.zep │ ├── extend │ │ ├── Exception.zep │ │ ├── db │ │ │ ├── Exception.zep │ │ │ └── query │ │ │ │ ├── Exception.zep │ │ │ │ └── placeholder │ │ │ │ └── Exception.zep │ │ └── spl │ │ │ ├── ArrayObject.zep │ │ │ ├── DirectoryIterator.zep │ │ │ ├── DoublyLinkedList.zep │ │ │ ├── FileInfo.zep │ │ │ ├── FileObject.zep │ │ │ ├── FilesystemIterator.zep │ │ │ ├── FixedArray.zep │ │ │ ├── GlobIterator.zep │ │ │ ├── Heap.zep │ │ │ ├── MaxHeap.zep │ │ │ ├── MinHeap.zep │ │ │ ├── PriorityQueue.zep │ │ │ ├── Queue.zep │ │ │ ├── RecursiveDirectoryIterator.zep │ │ │ ├── Stack.zep │ │ │ └── TempFileObject.zep │ ├── extendpdoclass.zep │ ├── ooconstruct.zep │ ├── ooconstructparams.zep │ ├── oodestruct.zep │ ├── oodynamica.zep │ ├── oodynamicb.zep │ ├── oonativeimplements.zep │ ├── oonoconstruct.zep │ ├── ooparams.zep │ ├── param.zep │ ├── propertyaccess.zep │ └── scopes │ │ ├── abstractclass.zep │ │ ├── abstractclassmagic.zep │ │ ├── hasprivatemethod.zep │ │ ├── privatescopetester.zep │ │ └── scopetesterinterface.zep ├── ooimpl │ ├── abeginning.zep │ └── zbeginning.zep ├── openssl.zep ├── operator.zep ├── optimizers │ ├── IsScalar.zep │ ├── acos.zep │ ├── arraymerge.zep │ ├── asin.zep │ ├── cos.zep │ ├── createarray.zep │ ├── ldexp.zep │ ├── sin.zep │ ├── sqrt.zep │ ├── strreplace.zep │ ├── substr.zep │ └── tan.zep ├── pdostatement.zep ├── pregmatch.zep ├── properties │ ├── app.zep │ ├── extendspublicproperties.zep │ ├── getobjectvars.zep │ ├── privateproperties.zep │ ├── propertyarray.zep │ ├── propertyupdate.zep │ ├── protectedproperties.zep │ ├── publicproperties.zep │ ├── staticprivateproperties.zep │ ├── staticpropertyarray.zep │ ├── staticprotectedproperties.zep │ └── staticpublicproperties.zep ├── quantum.zep ├── range.zep ├── references.zep ├── reflection.zep ├── regexdna.zep ├── requires.zep ├── requires │ └── External3.zep ├── resourcetest.zep ├── returns.zep ├── router.zep ├── router │ ├── exception.zep │ └── route.zep ├── scall.zep ├── scalldynamic.zep ├── scallexternal.zep ├── scalllateconstruct.zep ├── scallparent.zep ├── scope.zep ├── sort.zep ├── spectralnorm.zep ├── spl.zep ├── spropertyaccess.zep ├── statements.zep ├── strings.zep ├── stubs.zep ├── ternary.zep ├── testinterface.zep ├── trytest.zep ├── typehinting │ └── testabstract.zep ├── typeinstances.zep ├── typeoff.zep ├── types │ ├── maybe.zep │ ├── mixedtype.zep │ └── obj.zep ├── unknownclass.zep ├── unsettest.zep ├── usetest.zep └── vars.zep ├── templates ├── Api │ ├── default-config.json │ ├── sitemap.php │ └── themes │ │ ├── api-base │ │ ├── class.phtml │ │ ├── classes.phtml │ │ ├── index.phtml │ │ ├── namespace.phtml │ │ ├── namespaces.phtml │ │ ├── partials │ │ │ ├── analytics.phtml │ │ │ └── assets.phtml │ │ ├── source.phtml │ │ ├── static │ │ │ ├── jquery.min.js │ │ │ └── zephir-doc.js │ │ └── theme.json │ │ └── zephir │ │ ├── layout │ │ └── layout.phtml │ │ ├── partials │ │ ├── breadcrumb.phtml │ │ ├── class │ │ │ ├── content.phtml │ │ │ ├── method-details.phtml │ │ │ ├── method-summary-params.phtml │ │ │ └── method-summary.phtml │ │ ├── classes.phtml │ │ ├── index.phtml │ │ ├── namespace │ │ │ ├── content.phtml │ │ │ ├── method-details.phtml │ │ │ ├── method-summary-params.phtml │ │ │ └── method-summary.phtml │ │ ├── namespaces.phtml │ │ └── source.phtml │ │ ├── static │ │ ├── prettify.css │ │ ├── prettify.js │ │ └── zephir-theme.css │ │ └── theme.json └── engine │ ├── clean │ ├── config.m4 │ ├── config.w32 │ ├── ext.h │ ├── ext_config.h │ ├── install │ ├── php_ext.h │ ├── php_project.h │ ├── pkg-config-check.m4 │ ├── pkg-config.m4 │ ├── project.c │ └── project.h ├── tests ├── Extension │ ├── ArithmeticTest.php │ ├── ArrayAccessObjTest.php │ ├── ArrayAccessTest.php │ ├── ArrayIteratorTest.php │ ├── ArrayManipulationTest.php │ ├── ArrayObjectTest.php │ ├── ArraySearchTest.php │ ├── AssignTest.php │ ├── BitwiseTest.php │ ├── BranchPredictionTest.php │ ├── BuiltIn │ │ ├── CharMethodTest.php │ │ ├── IntMethodTest.php │ │ └── StringMethodTest.php │ ├── CastTest.php │ ├── CblockTest.php │ ├── CharsTest.php │ ├── ClosureTest.php │ ├── CompareTest.php │ ├── ConcatTest.php │ ├── ConstantsInterfaceTest.php │ ├── ConstantsTest.php │ ├── Constructors │ │ └── Issue1803Test.php │ ├── DeclareTest.php │ ├── DynamicPropTest.php │ ├── EmptyTest.php │ ├── EvalTest.php │ ├── ExceptionsTest.php │ ├── ExistsTest.php │ ├── ExitDieTest.php │ ├── ExtendedInterfaceTest.php │ ├── ExtensionInfoTest.php │ ├── FcallTest.php │ ├── FetchTest.php │ ├── FibonnaciTest.php │ ├── Flow │ │ └── SwitchFlowTest.php │ ├── FlowTest.php │ ├── FunctionExistsTest.php │ ├── FunctionsTest.php │ ├── Globals │ │ ├── EnvTest.php │ │ ├── PostTest.php │ │ ├── ServerRequestFactoryTest.php │ │ ├── ServerTest.php │ │ └── SessionTest.php │ ├── GlobalsTest.php │ ├── InstanceOffTest.php │ ├── InstanceTest.php │ ├── Integral │ │ ├── FannkuchTest.php │ │ ├── RegexDNATest.php │ │ └── SortTest.php │ ├── Interfaces │ │ └── InterfaceMethodSignatureTest.php │ ├── InternalClassesTest.php │ ├── InvokeTest.php │ ├── IssetTest.php │ ├── Issue1134Test.php │ ├── Issue1521Test.php │ ├── Issue2165Test.php │ ├── Issue663Test.php │ ├── Issue887Test.php │ ├── Issue893Test.php │ ├── Issue914Test.php │ ├── JsonTest.php │ ├── MCallDynamicTest.php │ ├── MCallTest.php │ ├── McallChainedTest.php │ ├── McallInternalTest.php │ ├── MethodArgsTest.php │ ├── Namespaces │ │ └── ClassEntryTest.php │ ├── NativeArrayTest.php │ ├── NewInstanceOperatorTest.php │ ├── Oo │ │ ├── ExtendClassTest.php │ │ ├── OoParamsStrictTest.php │ │ ├── OoParamsTest.php │ │ └── Scopes │ │ │ └── PrivateScopeTest.php │ ├── OoTest.php │ ├── OpensslTest.php │ ├── OperatorTest.php │ ├── Optimizers │ │ ├── ArrayMergeTest.php │ │ ├── CreateArrayTest.php │ │ ├── IsPhpVersionTest.php │ │ ├── IsScalarTest.php │ │ ├── MathTest.php │ │ ├── StrReplaceTest.php │ │ └── SubstrTest.php │ ├── PregmatchTest.php │ ├── Properties │ │ ├── GetObjectVarsTest.php │ │ ├── PrivatePropertiesTest.php │ │ ├── PropertyArrayTest.php │ │ ├── PropertyUpdateTest.php │ │ ├── ProtectedPropertiesTest.php │ │ ├── PublicPropertiesTest.php │ │ ├── StaticPrivatePropertiesTest.php │ │ ├── StaticPropertyArrayTest.php │ │ ├── StaticProtectedPropertiesTest.php │ │ └── StaticPublicPropertiesTest.php │ ├── ReflectionTest.php │ ├── RequiresTest.php │ ├── ResourceTest.php │ ├── ReturnsTest.php │ ├── RouterTest.php │ ├── SPropertyAccessTest.php │ ├── ScallExternalTest.php │ ├── ScallLateConstructTest.php │ ├── ScallTest.php │ ├── ScopeTest.php │ ├── SplTest.php │ ├── StatementsTest.php │ ├── StringTest.php │ ├── TernaryTest.php │ ├── TryTest.php │ ├── TypeHinting │ │ └── AbstractTest.php │ ├── TypeoffTest.php │ ├── Types │ │ ├── MixedTypeTest.php │ │ ├── ObjTypeTest.php │ │ └── UnionTypesTest.php │ ├── UnsetTest.php │ └── VarsTest.php ├── Zephir │ ├── AliasManagerTest.php │ ├── Backends │ │ └── ZendEngine3 │ │ │ └── BackendTest.php │ ├── Class │ │ └── EntryTest.php │ ├── CompilerFile │ │ ├── CheckDependenciesTest.php │ │ └── CheckPathSeparatorTest.php │ ├── ConfigExceptionTest.php │ ├── ConfigTest.php │ ├── Detectors │ │ └── ReadDetectorTest.php │ ├── Documentation │ │ ├── Annotation │ │ │ ├── LinkTest.php │ │ │ ├── ReturnAnnotationTest.php │ │ │ └── SeeTest.php │ │ ├── AnnotationTest.php │ │ ├── DocblockParserTest.php │ │ └── DocblockTest.php │ ├── Logger │ │ └── Formatter │ │ │ └── CompilerFormatterTest.php │ ├── NameTest.php │ ├── Optimizers │ │ └── FunctionCall │ │ │ └── PregMatchOptimizerTest.php │ ├── Statements │ │ └── Let │ │ │ └── VariableTest.php │ ├── Stubs │ │ ├── DocBlockTest.php │ │ ├── GeneratorTest.php │ │ └── MethodDocBlockTest.php │ ├── TypesTest.php │ └── Variable │ │ ├── GlobalsTest.php │ │ └── VariableTest.php ├── ext-bootstrap.php ├── fixtures │ ├── badconfig │ │ └── config.json │ ├── base-definition.php │ ├── class-empty.php │ ├── deps │ │ ├── config.json │ │ └── deps │ │ │ └── test.zep │ ├── devmode │ │ ├── .gitignore │ │ ├── config.json │ │ └── devmode │ │ │ └── test.zep │ ├── exists.php │ ├── exit.php │ ├── exit_int.php │ ├── exit_string.php │ ├── genfailure1 │ ├── genfailure2 │ ├── internal │ │ ├── .gitignore │ │ ├── config.json │ │ ├── expected │ │ │ └── issue-1956.txt │ │ └── internaltest │ │ │ └── test.zep │ ├── lifecycle │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── config.json │ │ ├── expected3.c │ │ └── lifecycle │ │ │ └── test.zep │ ├── logger │ │ └── closures.zep │ ├── mocks │ │ ├── ExtendsProtectedProperties.php │ │ ├── TestAbstractClass.php │ │ ├── TestConcreteClass.php │ │ ├── TestExClass.php │ │ ├── TestExInterface.php │ │ ├── TestScopeExtending.php │ │ ├── TestScopeExtendingMagic.php │ │ ├── TestScopePhp.php │ │ ├── TestScopePhpMagic.php │ │ ├── TestScopePhpMagicExtending.php │ │ ├── TestStaticProtectedProperties.php │ │ └── UserExample.php │ ├── protodir │ │ ├── .gitignore │ │ ├── config.json │ │ ├── connectionexception.h │ │ ├── protodir │ │ │ └── ConnectionException.zep │ │ └── prototypes │ │ │ └── fake │ │ │ └── interfaces.php │ ├── regexdna │ │ ├── input.txt │ │ └── output.txt │ ├── require-me-1.php │ ├── require-me-2.php │ ├── require-me-3.php │ ├── require-me-before-once.php │ ├── require-me-once.php │ ├── requires │ │ └── myapp.phar │ ├── stubs │ │ ├── .gitignore │ │ └── issues │ │ │ ├── config.json │ │ │ ├── expected │ │ │ ├── Exception.php │ │ │ ├── Issue_1778.php │ │ │ ├── Issue_1900.php │ │ │ ├── Issue_1907.php │ │ │ ├── Issue_1922.php │ │ │ ├── Issue_1986.php │ │ │ ├── Issue_2026.php │ │ │ └── Issue_2092.php │ │ │ └── stubs │ │ │ ├── events │ │ │ ├── EventManager.zep │ │ │ └── ManagerInterface.zep │ │ │ ├── exception.zep │ │ │ ├── issue_1778.zep │ │ │ ├── issue_1900.zep │ │ │ ├── issue_1907.zep │ │ │ ├── issue_1922.zep │ │ │ ├── issue_1986.zep │ │ │ ├── issue_2026.zep │ │ │ └── issue_2092.zep │ ├── template.php │ ├── throw-exception.php │ └── typehints │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── config.json │ │ ├── expected3.c │ │ ├── expected_args3.h │ │ ├── expected_both3.h │ │ ├── expected_retval3.h │ │ └── typehints │ │ ├── args.zep │ │ ├── both.zep │ │ └── retval.zep ├── output │ └── .gitignore └── sharness │ ├── .gitignore │ ├── Makefile │ ├── README.md │ ├── lib │ └── install-sharness.sh │ ├── setup.sh │ ├── t0001-compile.sh │ ├── t0002-generate.sh │ ├── t0003-init-errors.sh │ ├── t0003-init-success.sh │ ├── t0004-generate-errors.sh │ ├── t0004-generate-success.sh │ ├── t0005-stubs.sh │ ├── t0006-info-commands.sh │ └── t0007-internall-mcall.sh ├── zephir ├── zephir-autocomplete └── zephir.bat /.codacy.yml: -------------------------------------------------------------------------------- 1 | --- 2 | engines: 3 | phpmd: 4 | enabled: true 5 | config: 6 | rulesets: "phpmd.xml.dist" 7 | phpcs: 8 | enabled: true 9 | config: 10 | ruleset: "phpcs.xml.dist" 11 | 12 | exclude_paths: 13 | - 'ext/**' 14 | - 'prototypes/**' 15 | - 'templates/**' 16 | - 'CHANGELOG.md' 17 | - '**.md' 18 | - '**.json' 19 | -------------------------------------------------------------------------------- /.dir-locals.el: -------------------------------------------------------------------------------- 1 | ;;; Directory Local Variables 2 | ;; For more information see (info "(emacs) Directory Variables") 3 | 4 | ((nil 5 | (indent-tabs-mode . nil)) 6 | (zephir-mode 7 | (fill-column . 120)) 8 | (c-mode 9 | (fill-column . 80) 10 | (c-file-style . "k&r") 11 | (tab-width . 4) 12 | (c-basic-offset . 4) 13 | (indent-tabs-mode . t) 14 | (flycheck-checker . c/c++-gcc) 15 | (flycheck-disabled-checkers . (c/c++-clang)) 16 | (flycheck-gcc-language-standard . "gnu99")) 17 | (php-mode 18 | (fill-column . 120) 19 | (c-file-style . nil) 20 | (indent-tabs-mode . nil) 21 | (flycheck-disabled-checkers . (php-phpmd php-phpcs)))) 22 | -------------------------------------------------------------------------------- /.docker/8.0/.bashrc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | alias test-ext='php -d extension=ext/modules/stub.so vendor/bin/phpunit --bootstrap tests/ext-bootstrap.php --testsuite Extension' 4 | alias test-zephir='php vendor/bin/phpunit --colors=always --testsuite Zephir' 5 | alias test-all='test-ext; test-zephir' 6 | -------------------------------------------------------------------------------- /.docker/8.0/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM composer:latest AS composer 2 | FROM php:8.0-fpm 3 | 4 | RUN CPU_CORES="$(getconf _NPROCESSORS_ONLN)"; 5 | ENV MAKEFLAGS="-j${CPU_CORES}" 6 | 7 | RUN apt update -y && apt install -y \ 8 | wget \ 9 | zip \ 10 | git \ 11 | apt-utils \ 12 | sudo \ 13 | libicu-dev \ 14 | libgmp-dev \ 15 | libzip-dev && \ 16 | pecl install psr xdebug zephir_parser 17 | 18 | RUN docker-php-ext-install zip gmp intl mysqli && \ 19 | docker-php-ext-enable psr zephir_parser xdebug 20 | 21 | COPY --from=composer /usr/bin/composer /usr/local/bin/composer 22 | # Bash script with helper aliases 23 | COPY ./.bashrc /root/.bashrc 24 | 25 | CMD ["php-fpm"] 26 | -------------------------------------------------------------------------------- /.docker/8.1/.bashrc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | alias test-ext='php -d extension=ext/modules/stub.so vendor/bin/phpunit --bootstrap tests/ext-bootstrap.php --testsuite Extension' 4 | alias test-zephir='php vendor/bin/phpunit --colors=always --testsuite Zephir' 5 | alias test-all='test-ext; test-zephir' 6 | -------------------------------------------------------------------------------- /.docker/8.1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM composer:latest AS composer 2 | FROM php:8.1-fpm 3 | 4 | RUN CPU_CORES="$(getconf _NPROCESSORS_ONLN)"; 5 | ENV MAKEFLAGS="-j${CPU_CORES}" 6 | 7 | RUN apt update -y && apt install -y \ 8 | wget \ 9 | zip \ 10 | git \ 11 | apt-utils \ 12 | sudo \ 13 | libicu-dev \ 14 | libgmp-dev \ 15 | libzip-dev && \ 16 | pecl install psr xdebug zephir_parser 17 | 18 | RUN docker-php-ext-install zip gmp intl mysqli && \ 19 | docker-php-ext-enable psr zephir_parser xdebug 20 | 21 | COPY --from=composer /usr/bin/composer /usr/local/bin/composer 22 | # Bash script with helper aliases 23 | COPY ./.bashrc /root/.bashrc 24 | 25 | CMD ["php-fpm"] 26 | -------------------------------------------------------------------------------- /.docker/8.2/.bashrc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | alias test-ext='php -d extension=ext/modules/stub.so vendor/bin/phpunit --bootstrap tests/ext-bootstrap.php --testsuite Extension' 4 | alias test-zephir='php vendor/bin/phpunit --colors=always --testsuite Zephir' 5 | alias test-all='test-ext; test-zephir' 6 | -------------------------------------------------------------------------------- /.docker/8.2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM composer:latest AS composer 2 | FROM php:8.2-fpm 3 | 4 | RUN CPU_CORES="$(getconf _NPROCESSORS_ONLN)"; 5 | ENV MAKEFLAGS="-j${CPU_CORES}" 6 | 7 | RUN apt update -y && apt install -y \ 8 | wget \ 9 | zip \ 10 | git \ 11 | apt-utils \ 12 | sudo \ 13 | libicu-dev \ 14 | libgmp-dev \ 15 | libzip-dev && \ 16 | pecl install psr xdebug zephir_parser 17 | 18 | RUN docker-php-ext-install zip gmp intl mysqli && \ 19 | docker-php-ext-enable psr zephir_parser xdebug 20 | 21 | COPY --from=composer /usr/bin/composer /usr/local/bin/composer 22 | # Bash script with helper aliases 23 | COPY ./.bashrc /root/.bashrc 24 | 25 | CMD ["php-fpm"] 26 | -------------------------------------------------------------------------------- /.docker/8.3/.bashrc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | alias test-ext='php -d extension=ext/modules/stub.so vendor/bin/phpunit --bootstrap tests/ext-bootstrap.php --testsuite Extension' 4 | alias test-zephir='php vendor/bin/phpunit --colors=always --testsuite Zephir' 5 | alias test-all='test-ext; test-zephir' 6 | -------------------------------------------------------------------------------- /.docker/8.3/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM composer:latest AS composer 2 | FROM php:8.3-fpm 3 | 4 | RUN CPU_CORES="$(getconf _NPROCESSORS_ONLN)"; 5 | ENV MAKEFLAGS="-j${CPU_CORES}" 6 | 7 | RUN apt update -y && apt install -y \ 8 | wget \ 9 | zip \ 10 | git \ 11 | apt-utils \ 12 | sudo \ 13 | libicu-dev \ 14 | libgmp-dev \ 15 | libzip-dev && \ 16 | pecl install psr zephir_parser xdebug 17 | 18 | RUN docker-php-ext-install zip gmp intl mysqli && \ 19 | docker-php-ext-enable psr zephir_parser xdebug 20 | 21 | COPY --from=composer /usr/bin/composer /usr/local/bin/composer 22 | # Bash script with helper aliases 23 | COPY ./.bashrc /root/.bashrc 24 | 25 | CMD ["php-fpm"] 26 | -------------------------------------------------------------------------------- /.docker/8.4/.bashrc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | alias test-ext='php -d extension=ext/modules/stub.so vendor/bin/phpunit --bootstrap tests/ext-bootstrap.php --testsuite Extension' 4 | alias test-zephir='php vendor/bin/phpunit --colors=always --testsuite Zephir' 5 | alias test-all='test-ext; test-zephir' 6 | -------------------------------------------------------------------------------- /.docker/8.4/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM composer:latest AS composer 2 | FROM php:8.4-fpm 3 | 4 | RUN CPU_CORES="$(getconf _NPROCESSORS_ONLN)"; 5 | ENV MAKEFLAGS="-j${CPU_CORES}" 6 | 7 | RUN apt update -y && apt install -y \ 8 | wget \ 9 | zip \ 10 | git \ 11 | apt-utils \ 12 | sudo \ 13 | libicu-dev \ 14 | libgmp-dev \ 15 | libzip-dev && \ 16 | pecl install psr zephir_parser #xdebug 17 | 18 | RUN docker-php-ext-install zip gmp intl mysqli && \ 19 | docker-php-ext-enable psr zephir_parser #xdebug 20 | 21 | COPY --from=composer /usr/bin/composer /usr/local/bin/composer 22 | # Bash script with helper aliases 23 | COPY ./.bashrc /root/.bashrc 24 | 25 | CMD ["php-fpm"] 26 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | end_of_line = lf 8 | insert_final_newline = true 9 | indent_style = space 10 | charset = utf-8 11 | indent_size = 4 12 | trim_trailing_whitespace = true 13 | 14 | [Makefile] 15 | indent_style = tab 16 | tab_width = 4 17 | 18 | [*.{mk,c,h,awk,bat,frag,lemon,re}] 19 | indent_style = tab 20 | tab_width = 4 21 | 22 | [*.{yml,m4,json,xml,sh}] 23 | indent_size = 2 24 | 25 | [zephir-autocomplete] 26 | indent_size = 2 27 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.html ident 2 | 3 | prototypes/* linguist-vendored 4 | 5 | ext/* linguist-vendored 6 | stub/* linguist-vendored 7 | 8 | *.xml.dist text eol=lf linguist-language=XML 9 | *.json.dist text eol=lf linguist-language=JSON 10 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [phalcon] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: ['https://opencollective.com/phalcon'] 13 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | Hello! 2 | 3 | * Type: bug fix | new feature | code quality | documentation 4 | * Link to issue: 5 | 6 | In raising this pull request, I confirm the following: 7 | 8 | - [ ] I have checked that another pull request for this purpose does not exist 9 | - [ ] I wrote some tests for this PR 10 | - [ ] I updated the CHANGELOG 11 | 12 | Small description of change: 13 | 14 | Thanks 15 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | ignore: 2 | - "/usr/.*" 3 | - ".*/.phpenv/.*" 4 | - "/home/travis/build/include/.*" 5 | -------------------------------------------------------------------------------- /ext/.gitignore: -------------------------------------------------------------------------------- 1 | .deps 2 | *.lo 3 | *.so 4 | *.la 5 | .libs 6 | 7 | Makefile 8 | Makefile.fragments 9 | Makefile.global 10 | Makefile.objects 11 | 12 | acinclude.m4 13 | aclocal.m4 14 | autom4te.cache 15 | 16 | build 17 | 18 | config.guess 19 | config.h 20 | config.h.in 21 | config.h.in~ 22 | config.log 23 | config.nice 24 | config.status 25 | config.sub 26 | configure 27 | configure.ac 28 | configure.in 29 | 30 | install-sh 31 | libtool 32 | ltmain.sh 33 | missing 34 | mkinstalldirs 35 | 36 | run-tests.php 37 | CMakeLists.txt 38 | cmake-build-debug 39 | -------------------------------------------------------------------------------- /ext/clean: -------------------------------------------------------------------------------- 1 | find . -name \*.lo -o -name \*.o -o -name \*.gch | xargs rm -f 2 | make clean 3 | phpize --clean 4 | -------------------------------------------------------------------------------- /ext/ext.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by Zephir do not modify it! */ 3 | 4 | #include "stub.h" -------------------------------------------------------------------------------- /ext/ext_config.h: -------------------------------------------------------------------------------- 1 | /* This file was generated automatically by Zephir do not modify it! */ 2 | #include "config.h" -------------------------------------------------------------------------------- /ext/kernel/exit.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is part of the Zephir. 3 | * 4 | * (c) Phalcon Team 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. If you did not receive 8 | * a copy of the license it is available through the world-wide-web at the 9 | * following url: https://docs.zephir-lang.com/en/latest/license 10 | */ 11 | 12 | #ifndef ZEPHIR_KERNEL_EXIT_H 13 | #define ZEPHIR_KERNEL_EXIT_H 14 | 15 | #include 16 | 17 | void zephir_exit_empty(); 18 | void zephir_exit(zval *ptr); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /ext/php_ext.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by Zephir do not modify it! */ 3 | 4 | #include "php_stub.h" -------------------------------------------------------------------------------- /ext/stub/0__closure.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_0__closure_ce; 3 | 4 | ZEPHIR_INIT_CLASS(stub_0__closure); 5 | 6 | PHP_METHOD(stub_0__closure, __invoke); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_0__closure___invoke, 0, 0, 1) 9 | ZEND_ARG_INFO(0, x) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(stub_0__closure_method_entry) { 13 | PHP_ME(stub_0__closure, __invoke, arginfo_stub_0__closure___invoke, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/stub/10__closure.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_10__closure_ce; 3 | 4 | ZEPHIR_INIT_CLASS(stub_10__closure); 5 | 6 | PHP_METHOD(stub_10__closure, __invoke); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_10__closure___invoke, 0, 0, 1) 9 | ZEND_ARG_INFO(0, config) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(stub_10__closure_method_entry) { 13 | PHP_ME(stub_10__closure, __invoke, arginfo_stub_10__closure___invoke, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/stub/11__closure.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_11__closure_ce; 3 | 4 | ZEPHIR_INIT_CLASS(stub_11__closure); 5 | 6 | PHP_METHOD(stub_11__closure, __invoke); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_11__closure___invoke, 0, 0, 1) 9 | ZEND_ARG_INFO(0, x) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(stub_11__closure_method_entry) { 13 | PHP_ME(stub_11__closure, __invoke, arginfo_stub_11__closure___invoke, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/stub/12__closure.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../php_ext.h" 8 | #include "../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "kernel/object.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(stub_12__closure) 19 | { 20 | ZEPHIR_REGISTER_CLASS(stub, 12__closure, stub, 12__closure, stub_12__closure_method_entry, ZEND_ACC_FINAL_CLASS); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | PHP_METHOD(stub_12__closure, __invoke) 26 | { 27 | 28 | RETURN_LONG(5); 29 | } 30 | 31 | -------------------------------------------------------------------------------- /ext/stub/12__closure.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_12__closure_ce; 3 | 4 | ZEPHIR_INIT_CLASS(stub_12__closure); 5 | 6 | PHP_METHOD(stub_12__closure, __invoke); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_12__closure___invoke, 0, 0, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_12__closure_method_entry) { 12 | PHP_ME(stub_12__closure, __invoke, arginfo_stub_12__closure___invoke, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) 13 | PHP_FE_END 14 | }; 15 | -------------------------------------------------------------------------------- /ext/stub/13__closure.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_13__closure_ce; 3 | 4 | ZEPHIR_INIT_CLASS(stub_13__closure); 5 | 6 | PHP_METHOD(stub_13__closure, __invoke); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_13__closure___invoke, 0, 0, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_13__closure_method_entry) { 12 | PHP_ME(stub_13__closure, __invoke, arginfo_stub_13__closure___invoke, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) 13 | PHP_FE_END 14 | }; 15 | -------------------------------------------------------------------------------- /ext/stub/1__closure.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../php_ext.h" 8 | #include "../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "kernel/object.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(stub_1__closure) 19 | { 20 | ZEPHIR_REGISTER_CLASS(stub, 1__closure, stub, 1__closure, stub_1__closure_method_entry, ZEND_ACC_FINAL_CLASS); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | PHP_METHOD(stub_1__closure, __invoke) 26 | { 27 | 28 | } 29 | 30 | -------------------------------------------------------------------------------- /ext/stub/1__closure.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_1__closure_ce; 3 | 4 | ZEPHIR_INIT_CLASS(stub_1__closure); 5 | 6 | PHP_METHOD(stub_1__closure, __invoke); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_1__closure___invoke, 0, 0, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_1__closure_method_entry) { 12 | PHP_ME(stub_1__closure, __invoke, arginfo_stub_1__closure___invoke, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) 13 | PHP_FE_END 14 | }; 15 | -------------------------------------------------------------------------------- /ext/stub/2__closure.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../php_ext.h" 8 | #include "../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "kernel/object.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(stub_2__closure) 19 | { 20 | ZEPHIR_REGISTER_CLASS(stub, 2__closure, stub, 2__closure, stub_2__closure_method_entry, ZEND_ACC_FINAL_CLASS); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | PHP_METHOD(stub_2__closure, __invoke) 26 | { 27 | 28 | } 29 | 30 | -------------------------------------------------------------------------------- /ext/stub/2__closure.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_2__closure_ce; 3 | 4 | ZEPHIR_INIT_CLASS(stub_2__closure); 5 | 6 | PHP_METHOD(stub_2__closure, __invoke); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_2__closure___invoke, 0, 0, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_2__closure_method_entry) { 12 | PHP_ME(stub_2__closure, __invoke, arginfo_stub_2__closure___invoke, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) 13 | PHP_FE_END 14 | }; 15 | -------------------------------------------------------------------------------- /ext/stub/3__closure.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_3__closure_ce; 3 | 4 | ZEPHIR_INIT_CLASS(stub_3__closure); 5 | 6 | PHP_METHOD(stub_3__closure, __invoke); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_3__closure___invoke, 0, 0, 1) 9 | ZEND_ARG_INFO(0, param1) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(stub_3__closure_method_entry) { 13 | PHP_ME(stub_3__closure, __invoke, arginfo_stub_3__closure___invoke, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/stub/4__closure.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_4__closure_ce; 3 | 4 | ZEPHIR_INIT_CLASS(stub_4__closure); 5 | 6 | PHP_METHOD(stub_4__closure, __invoke); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_4__closure___invoke, 0, 0, 1) 9 | ZEND_ARG_INFO(0, param1) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(stub_4__closure_method_entry) { 13 | PHP_ME(stub_4__closure, __invoke, arginfo_stub_4__closure___invoke, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/stub/5__closure.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_5__closure_ce; 3 | 4 | ZEPHIR_INIT_CLASS(stub_5__closure); 5 | 6 | PHP_METHOD(stub_5__closure, __invoke); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_5__closure___invoke, 0, 0, 1) 9 | ZEND_ARG_INFO(0, param1) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(stub_5__closure_method_entry) { 13 | PHP_ME(stub_5__closure, __invoke, arginfo_stub_5__closure___invoke, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/stub/6__closure.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_6__closure_ce; 3 | 4 | ZEPHIR_INIT_CLASS(stub_6__closure); 5 | 6 | PHP_METHOD(stub_6__closure, __invoke); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_6__closure___invoke, 0, 0, 1) 9 | ZEND_ARG_INFO(0, x) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(stub_6__closure_method_entry) { 13 | PHP_ME(stub_6__closure, __invoke, arginfo_stub_6__closure___invoke, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/stub/7__closure.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_7__closure_ce; 3 | 4 | ZEPHIR_INIT_CLASS(stub_7__closure); 5 | 6 | PHP_METHOD(stub_7__closure, __invoke); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_7__closure___invoke, 0, 0, 1) 9 | ZEND_ARG_INFO(0, x) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(stub_7__closure_method_entry) { 13 | PHP_ME(stub_7__closure, __invoke, arginfo_stub_7__closure___invoke, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/stub/8__closure.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_8__closure_ce; 3 | 4 | ZEPHIR_INIT_CLASS(stub_8__closure); 5 | 6 | PHP_METHOD(stub_8__closure, __invoke); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_8__closure___invoke, 0, 0, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_8__closure_method_entry) { 12 | PHP_ME(stub_8__closure, __invoke, arginfo_stub_8__closure___invoke, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) 13 | PHP_FE_END 14 | }; 15 | -------------------------------------------------------------------------------- /ext/stub/9__closure.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_9__closure_ce; 3 | 4 | ZEPHIR_INIT_CLASS(stub_9__closure); 5 | 6 | PHP_METHOD(stub_9__closure, __invoke); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_9__closure___invoke, 0, 0, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_9__closure_method_entry) { 12 | PHP_ME(stub_9__closure, __invoke, arginfo_stub_9__closure___invoke, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) 13 | PHP_FE_END 14 | }; 15 | -------------------------------------------------------------------------------- /ext/stub/arrayiteratortest.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_arrayiteratortest_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_ArrayIteratorTest); 5 | 6 | PHP_METHOD(Stub_ArrayIteratorTest, test); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_arrayiteratortest_test, 0, 0, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_arrayiteratortest_method_entry) { 12 | PHP_ME(Stub_ArrayIteratorTest, test, arginfo_stub_arrayiteratortest_test, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) 13 | PHP_FE_END 14 | }; 15 | -------------------------------------------------------------------------------- /ext/stub/arrayobject.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../php_ext.h" 8 | #include "../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "ext/spl/spl_array.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(Stub_ArrayObject) 19 | { 20 | ZEPHIR_REGISTER_CLASS_EX(Stub, ArrayObject, stub, arrayobject, spl_ce_ArrayObject, NULL, 0); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/stub/arrayobject.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_arrayobject_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_ArrayObject); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/cblock.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_cblock_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Cblock); 5 | 6 | PHP_METHOD(Stub_Cblock, testCblock1); 7 | PHP_METHOD(Stub_Cblock, testCblock2); 8 | 9 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_cblock_testcblock1, 0, 0, 0) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_cblock_testcblock2, 0, 0, 0) 13 | ZEND_END_ARG_INFO() 14 | 15 | ZEPHIR_INIT_FUNCS(stub_cblock_method_entry) { 16 | PHP_ME(Stub_Cblock, testCblock1, arginfo_stub_cblock_testcblock1, ZEND_ACC_PUBLIC) 17 | PHP_ME(Stub_Cblock, testCblock2, arginfo_stub_cblock_testcblock2, ZEND_ACC_PUBLIC) 18 | PHP_FE_END 19 | }; 20 | -------------------------------------------------------------------------------- /ext/stub/constantsparent.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_constantsparent_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_ConstantsParent); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/constructors/issue1803.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_constructors_issue1803_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Constructors_Issue1803); 5 | 6 | PHP_METHOD(Stub_Constructors_Issue1803, Issue1803); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_constructors_issue1803_issue1803, 0, 0, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_constructors_issue1803_method_entry) { 12 | PHP_ME(Stub_Constructors_Issue1803, Issue1803, arginfo_stub_constructors_issue1803_issue1803, ZEND_ACC_PUBLIC) 13 | PHP_FE_END 14 | }; 15 | -------------------------------------------------------------------------------- /ext/stub/diinterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../php_ext.h" 8 | #include "../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Stub_DiInterface) 16 | { 17 | ZEPHIR_REGISTER_INTERFACE(Stub, DiInterface, stub, diinterface, stub_diinterface_method_entry); 18 | 19 | return SUCCESS; 20 | } 21 | 22 | ZEPHIR_DOC_METHOD(Stub_DiInterface, getShared); 23 | -------------------------------------------------------------------------------- /ext/stub/diinterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_diinterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_DiInterface); 5 | 6 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_diinterface_getshared, 0, 0, 1) 7 | ZEND_ARG_INFO(0, value) 8 | ZEND_END_ARG_INFO() 9 | 10 | ZEPHIR_INIT_FUNCS(stub_diinterface_method_entry) { 11 | PHP_ABSTRACT_ME(Stub_DiInterface, getShared, arginfo_stub_diinterface_getshared) 12 | PHP_FE_END 13 | }; 14 | -------------------------------------------------------------------------------- /ext/stub/evaltest.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_evaltest_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_EvalTest); 5 | 6 | PHP_METHOD(Stub_EvalTest, evalCode); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_evaltest_evalcode, 0, 0, 1) 9 | ZEND_ARG_TYPE_INFO(0, code, IS_STRING, 0) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(stub_evaltest_method_entry) { 13 | PHP_ME(Stub_EvalTest, evalCode, arginfo_stub_evaltest_evalcode, ZEND_ACC_PUBLIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/stub/exception.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_exception_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Exception); 5 | 6 | PHP_METHOD(Stub_Exception, testRuntimePropertyFetch); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_exception_testruntimepropertyfetch, 0, 0, 1) 9 | ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(stub_exception_method_entry) { 13 | PHP_ME(Stub_Exception, testRuntimePropertyFetch, arginfo_stub_exception_testruntimepropertyfetch, ZEND_ACC_PUBLIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/stub/extendedinterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../php_ext.h" 8 | #include "../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Stub_ExtendedInterface) 16 | { 17 | ZEPHIR_REGISTER_INTERFACE(Stub, ExtendedInterface, stub, extendedinterface, NULL); 18 | 19 | zend_class_implements(stub_extendedinterface_ce, 1, zend_ce_aggregate); 20 | zend_class_implements(stub_extendedinterface_ce, 1, zend_ce_countable); 21 | return SUCCESS; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /ext/stub/extendedinterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_extendedinterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_ExtendedInterface); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/fannkuch.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_fannkuch_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Fannkuch); 5 | 6 | PHP_METHOD(Stub_Fannkuch, process); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_fannkuch_process, 0, 0, 1) 9 | ZEND_ARG_TYPE_INFO(0, n, IS_LONG, 0) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(stub_fannkuch_method_entry) { 13 | PHP_ME(Stub_Fannkuch, process, arginfo_stub_fannkuch_process, ZEND_ACC_PUBLIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/stub/fortytwo.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_fortytwo_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_FortyTwo); 5 | 6 | PHP_METHOD(Stub_FortyTwo, proof); 7 | 8 | ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stub_fortytwo_proof, 0, 0, IS_VOID, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_fortytwo_method_entry) { 12 | PHP_ME(Stub_FortyTwo, proof, arginfo_stub_fortytwo_proof, ZEND_ACC_PUBLIC) 13 | PHP_FE_END 14 | }; 15 | -------------------------------------------------------------------------------- /ext/stub/globals/env.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_globals_env_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Globals_Env); 5 | 6 | PHP_METHOD(Stub_Globals_Env, read); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_globals_env_read, 0, 0, 1) 9 | ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(stub_globals_env_method_entry) { 13 | PHP_ME(Stub_Globals_Env, read, arginfo_stub_globals_env_read, ZEND_ACC_PUBLIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/stub/globals/post.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_globals_post_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Globals_Post); 5 | 6 | PHP_METHOD(Stub_Globals_Post, hasValue); 7 | 8 | ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stub_globals_post_hasvalue, 0, 1, _IS_BOOL, 0) 9 | ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(stub_globals_post_method_entry) { 13 | PHP_ME(Stub_Globals_Post, hasValue, arginfo_stub_globals_post_hasvalue, ZEND_ACC_PUBLIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/stub/globals/session/child.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_globals_session_child_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Globals_Session_Child); 5 | 6 | PHP_METHOD(Stub_Globals_Session_Child, destroy); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_globals_session_child_destroy, 0, 0, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_globals_session_child_method_entry) { 12 | PHP_ME(Stub_Globals_Session_Child, destroy, arginfo_stub_globals_session_child_destroy, ZEND_ACC_PUBLIC) 13 | PHP_FE_END 14 | }; 15 | -------------------------------------------------------------------------------- /ext/stub/integration/psr/extendexternal.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../php_ext.h" 8 | #include "../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | 16 | 17 | ZEPHIR_INIT_CLASS(Stub_Integration_Psr_ExtendExternal) 18 | { 19 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Integration\\Psr, ExtendExternal, stub, integration_psr_extendexternal, zephir_get_internal_ce(SL("psrext\\log\\abstractlogger")), NULL, 0); 20 | 21 | return SUCCESS; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /ext/stub/integration/psr/extendexternal.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_integration_psr_extendexternal_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Integration_Psr_ExtendExternal); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/integration/psr/http/message/messageinterfaceex.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_integration_psr_http_message_messageinterfaceex_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Integration_Psr_Http_Message_MessageInterfaceEx); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/interfaces/interfaceint.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Stub_Interfaces_InterfaceInt) 16 | { 17 | ZEPHIR_REGISTER_INTERFACE(Stub\\Interfaces, InterfaceInt, stub, interfaces_interfaceint, stub_interfaces_interfaceint_method_entry); 18 | 19 | return SUCCESS; 20 | } 21 | 22 | ZEPHIR_DOC_METHOD(Stub_Interfaces_InterfaceInt, set); 23 | ZEPHIR_DOC_METHOD(Stub_Interfaces_InterfaceInt, get); 24 | -------------------------------------------------------------------------------- /ext/stub/interfaces/interfaceintsignature.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Stub_Interfaces_InterfaceIntSignature) 16 | { 17 | ZEPHIR_REGISTER_INTERFACE(Stub\\Interfaces, InterfaceIntSignature, stub, interfaces_interfaceintsignature, stub_interfaces_interfaceintsignature_method_entry); 18 | 19 | return SUCCESS; 20 | } 21 | 22 | ZEPHIR_DOC_METHOD(Stub_Interfaces_InterfaceIntSignature, get); 23 | -------------------------------------------------------------------------------- /ext/stub/interfaces/interfaceintsignature.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_interfaces_interfaceintsignature_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Interfaces_InterfaceIntSignature); 5 | 6 | ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stub_interfaces_interfaceintsignature_get, 0, 1, IS_LONG, 0) 7 | ZEND_ARG_OBJ_INFO(0, obj, Stub\\Interfaces\\InterfaceInt, 0) 8 | ZEND_END_ARG_INFO() 9 | 10 | ZEPHIR_INIT_FUNCS(stub_interfaces_interfaceintsignature_method_entry) { 11 | PHP_ABSTRACT_ME(Stub_Interfaces_InterfaceIntSignature, get, arginfo_stub_interfaces_interfaceintsignature_get) 12 | PHP_FE_END 13 | }; 14 | -------------------------------------------------------------------------------- /ext/stub/interfaces/interfacestaticmethod.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Stub_Interfaces_InterfaceStaticMethod) 16 | { 17 | ZEPHIR_REGISTER_INTERFACE(Stub\\Interfaces, InterfaceStaticMethod, stub, interfaces_interfacestaticmethod, stub_interfaces_interfacestaticmethod_method_entry); 18 | 19 | return SUCCESS; 20 | } 21 | 22 | ZEPHIR_DOC_METHOD(Stub_Interfaces_InterfaceStaticMethod, reset); 23 | -------------------------------------------------------------------------------- /ext/stub/interfaces/interfacestaticmethod.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_interfaces_interfacestaticmethod_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Interfaces_InterfaceStaticMethod); 5 | 6 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_interfaces_interfacestaticmethod_reset, 0, 0, 0) 7 | ZEND_END_ARG_INFO() 8 | 9 | ZEPHIR_INIT_FUNCS(stub_interfaces_interfacestaticmethod_method_entry) { 10 | ZEND_FENTRY(reset, NULL, arginfo_stub_interfaces_interfacestaticmethod_reset, ZEND_ACC_STATIC|ZEND_ACC_ABSTRACT|ZEND_ACC_PUBLIC) 11 | PHP_FE_END 12 | }; 13 | -------------------------------------------------------------------------------- /ext/stub/internalinterfaces.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_internalinterfaces_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_InternalInterfaces); 5 | 6 | PHP_METHOD(Stub_InternalInterfaces, count); 7 | 8 | ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stub_internalinterfaces_count, 0, 0, IS_LONG, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_internalinterfaces_method_entry) { 12 | PHP_ME(Stub_InternalInterfaces, count, arginfo_stub_internalinterfaces_count, ZEND_ACC_PUBLIC) 13 | PHP_FE_END 14 | }; 15 | -------------------------------------------------------------------------------- /ext/stub/invokes/invokeprotected.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_invokes_invokeprotected_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Invokes_InvokeProtected); 5 | 6 | PHP_METHOD(Stub_Invokes_InvokeProtected, __construct); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_invokes_invokeprotected___construct, 0, 0, 1) 9 | ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(stub_invokes_invokeprotected_method_entry) { 13 | PHP_ME(Stub_Invokes_InvokeProtected, __construct, arginfo_stub_invokes_invokeprotected___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/stub/invokes/invokeprotectedcomplex.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_invokes_invokeprotectedcomplex_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Invokes_InvokeProtectedComplex); 5 | 6 | PHP_METHOD(Stub_Invokes_InvokeProtectedComplex, __construct); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_invokes_invokeprotectedcomplex___construct, 0, 0, 1) 9 | ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(stub_invokes_invokeprotectedcomplex_method_entry) { 13 | PHP_ME(Stub_Invokes_InvokeProtectedComplex, __construct, arginfo_stub_invokes_invokeprotectedcomplex___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/stub/issue1521.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_issue1521_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Issue1521); 5 | 6 | PHP_METHOD(Stub_Issue1521, test); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_issue1521_test, 0, 0, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_issue1521_method_entry) { 12 | PHP_ME(Stub_Issue1521, test, arginfo_stub_issue1521_test, ZEND_ACC_PUBLIC) 13 | PHP_FE_END 14 | }; 15 | -------------------------------------------------------------------------------- /ext/stub/issue2165/issueextendinterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Stub_Issue2165_IssueExtendInterface) 16 | { 17 | ZEPHIR_REGISTER_INTERFACE(Stub\\Issue2165, IssueExtendInterface, stub, issue2165_issueextendinterface, NULL); 18 | 19 | return SUCCESS; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /ext/stub/issue2165/issueextendinterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_issue2165_issueextendinterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Issue2165_IssueExtendInterface); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/issue2165/issueinterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Stub_Issue2165_IssueInterface) 16 | { 17 | ZEPHIR_REGISTER_INTERFACE(Stub\\Issue2165, IssueInterface, stub, issue2165_issueinterface, NULL); 18 | 19 | zephir_declare_class_constant_double(stub_issue2165_issueinterface_ce, SL("EPSILON"), 0.00000001); 20 | 21 | zend_class_implements(stub_issue2165_issueinterface_ce, 1, stub_issue2165_issueextendinterface_ce); 22 | return SUCCESS; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/stub/issue2165/issueinterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_issue2165_issueinterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Issue2165_IssueInterface); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/issue893.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../php_ext.h" 8 | #include "../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | 16 | 17 | /** 18 | * @issue https://github.com/zephir-lang/zephir/issues/893 19 | */ 20 | ZEPHIR_INIT_CLASS(Stub_Issue893) 21 | { 22 | ZEPHIR_REGISTER_CLASS_EX(Stub, Issue893, stub, issue893, zephir_get_internal_ce(SL("domdocument")), NULL, 0); 23 | 24 | return SUCCESS; 25 | } 26 | 27 | -------------------------------------------------------------------------------- /ext/stub/issue893.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_issue893_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Issue893); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/issue914.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_issue914_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Issue914); 5 | 6 | PHP_METHOD(Stub_Issue914, __construct); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_issue914___construct, 0, 0, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_issue914_method_entry) { 12 | PHP_ME(Stub_Issue914, __construct, arginfo_stub_issue914___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) 13 | PHP_FE_END 14 | }; 15 | -------------------------------------------------------------------------------- /ext/stub/methodabstract.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_methodabstract_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_MethodAbstract); 5 | 6 | PHP_METHOD(Stub_MethodAbstract, testInterfaceMetho); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_methodabstract_testinterfacemetho, 0, 0, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_methodabstract_method_entry) { 12 | PHP_ME(Stub_MethodAbstract, testInterfaceMetho, arginfo_stub_methodabstract_testinterfacemetho, ZEND_ACC_PUBLIC) 13 | PHP_FE_END 14 | }; 15 | -------------------------------------------------------------------------------- /ext/stub/methodinterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../php_ext.h" 8 | #include "../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Stub_MethodInterface) 16 | { 17 | ZEPHIR_REGISTER_INTERFACE(Stub, MethodInterface, stub, methodinterface, stub_methodinterface_method_entry); 18 | 19 | return SUCCESS; 20 | } 21 | 22 | ZEPHIR_DOC_METHOD(Stub_MethodInterface, testMethod); 23 | -------------------------------------------------------------------------------- /ext/stub/methodinterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_methodinterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_MethodInterface); 5 | 6 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_methodinterface_testmethod, 0, 0, 0) 7 | ZEND_END_ARG_INFO() 8 | 9 | ZEPHIR_INIT_FUNCS(stub_methodinterface_method_entry) { 10 | PHP_ABSTRACT_ME(Stub_MethodInterface, testMethod, arginfo_stub_methodinterface_testmethod) 11 | PHP_FE_END 12 | }; 13 | -------------------------------------------------------------------------------- /ext/stub/namespaces/a/b/sub.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../php_ext.h" 8 | #include "../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | 16 | 17 | ZEPHIR_INIT_CLASS(Stub_Namespaces_A_B_Sub) 18 | { 19 | ZEPHIR_REGISTER_CLASS(Stub\\Namespaces\\A\\B, Sub, stub, namespaces_a_b_sub, NULL, 0); 20 | 21 | zend_declare_property_null(stub_namespaces_a_b_sub_ce, SL("value"), ZEND_ACC_PUBLIC); 22 | return SUCCESS; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/stub/namespaces/a/b/sub.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_namespaces_a_b_sub_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Namespaces_A_B_Sub); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/abstractstatic.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_abstractstatic_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_AbstractStatic); 5 | 6 | PHP_METHOD(Stub_Oo_AbstractStatic, getCalledClass); 7 | 8 | ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stub_oo_abstractstatic_getcalledclass, 0, 0, IS_STRING, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_oo_abstractstatic_method_entry) { 12 | PHP_ME(Stub_Oo_AbstractStatic, getCalledClass, arginfo_stub_oo_abstractstatic_getcalledclass, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) 13 | PHP_FE_END 14 | }; 15 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/db/exception.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../php_ext.h" 8 | #include "../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | 16 | 17 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Db_Exception) 18 | { 19 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Oo\\Extend\\Db, Exception, stub, oo_extend_db_exception, stub_oo_extend_exception_ce, NULL, 0); 20 | 21 | return SUCCESS; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/db/exception.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extend_db_exception_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Db_Exception); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/db/query/exception.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../../php_ext.h" 8 | #include "../../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | 16 | 17 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Db_Query_Exception) 18 | { 19 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Oo\\Extend\\Db\\Query, Exception, stub, oo_extend_db_query_exception, stub_oo_extend_db_exception_ce, NULL, 0); 20 | 21 | return SUCCESS; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/db/query/exception.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extend_db_query_exception_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Db_Query_Exception); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/db/query/placeholder/exception.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../../../php_ext.h" 8 | #include "../../../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | 16 | 17 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Db_Query_Placeholder_Exception) 18 | { 19 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Oo\\Extend\\Db\\Query\\Placeholder, Exception, stub, oo_extend_db_query_placeholder_exception, stub_oo_extend_db_query_exception_ce, NULL, 0); 20 | 21 | return SUCCESS; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/db/query/placeholder/exception.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extend_db_query_placeholder_exception_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Db_Query_Placeholder_Exception); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/exception.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../php_ext.h" 8 | #include "../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | 16 | 17 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Exception) 18 | { 19 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Oo\\Extend, Exception, stub, oo_extend_exception, zend_ce_exception, NULL, 0); 20 | 21 | return SUCCESS; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/exception.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extend_exception_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Exception); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/arrayobject.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../php_ext.h" 8 | #include "../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "ext/spl/spl_array.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_ArrayObject) 19 | { 20 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Oo\\Extend\\Spl, ArrayObject, stub, oo_extend_spl_arrayobject, spl_ce_ArrayObject, NULL, 0); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/arrayobject.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extend_spl_arrayobject_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_ArrayObject); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/directoryiterator.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../php_ext.h" 8 | #include "../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "ext/spl/spl_directory.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_DirectoryIterator) 19 | { 20 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Oo\\Extend\\Spl, DirectoryIterator, stub, oo_extend_spl_directoryiterator, spl_ce_DirectoryIterator, NULL, 0); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/directoryiterator.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extend_spl_directoryiterator_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_DirectoryIterator); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/doublylinkedlist.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../php_ext.h" 8 | #include "../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "ext/spl/spl_dllist.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_DoublyLinkedList) 19 | { 20 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Oo\\Extend\\Spl, DoublyLinkedList, stub, oo_extend_spl_doublylinkedlist, spl_ce_SplDoublyLinkedList, NULL, 0); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/doublylinkedlist.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extend_spl_doublylinkedlist_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_DoublyLinkedList); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/fileinfo.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../php_ext.h" 8 | #include "../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "ext/spl/spl_directory.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_FileInfo) 19 | { 20 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Oo\\Extend\\Spl, FileInfo, stub, oo_extend_spl_fileinfo, spl_ce_SplFileInfo, NULL, 0); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/fileinfo.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extend_spl_fileinfo_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_FileInfo); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/fileobject.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../php_ext.h" 8 | #include "../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "ext/spl/spl_directory.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_FileObject) 19 | { 20 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Oo\\Extend\\Spl, FileObject, stub, oo_extend_spl_fileobject, spl_ce_SplFileObject, NULL, 0); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/fileobject.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extend_spl_fileobject_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_FileObject); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/filesystemiterator.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../php_ext.h" 8 | #include "../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "ext/spl/spl_directory.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_FilesystemIterator) 19 | { 20 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Oo\\Extend\\Spl, FilesystemIterator, stub, oo_extend_spl_filesystemiterator, spl_ce_FilesystemIterator, NULL, 0); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/filesystemiterator.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extend_spl_filesystemiterator_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_FilesystemIterator); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/fixedarray.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../php_ext.h" 8 | #include "../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "ext/spl/spl_fixedarray.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_FixedArray) 19 | { 20 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Oo\\Extend\\Spl, FixedArray, stub, oo_extend_spl_fixedarray, spl_ce_SplFixedArray, NULL, 0); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/fixedarray.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extend_spl_fixedarray_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_FixedArray); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/globiterator.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../php_ext.h" 8 | #include "../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "ext/spl/spl_directory.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_GlobIterator) 19 | { 20 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Oo\\Extend\\Spl, GlobIterator, stub, oo_extend_spl_globiterator, spl_ce_GlobIterator, NULL, 0); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/globiterator.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extend_spl_globiterator_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_GlobIterator); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/heap.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../php_ext.h" 8 | #include "../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "ext/spl/spl_heap.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_Heap) 19 | { 20 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Oo\\Extend\\Spl, Heap, stub, oo_extend_spl_heap, spl_ce_SplHeap, NULL, 0); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/heap.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extend_spl_heap_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_Heap); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/maxheap.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../php_ext.h" 8 | #include "../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "ext/spl/spl_heap.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_MaxHeap) 19 | { 20 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Oo\\Extend\\Spl, MaxHeap, stub, oo_extend_spl_maxheap, spl_ce_SplMaxHeap, NULL, 0); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/maxheap.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extend_spl_maxheap_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_MaxHeap); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/minheap.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../php_ext.h" 8 | #include "../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "ext/spl/spl_heap.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_MinHeap) 19 | { 20 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Oo\\Extend\\Spl, MinHeap, stub, oo_extend_spl_minheap, spl_ce_SplMinHeap, NULL, 0); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/minheap.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extend_spl_minheap_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_MinHeap); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/priorityqueue.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../php_ext.h" 8 | #include "../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "ext/spl/spl_heap.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_PriorityQueue) 19 | { 20 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Oo\\Extend\\Spl, PriorityQueue, stub, oo_extend_spl_priorityqueue, spl_ce_SplPriorityQueue, NULL, 0); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/priorityqueue.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extend_spl_priorityqueue_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_PriorityQueue); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/queue.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../php_ext.h" 8 | #include "../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "ext/spl/spl_dllist.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_Queue) 19 | { 20 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Oo\\Extend\\Spl, Queue, stub, oo_extend_spl_queue, spl_ce_SplQueue, NULL, 0); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/queue.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extend_spl_queue_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_Queue); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/recursivedirectoryiterator.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extend_spl_recursivedirectoryiterator_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_RecursiveDirectoryIterator); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/stack.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../php_ext.h" 8 | #include "../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "ext/spl/spl_dllist.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_Stack) 19 | { 20 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Oo\\Extend\\Spl, Stack, stub, oo_extend_spl_stack, spl_ce_SplStack, NULL, 0); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/stack.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extend_spl_stack_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_Stack); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/tempfileobject.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../php_ext.h" 8 | #include "../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "ext/spl/spl_directory.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_TempFileObject) 19 | { 20 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Oo\\Extend\\Spl, TempFileObject, stub, oo_extend_spl_tempfileobject, spl_ce_SplTempFileObject, NULL, 0); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/stub/oo/extend/spl/tempfileobject.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extend_spl_tempfileobject_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Extend_Spl_TempFileObject); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/extendpdoclass.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_extendpdoclass_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_ExtendPdoClass); 5 | 6 | PHP_METHOD(Stub_Oo_ExtendPdoClass, __construct); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_oo_extendpdoclass___construct, 0, 0, 1) 9 | ZEND_ARG_TYPE_INFO(0, dsn, IS_STRING, 0) 10 | ZEND_ARG_TYPE_INFO(0, username, IS_STRING, 1) 11 | ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 1) 12 | ZEND_ARG_INFO(0, attrs) 13 | ZEND_END_ARG_INFO() 14 | 15 | ZEPHIR_INIT_FUNCS(stub_oo_extendpdoclass_method_entry) { 16 | PHP_ME(Stub_Oo_ExtendPdoClass, __construct, arginfo_stub_oo_extendpdoclass___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) 17 | PHP_FE_END 18 | }; 19 | -------------------------------------------------------------------------------- /ext/stub/oo/ooconstruct.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "kernel/object.h" 16 | 17 | 18 | /** 19 | * Class with constructor 20 | */ 21 | ZEPHIR_INIT_CLASS(Stub_Oo_OoConstruct) 22 | { 23 | ZEPHIR_REGISTER_CLASS(Stub\\Oo, OoConstruct, stub, oo_ooconstruct, stub_oo_ooconstruct_method_entry, 0); 24 | 25 | return SUCCESS; 26 | } 27 | 28 | PHP_METHOD(Stub_Oo_OoConstruct, __construct) 29 | { 30 | 31 | } 32 | 33 | -------------------------------------------------------------------------------- /ext/stub/oo/ooconstruct.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_ooconstruct_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_OoConstruct); 5 | 6 | PHP_METHOD(Stub_Oo_OoConstruct, __construct); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_oo_ooconstruct___construct, 0, 0, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_oo_ooconstruct_method_entry) { 12 | PHP_ME(Stub_Oo_OoConstruct, __construct, arginfo_stub_oo_ooconstruct___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) 13 | PHP_FE_END 14 | }; 15 | -------------------------------------------------------------------------------- /ext/stub/oo/oodynamicb.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_oodynamicb_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_OoDynamicB); 5 | 6 | PHP_METHOD(Stub_Oo_OoDynamicB, execute); 7 | PHP_METHOD(Stub_Oo_OoDynamicB, execute2); 8 | 9 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_oo_oodynamicb_execute, 0, 0, 0) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_oo_oodynamicb_execute2, 0, 0, 0) 13 | ZEND_END_ARG_INFO() 14 | 15 | ZEPHIR_INIT_FUNCS(stub_oo_oodynamicb_method_entry) { 16 | PHP_ME(Stub_Oo_OoDynamicB, execute, arginfo_stub_oo_oodynamicb_execute, ZEND_ACC_PUBLIC) 17 | PHP_ME(Stub_Oo_OoDynamicB, execute2, arginfo_stub_oo_oodynamicb_execute2, ZEND_ACC_PUBLIC) 18 | PHP_FE_END 19 | }; 20 | -------------------------------------------------------------------------------- /ext/stub/oo/oonoconstruct.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | 16 | 17 | /** 18 | * Class without constructor 19 | */ 20 | ZEPHIR_INIT_CLASS(Stub_Oo_OoNoConstruct) 21 | { 22 | ZEPHIR_REGISTER_CLASS(Stub\\Oo, OoNoConstruct, stub, oo_oonoconstruct, NULL, 0); 23 | 24 | return SUCCESS; 25 | } 26 | 27 | -------------------------------------------------------------------------------- /ext/stub/oo/oonoconstruct.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_oonoconstruct_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_OoNoConstruct); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/param.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | 16 | 17 | /** 18 | * Arithmetic operations 19 | */ 20 | ZEPHIR_INIT_CLASS(Stub_Oo_Param) 21 | { 22 | ZEPHIR_REGISTER_CLASS(Stub\\Oo, Param, stub, oo_param, NULL, 0); 23 | 24 | zend_declare_property_null(stub_oo_param_ce, SL("value"), ZEND_ACC_PUBLIC); 25 | return SUCCESS; 26 | } 27 | 28 | -------------------------------------------------------------------------------- /ext/stub/oo/param.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_param_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Param); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/oo/scopes/scopetesterinterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../php_ext.h" 8 | #include "../../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Stub_Oo_Scopes_ScopeTesterInterface) 16 | { 17 | ZEPHIR_REGISTER_INTERFACE(Stub\\Oo\\Scopes, ScopeTesterInterface, stub, oo_scopes_scopetesterinterface, stub_oo_scopes_scopetesterinterface_method_entry); 18 | 19 | return SUCCESS; 20 | } 21 | 22 | ZEPHIR_DOC_METHOD(Stub_Oo_Scopes_ScopeTesterInterface, run); 23 | -------------------------------------------------------------------------------- /ext/stub/oo/scopes/scopetesterinterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_oo_scopes_scopetesterinterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Oo_Scopes_ScopeTesterInterface); 5 | 6 | ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stub_oo_scopes_scopetesterinterface_run, 0, 0, IS_STRING, 0) 7 | ZEND_END_ARG_INFO() 8 | 9 | ZEPHIR_INIT_FUNCS(stub_oo_scopes_scopetesterinterface_method_entry) { 10 | PHP_ABSTRACT_ME(Stub_Oo_Scopes_ScopeTesterInterface, run, arginfo_stub_oo_scopes_scopetesterinterface_run) 11 | PHP_FE_END 12 | }; 13 | -------------------------------------------------------------------------------- /ext/stub/ooimpl/abeginning.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Stub_OoImpl_ABeginning) 16 | { 17 | ZEPHIR_REGISTER_INTERFACE(Stub\\OoImpl, ABeginning, stub, ooimpl_abeginning, NULL); 18 | 19 | zend_class_implements(stub_ooimpl_abeginning_ce, 1, stub_ooimpl_zbeginning_ce); 20 | return SUCCESS; 21 | } 22 | 23 | -------------------------------------------------------------------------------- /ext/stub/ooimpl/abeginning.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_ooimpl_abeginning_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_OoImpl_ABeginning); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/ooimpl/zbeginning.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Stub_OoImpl_ZBeginning) 16 | { 17 | ZEPHIR_REGISTER_INTERFACE(Stub\\OoImpl, ZBeginning, stub, ooimpl_zbeginning, NULL); 18 | 19 | return SUCCESS; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /ext/stub/ooimpl/zbeginning.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_ooimpl_zbeginning_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_OoImpl_ZBeginning); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/optimizers/arraymerge.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_optimizers_arraymerge_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Optimizers_ArrayMerge); 5 | 6 | PHP_METHOD(Stub_Optimizers_ArrayMerge, mergeTwoRequiredArrays); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_optimizers_arraymerge_mergetworequiredarrays, 0, 0, 2) 9 | ZEND_ARG_ARRAY_INFO(0, arr1, 0) 10 | ZEND_ARG_ARRAY_INFO(0, arr2, 0) 11 | ZEND_END_ARG_INFO() 12 | 13 | ZEPHIR_INIT_FUNCS(stub_optimizers_arraymerge_method_entry) { 14 | PHP_ME(Stub_Optimizers_ArrayMerge, mergeTwoRequiredArrays, arginfo_stub_optimizers_arraymerge_mergetworequiredarrays, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC) 15 | PHP_FE_END 16 | }; 17 | -------------------------------------------------------------------------------- /ext/stub/pdostatement.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../php_ext.h" 8 | #include "../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "kernel/main.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(Stub_PdoStatement) 19 | { 20 | ZEPHIR_REGISTER_CLASS_EX(Stub, PdoStatement, stub, pdostatement, zephir_get_internal_ce(SL("pdostatement")), NULL, 0); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/stub/pdostatement.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_pdostatement_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_PdoStatement); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/properties/extendspublicproperties.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_properties_extendspublicproperties_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Properties_ExtendsPublicProperties); 5 | 6 | zend_object *zephir_init_properties_Stub_Properties_ExtendsPublicProperties(zend_class_entry *class_type); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_properties_extendspublicproperties_zephir_init_properties_stub_properties_extendspublicproperties, 0, 0, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_properties_extendspublicproperties_method_entry) { 12 | PHP_FE_END 13 | }; 14 | -------------------------------------------------------------------------------- /ext/stub/properties/getobjectvars.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_properties_getobjectvars_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Properties_GetObjectVars); 5 | 6 | PHP_METHOD(Stub_Properties_GetObjectVars, issue1245); 7 | 8 | ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stub_properties_getobjectvars_issue1245, 0, 0, IS_ARRAY, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_properties_getobjectvars_method_entry) { 12 | PHP_ME(Stub_Properties_GetObjectVars, issue1245, arginfo_stub_properties_getobjectvars_issue1245, ZEND_ACC_PUBLIC) 13 | PHP_FE_END 14 | }; 15 | -------------------------------------------------------------------------------- /ext/stub/properties/propertyupdate.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_properties_propertyupdate_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Properties_PropertyUpdate); 5 | 6 | PHP_METHOD(Stub_Properties_PropertyUpdate, update1); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_properties_propertyupdate_update1, 0, 0, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_properties_propertyupdate_method_entry) { 12 | PHP_ME(Stub_Properties_PropertyUpdate, update1, arginfo_stub_properties_propertyupdate_update1, ZEND_ACC_PUBLIC) 13 | PHP_FE_END 14 | }; 15 | -------------------------------------------------------------------------------- /ext/stub/properties/staticprivateproperties.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_properties_staticprivateproperties_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Properties_StaticPrivateProperties); 5 | 6 | PHP_METHOD(Stub_Properties_StaticPrivateProperties, getInstance); 7 | 8 | ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_stub_properties_staticprivateproperties_getinstance, 0, 0, Stub\\Properties\\StaticPrivateProperties, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_properties_staticprivateproperties_method_entry) { 12 | PHP_ME(Stub_Properties_StaticPrivateProperties, getInstance, arginfo_stub_properties_staticprivateproperties_getinstance, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) 13 | PHP_FE_END 14 | }; 15 | -------------------------------------------------------------------------------- /ext/stub/properties/staticpropertyarray.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_properties_staticpropertyarray_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Properties_StaticPropertyArray); 5 | 6 | void zephir_init_static_properties_Stub_Properties_StaticPropertyArray(); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_properties_staticpropertyarray_zephir_init_static_properties_stub_properties_staticpropertyarray, 0, 0, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_properties_staticpropertyarray_method_entry) { 12 | PHP_FE_END 13 | }; 14 | -------------------------------------------------------------------------------- /ext/stub/quantum.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_quantum_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Quantum); 5 | 6 | PHP_METHOD(Stub_Quantum, harmos); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_quantum_harmos, 0, 0, 1) 9 | ZEND_ARG_TYPE_INFO(0, x, IS_DOUBLE, 0) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(stub_quantum_method_entry) { 13 | PHP_ME(Stub_Quantum, harmos, arginfo_stub_quantum_harmos, ZEND_ACC_PUBLIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/stub/range.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_range_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Range); 5 | 6 | PHP_METHOD(Stub_Range, inclusive1); 7 | PHP_METHOD(Stub_Range, exclusive1); 8 | 9 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_range_inclusive1, 0, 0, 0) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_range_exclusive1, 0, 0, 0) 13 | ZEND_END_ARG_INFO() 14 | 15 | ZEPHIR_INIT_FUNCS(stub_range_method_entry) { 16 | PHP_ME(Stub_Range, inclusive1, arginfo_stub_range_inclusive1, ZEND_ACC_PUBLIC) 17 | PHP_ME(Stub_Range, exclusive1, arginfo_stub_range_exclusive1, ZEND_ACC_PUBLIC) 18 | PHP_FE_END 19 | }; 20 | -------------------------------------------------------------------------------- /ext/stub/references.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../php_ext.h" 8 | #include "../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "kernel/object.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(Stub_References) 19 | { 20 | ZEPHIR_REGISTER_CLASS(Stub, References, stub, references, stub_references_method_entry, 0); 21 | 22 | return SUCCESS; 23 | } 24 | 25 | PHP_METHOD(Stub_References, assignByRef) 26 | { 27 | 28 | } 29 | 30 | -------------------------------------------------------------------------------- /ext/stub/references.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_references_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_References); 5 | 6 | PHP_METHOD(Stub_References, assignByRef); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_references_assignbyref, 0, 0, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(stub_references_method_entry) { 12 | PHP_ME(Stub_References, assignByRef, arginfo_stub_references_assignbyref, ZEND_ACC_PUBLIC) 13 | PHP_FE_END 14 | }; 15 | -------------------------------------------------------------------------------- /ext/stub/regexdna.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_regexdna_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_RegexDNA); 5 | 6 | PHP_METHOD(Stub_RegexDNA, process); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_regexdna_process, 0, 0, 1) 9 | ZEND_ARG_INFO(0, path) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(stub_regexdna_method_entry) { 13 | PHP_ME(Stub_RegexDNA, process, arginfo_stub_regexdna_process, ZEND_ACC_PUBLIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/stub/requires/external3.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_requires_external3_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Requires_External3); 5 | 6 | PHP_METHOD(Stub_Requires_External3, req); 7 | 8 | ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stub_requires_external3_req, 0, 2, IS_VOID, 0) 9 | 10 | ZEND_ARG_INFO(0, path) 11 | ZEND_ARG_INFO(0, requires) 12 | ZEND_END_ARG_INFO() 13 | 14 | ZEPHIR_INIT_FUNCS(stub_requires_external3_method_entry) { 15 | PHP_ME(Stub_Requires_External3, req, arginfo_stub_requires_external3_req, ZEND_ACC_PUBLIC) 16 | PHP_FE_END 17 | }; 18 | -------------------------------------------------------------------------------- /ext/stub/router/exception.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | 16 | 17 | /** 18 | * Stub\Router\Exception 19 | * 20 | * Exceptions generated by the router 21 | */ 22 | ZEPHIR_INIT_CLASS(Stub_Router_Exception) 23 | { 24 | ZEPHIR_REGISTER_CLASS_EX(Stub\\Router, Exception, stub, router_exception, zend_ce_exception, NULL, 0); 25 | 26 | return SUCCESS; 27 | } 28 | 29 | -------------------------------------------------------------------------------- /ext/stub/router/exception.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_router_exception_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Router_Exception); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/sort.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_sort_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Sort); 5 | 6 | PHP_METHOD(Stub_Sort, quick); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_sort_quick, 0, 0, 1) 9 | ZEND_ARG_ARRAY_INFO(0, arr, 0) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(stub_sort_method_entry) { 13 | PHP_ME(Stub_Sort, quick, arginfo_stub_sort_quick, ZEND_ACC_PUBLIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/stub/spl.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_spl_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_Spl); 5 | 6 | PHP_METHOD(Stub_Spl, issue1212); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_stub_spl_issue1212, 0, 0, 1) 9 | ZEND_ARG_TYPE_INFO(0, file, IS_STRING, 0) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(stub_spl_method_entry) { 13 | PHP_ME(Stub_Spl, issue1212, arginfo_stub_spl_issue1212, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/stub/testinterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_testinterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_TestInterface); 5 | 6 | -------------------------------------------------------------------------------- /ext/stub/unknownclass.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../php_ext.h" 8 | #include "../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | 16 | 17 | ZEPHIR_INIT_CLASS(Stub_UnknownClass) 18 | { 19 | ZEPHIR_REGISTER_CLASS(Stub, UnknownClass, stub, unknownclass, NULL, 0); 20 | 21 | return SUCCESS; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /ext/stub/unknownclass.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *stub_unknownclass_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Stub_UnknownClass); 5 | 6 | -------------------------------------------------------------------------------- /kernel/exit.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is part of the Zephir. 3 | * 4 | * (c) Phalcon Team 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. If you did not receive 8 | * a copy of the license it is available through the world-wide-web at the 9 | * following url: https://docs.zephir-lang.com/en/latest/license 10 | */ 11 | 12 | #ifndef ZEPHIR_KERNEL_EXIT_H 13 | #define ZEPHIR_KERNEL_EXIT_H 14 | 15 | #include 16 | 17 | void zephir_exit_empty(); 18 | void zephir_exit(zval *ptr); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /phpunit.ext.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | tests/Extension 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /prototypes/fpm.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | if (function_exists('fastcgi_finish_request')) { 12 | return false; 13 | } 14 | 15 | /** 16 | * This function flushes all response data 17 | * to the client and finishes the request. 18 | * 19 | * @return bool 20 | */ 21 | function fastcgi_finish_request() 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /prototypes/iconv.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | function iconv($in_charset, $out_charset, $str) 12 | { 13 | } 14 | -------------------------------------------------------------------------------- /prototypes/igbinary.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | function igbinary_serialize($data) 12 | { 13 | } 14 | 15 | function igbinary_unserialize($data) 16 | { 17 | } 18 | -------------------------------------------------------------------------------- /prototypes/mcrypt.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | function mcrypt_list_algorithms() 12 | { 13 | } 14 | 15 | function mcrypt_list_modes() 16 | { 17 | } 18 | -------------------------------------------------------------------------------- /prototypes/yaml.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | function yaml_parse_file($filename, $pos = 0, &$ndocs = 0, $callbacks = null) 12 | { 13 | } 14 | 15 | function yaml_parse($data) 16 | { 17 | } 18 | -------------------------------------------------------------------------------- /src/Backend/FcallManagerInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Backend; 15 | 16 | interface FcallManagerInterface 17 | { 18 | public function genFcallCode(): void; 19 | 20 | /** 21 | * Resolve internal fcall attributes to a suitable macro and ensure that it's generated during compilation. 22 | */ 23 | public function getMacro(bool $static, int $doReturn, int $paramCount): string; 24 | } 25 | -------------------------------------------------------------------------------- /src/Builder/Statements/AbstractStatementBuilder.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Builder\Statements; 15 | 16 | abstract class AbstractStatementBuilder 17 | { 18 | /** 19 | * Returns a builder definition. 20 | */ 21 | abstract public function get(): array; 22 | } 23 | -------------------------------------------------------------------------------- /src/Class/Definition/AbstractDefinition.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Class\Definition; 15 | 16 | abstract class AbstractDefinition 17 | { 18 | /** 19 | * Class name 20 | */ 21 | protected string $name; 22 | 23 | public function getName(): string 24 | { 25 | return $this->name; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Class/Definition/DefinitionRuntime.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Class\Definition; 15 | 16 | /** 17 | * Represents a class/interface that only exists in runtime. 18 | */ 19 | final class DefinitionRuntime extends AbstractDefinition 20 | { 21 | public function __construct(string $name) 22 | { 23 | $this->name = $name; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Documentation/FileInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Documentation; 15 | 16 | interface FileInterface 17 | { 18 | public function getData(): array; 19 | 20 | public function getOutputFile(): string; 21 | 22 | public function getTemplateName(): string; 23 | } 24 | -------------------------------------------------------------------------------- /src/Exception.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir; 15 | 16 | /** 17 | * Class Exception for backward compatibility after migrating to namespaces. 18 | */ 19 | class Exception extends \Exception 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /src/Exception/FileSystemException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Exception; 15 | 16 | class FileSystemException extends RuntimeException 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /src/Exception/IllegalStateException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Exception; 15 | 16 | class IllegalStateException extends RuntimeException 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /src/Exception/InvalidArgumentException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Exception; 15 | 16 | class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface 17 | { 18 | use ExceptionExtraAwareTrait; 19 | } 20 | -------------------------------------------------------------------------------- /src/Exception/LogicException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Exception; 15 | 16 | /** 17 | * Exception that represents error in the program logic. 18 | * This kind of exception should directly lead to a fix in your code. 19 | */ 20 | class LogicException extends \LogicException implements ExceptionInterface 21 | { 22 | use ExceptionExtraAwareTrait; 23 | } 24 | -------------------------------------------------------------------------------- /src/Exception/NotImplementedException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Exception; 15 | 16 | /** 17 | * Thrown to indicate that a block of code has not been implemented. 18 | * Represents the case where the author has yet to implement 19 | * the logic at this point in the program. 20 | */ 21 | class NotImplementedException extends RuntimeException 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /src/Exception/RuntimeException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Exception; 15 | 16 | /** 17 | * Exception thrown if an error which can only be found on runtime occurs. 18 | */ 19 | class RuntimeException extends \RuntimeException implements ExceptionInterface 20 | { 21 | use ExceptionExtraAwareTrait; 22 | } 23 | -------------------------------------------------------------------------------- /src/Expression/Builder/Operators/AbstractOperator.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Expression\Builder\Operators; 15 | 16 | use Zephir\Expression\Builder\AbstractBuilder; 17 | 18 | abstract class AbstractOperator extends AbstractBuilder 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /src/Expression/Builder/Statements/AbstractStatement.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Expression\Builder\Statements; 15 | 16 | use Zephir\Expression\Builder\AbstractBuilder; 17 | 18 | abstract class AbstractStatement extends AbstractBuilder 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /src/LiteralCompiledExpression.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir; 15 | 16 | /** 17 | * LiteralCompiledExpression. 18 | * 19 | * This represents a compiled expression as CompiledExpression, but the contents of 20 | * the resolved code is potentially a simple literal expression 21 | */ 22 | class LiteralCompiledExpression extends CompiledExpression 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /src/Operators/Arithmetical/AddOperator.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Operators\Arithmetical; 15 | 16 | /** 17 | * Generates an arithmetical operation according to the operands 18 | */ 19 | class AddOperator extends ArithmeticalBaseOperator 20 | { 21 | protected string $bitOperator = '|'; 22 | protected string $operator = '+'; 23 | protected string $zvalOperator = 'zephir_add_function'; 24 | } 25 | -------------------------------------------------------------------------------- /src/Operators/Arithmetical/MulOperator.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Operators\Arithmetical; 15 | 16 | /** 17 | * Generates an arithmetical operation according to the operands 18 | */ 19 | class MulOperator extends ArithmeticalBaseOperator 20 | { 21 | protected string $bitOperator = '+'; 22 | protected string $operator = '*'; 23 | protected string $zvalOperator = 'mul_function'; 24 | } 25 | -------------------------------------------------------------------------------- /src/Operators/Arithmetical/SubOperator.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Operators\Arithmetical; 15 | 16 | /** 17 | * Generates an arithmetical operation according to the operands 18 | */ 19 | class SubOperator extends ArithmeticalBaseOperator 20 | { 21 | protected string $bitOperator = '&'; 22 | protected string $operator = '-'; 23 | protected string $zvalOperator = 'zephir_sub_function'; 24 | } 25 | -------------------------------------------------------------------------------- /src/Operators/Bitwise/BitwiseAndOperator.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Operators\Bitwise; 15 | 16 | class BitwiseAndOperator extends BitwiseBaseOperator 17 | { 18 | protected string $bitOperator = '&'; 19 | protected string $operator = '&'; 20 | protected string $zvalOperator = 'zephir_bitwise_and_function'; 21 | } 22 | -------------------------------------------------------------------------------- /src/Operators/Bitwise/BitwiseOrOperator.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Operators\Bitwise; 15 | 16 | class BitwiseOrOperator extends BitwiseBaseOperator 17 | { 18 | protected string $bitOperator = '|'; 19 | protected string $operator = '|'; 20 | protected string $zvalOperator = 'zephir_bitwise_or_function'; 21 | } 22 | -------------------------------------------------------------------------------- /src/Operators/Bitwise/BitwiseXorOperator.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Operators\Bitwise; 15 | 16 | class BitwiseXorOperator extends BitwiseBaseOperator 17 | { 18 | protected string $bitOperator = '^'; 19 | protected string $operator = '^'; 20 | protected string $zvalOperator = 'zephir_bitwise_xor_function'; 21 | } 22 | -------------------------------------------------------------------------------- /src/Operators/Bitwise/ShiftLeftOperator.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Operators\Bitwise; 15 | 16 | class ShiftLeftOperator extends BitwiseBaseOperator 17 | { 18 | protected string $bitOperator = '<<'; 19 | protected string $operator = '<<'; 20 | protected string $zvalOperator = 'zephir_shift_left_function'; 21 | } 22 | -------------------------------------------------------------------------------- /src/Operators/Bitwise/ShiftRightOperator.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Operators\Bitwise; 15 | 16 | class ShiftRightOperator extends BitwiseBaseOperator 17 | { 18 | protected string $bitOperator = '>>'; 19 | protected string $operator = '>>'; 20 | protected string $zvalOperator = 'zephir_shift_right_function'; 21 | } 22 | -------------------------------------------------------------------------------- /src/Operators/Other/LikelyOperator.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Operators\Other; 15 | 16 | /** 17 | * Adds a branch prediction hint when evaluating an expression 18 | */ 19 | class LikelyOperator extends UnlikelyOperator 20 | { 21 | protected string $operator = 'likely'; 22 | protected string $zephirMethod = 'EXPECTED'; 23 | } 24 | -------------------------------------------------------------------------------- /src/Optimizers/FunctionCall/ACosOptimizer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Optimizers\FunctionCall; 15 | 16 | use Zephir\Optimizers\MathOptimizer; 17 | 18 | /** 19 | * ACosOptimizer. 20 | * 21 | * Optimizes calls to 'acos' using internal function 22 | */ 23 | class ACosOptimizer extends MathOptimizer 24 | { 25 | protected string $zephirMethod = 'acos'; 26 | } 27 | -------------------------------------------------------------------------------- /src/Optimizers/FunctionCall/ASinOptimizer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Optimizers\FunctionCall; 15 | 16 | use Zephir\Optimizers\MathOptimizer; 17 | 18 | /** 19 | * ASinOptimizer. 20 | * 21 | * Optimizes calls to 'asin' using internal function 22 | */ 23 | class ASinOptimizer extends MathOptimizer 24 | { 25 | protected string $zephirMethod = 'asin'; 26 | } 27 | -------------------------------------------------------------------------------- /src/Optimizers/FunctionCall/CosOptimizer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Optimizers\FunctionCall; 15 | 16 | use Zephir\Optimizers\MathOptimizer; 17 | 18 | /** 19 | * CosOptimizer. 20 | * 21 | * Optimizes calls to 'cos' using internal function 22 | */ 23 | class CosOptimizer extends MathOptimizer 24 | { 25 | protected string $zephirMethod = 'cos'; 26 | } 27 | -------------------------------------------------------------------------------- /src/Optimizers/FunctionCall/Crc32Optimizer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Optimizers\FunctionCall; 15 | 16 | /** 17 | * Crc32Optimizer. 18 | * 19 | * Optimizes calls to 'crc32' using internal function 20 | */ 21 | class Crc32Optimizer extends StrtoupperOptimizer 22 | { 23 | protected string $type = 'long'; 24 | protected string $zephirMethod = 'zephir_crc32'; 25 | } 26 | -------------------------------------------------------------------------------- /src/Optimizers/FunctionCall/DieOptimizer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Optimizers\FunctionCall; 15 | 16 | /** 17 | * DieOptimizer. 18 | * 19 | * Optimizes calls to 'die' using internal function 20 | * Alias of exit 21 | */ 22 | class DieOptimizer extends ExitOptimizer 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /src/Optimizers/FunctionCall/FilemtimeOptimizer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Optimizers\FunctionCall; 15 | 16 | /** 17 | * FilemtimeOptimizer. 18 | * 19 | * Optimizes calls to 'filemtime' using internal function 20 | */ 21 | class FilemtimeOptimizer extends BasenameOptimizer 22 | { 23 | protected string $zephirMethod = 'zephir_filemtime'; 24 | } 25 | -------------------------------------------------------------------------------- /src/Optimizers/FunctionCall/GetClassLowerOptimizer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Optimizers\FunctionCall; 15 | 16 | /** 17 | * Optimizes calls to 'get_class_lower' using internal function 18 | */ 19 | class GetClassLowerOptimizer extends GetClassOptimizer 20 | { 21 | protected bool $lower = true; 22 | } 23 | -------------------------------------------------------------------------------- /src/Optimizers/FunctionCall/JoinOptimizer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Optimizers\FunctionCall; 15 | 16 | /** 17 | * @see https://php.net/manual/en/function.join.php 18 | * 19 | * Optimizes calls to 'join' using ImplodeOptimizer via it is an alias 20 | */ 21 | class JoinOptimizer extends ImplodeOptimizer 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /src/Optimizers/FunctionCall/LtrimOptimizer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Optimizers\FunctionCall; 15 | 16 | /** 17 | * LtrimOptimizer. 18 | * 19 | * Optimizes calls to 'ltrim' using internal function 20 | */ 21 | class LtrimOptimizer extends TrimOptimizer 22 | { 23 | protected string $trimWhere = ', ZEPHIR_TRIM_LEFT'; 24 | } 25 | -------------------------------------------------------------------------------- /src/Optimizers/FunctionCall/Md5Optimizer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Optimizers\FunctionCall; 15 | 16 | /** 17 | * MD5Optimizer. 18 | * 19 | * Optimizes calls to 'md5' using internal function 20 | */ 21 | class Md5Optimizer extends UcfirstOptimizer 22 | { 23 | protected string $zephirMethod = 'zephir_md5'; 24 | } 25 | -------------------------------------------------------------------------------- /src/Optimizers/FunctionCall/PregMatchAllOptimizer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Optimizers\FunctionCall; 15 | 16 | /** 17 | * PregMatchAllOptimizer. 18 | * 19 | * Optimizes calls to 'preg_match_all' using internal function 20 | */ 21 | class PregMatchAllOptimizer extends PregMatchOptimizer 22 | { 23 | public const GLOBAL_MATCH = 1; 24 | } 25 | -------------------------------------------------------------------------------- /src/Optimizers/FunctionCall/RtrimOptimizer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Optimizers\FunctionCall; 15 | 16 | /** 17 | * RtrimOptimizer. 18 | * 19 | * Optimizes calls to 'rtrim' using internal function 20 | */ 21 | class RtrimOptimizer extends TrimOptimizer 22 | { 23 | protected string $trimWhere = ', ZEPHIR_TRIM_RIGHT'; 24 | } 25 | -------------------------------------------------------------------------------- /src/Optimizers/FunctionCall/SinOptimizer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Optimizers\FunctionCall; 15 | 16 | use Zephir\Optimizers\MathOptimizer; 17 | 18 | /** 19 | * SinOptimizer. 20 | * 21 | * Optimizes calls to 'sin' using internal function 22 | */ 23 | class SinOptimizer extends MathOptimizer 24 | { 25 | protected string $zephirMethod = 'sin'; 26 | } 27 | -------------------------------------------------------------------------------- /src/Optimizers/FunctionCall/SqrtOptimizer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Optimizers\FunctionCall; 15 | 16 | use Zephir\Optimizers\MathOptimizer; 17 | 18 | /** 19 | * SqrtOptimizer. 20 | * 21 | * Optimizes calls to 'sqrt' using internal function 22 | */ 23 | class SqrtOptimizer extends MathOptimizer 24 | { 25 | protected string $zephirMethod = 'sqrt'; 26 | } 27 | -------------------------------------------------------------------------------- /src/Optimizers/FunctionCall/StartsWithOptimizer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Optimizers\FunctionCall; 15 | 16 | /** 17 | * StartsWithOptimizer. 18 | * 19 | * Checks if a string starts with another 20 | */ 21 | class StartsWithOptimizer extends EndsWithOptimizer 22 | { 23 | protected string $zephirMethod = 'zephir_start_with'; 24 | protected string $zephirMethodStr = 'zephir_start_with_str'; 25 | } 26 | -------------------------------------------------------------------------------- /src/Optimizers/FunctionCall/StripcslashesOptimizer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Optimizers\FunctionCall; 15 | 16 | /** 17 | * StripcslashesOptimizer. 18 | * 19 | * Optimizes calls to 'stripcslashes' using internal function 20 | */ 21 | class StripcslashesOptimizer extends StripslashesOptimizer 22 | { 23 | protected string $zephirMethod = 'zephir_stripcslashes'; 24 | } 25 | -------------------------------------------------------------------------------- /src/Optimizers/FunctionCall/StrtolowerOptimizer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Optimizers\FunctionCall; 15 | 16 | /** 17 | * StrtolowerOptimizer. 18 | * 19 | * Optimizes calls to 'strtolower' using internal function 20 | */ 21 | class StrtolowerOptimizer extends StrtoupperOptimizer 22 | { 23 | protected string $zephirMethod = 'zephir_fast_strtolower'; 24 | } 25 | -------------------------------------------------------------------------------- /src/Optimizers/FunctionCall/TanOptimizer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Optimizers\FunctionCall; 15 | 16 | use Zephir\Optimizers\MathOptimizer; 17 | 18 | /** 19 | * TanOptimizer. 20 | * 21 | * Optimizes calls to 'tan' using internal function 22 | */ 23 | class TanOptimizer extends MathOptimizer 24 | { 25 | protected string $zephirMethod = 'tan'; 26 | } 27 | -------------------------------------------------------------------------------- /src/Os.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir; 15 | 16 | use function stripos; 17 | 18 | use const PHP_OS; 19 | 20 | class Os 21 | { 22 | /** 23 | * Checks if currently running under MS Windows. 24 | */ 25 | public static function isWindows(): bool 26 | { 27 | return 0 === stripos(PHP_OS, 'WIN'); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Statements/Let/Incr.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Statements\Let; 15 | 16 | /** 17 | * Increments a variable 18 | */ 19 | class Incr extends Decr 20 | { 21 | protected string $operator = '++'; 22 | protected string $warningText = 'increment'; 23 | protected string $warningType = 'non-valid-increment'; 24 | protected string $zephirMethod = 'zephir_increment'; 25 | } 26 | -------------------------------------------------------------------------------- /src/Statements/Let/ObjectPropertyIncr.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Statements\Let; 15 | 16 | /** 17 | * Increments an object property 18 | */ 19 | class ObjectPropertyIncr extends ObjectPropertyDecr 20 | { 21 | protected string $zephirMethod = 'zephir_property_incr'; 22 | } 23 | -------------------------------------------------------------------------------- /src/Statements/Let/StaticPropertyAdd.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Statements\Let; 15 | 16 | /** 17 | * Updates static properties 18 | */ 19 | class StaticPropertyAdd extends StaticPropertySub 20 | { 21 | protected string $methodName = 'addStaticProperty'; 22 | } 23 | -------------------------------------------------------------------------------- /src/Statements/RequireOnceStatement.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Statements; 15 | 16 | /** 17 | * Require once statement is used to execute PHP scripts in a given path 18 | */ 19 | class RequireOnceStatement extends RequireStatement 20 | { 21 | protected string $methodName = 'require_once'; 22 | } 23 | -------------------------------------------------------------------------------- /src/TypeAwareInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir; 15 | 16 | interface TypeAwareInterface 17 | { 18 | /** 19 | * Returns the type name of the compiled expression. 20 | */ 21 | public function getType(): string; 22 | } 23 | -------------------------------------------------------------------------------- /src/Types/IstringType.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir\Types; 15 | 16 | /** 17 | * Encapsulates built-in methods for the "istring" type 18 | */ 19 | class IstringType extends StringType 20 | { 21 | public function getTypeName(): string 22 | { 23 | return Types::T_ISTRING; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Zephir.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Zephir; 15 | 16 | final class Zephir 17 | { 18 | public const LOGO = <<<'ASCII' 19 | _____ __ _ 20 | /__ / ___ ____ / /_ (_)____ 21 | / / / _ \/ __ \/ __ \/ / ___/ 22 | / /__/ __/ /_/ / / / / / / 23 | /____/\___/ .___/_/ /_/_/_/ 24 | /_/ 25 | 26 | 27 | ASCII; 28 | public const VERSION = '0.19.0-$Id$'; 29 | } 30 | -------------------------------------------------------------------------------- /stub/arrayiteratortest.zep: -------------------------------------------------------------------------------- 1 | namespace Stub; 2 | 3 | class ArrayIteratorTest 4 | { 5 | public static function test() 6 | { 7 | var arr, k, v; 8 | let arr = new ArrayIterator(); 9 | for k, v in arr { 10 | return k . v; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /stub/arrayobject.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub; 3 | 4 | class ArrayObject extends \ArrayObject 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /stub/arraysearch.zep: -------------------------------------------------------------------------------- 1 | namespace Stub; 2 | 3 | class ArraySearch 4 | { 5 | /** @issue https://github.com/zephir-lang/zephir/issues/1609 */ 6 | public function simpleSearch(var needle, array haystack, bool strict = false) -> var 7 | { 8 | return array_search(needle, haystack, strict); 9 | } 10 | 11 | /** @issue https://github.com/zephir-lang/zephir/issues/1609 */ 12 | public function searchUsingArrayInsideZephir() -> var 13 | { 14 | array itoA64 = [".", "/", "0", "1", "2", "3", "4", "value", "OtherValue"]; 15 | var pos = array_search("value", itoA64); 16 | 17 | return pos; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /stub/builtin/arraymethods.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\BuiltIn; 3 | 4 | class ArrayMethods 5 | { 6 | public function getJoin1() 7 | { 8 | return [1, 2, 3]->join("-"); 9 | } 10 | 11 | public function getReversed1() 12 | { 13 | return [1, 2, 3]->reversed(); 14 | } 15 | 16 | public function getMap1() 17 | { 18 | return [1, 2, 3]->map(x => x * 100); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /stub/builtin/charmethods.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\BuiltIn; 3 | 4 | class CharMethods 5 | { 6 | public function getHex() 7 | { 8 | return 'a'->toHex(); 9 | } 10 | 11 | public function getHexForString(string str) 12 | { 13 | var o = ""; 14 | char ch; 15 | 16 | for ch in str { 17 | let o .= ch->toHex(); 18 | } 19 | return o; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /stub/constantsparent.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub; 3 | 4 | class ConstantsParent 5 | { 6 | const P1 = null; 7 | 8 | const P2 = false; 9 | 10 | const P3 = true; 11 | 12 | const P4 = 10; 13 | 14 | const P5 = 10.25; 15 | 16 | const P6 = "test"; 17 | } 18 | -------------------------------------------------------------------------------- /stub/constructors/issue1803.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Constructors; 3 | 4 | /** 5 | * @issue https://github.com/zephir-lang/zephir/issues/1803 6 | */ 7 | class Issue1803 8 | { 9 | public value = "Original value"; 10 | 11 | public function Issue1803() 12 | { 13 | let this->value = "Value that won't be updated on class init"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /stub/diinterface.zep: -------------------------------------------------------------------------------- 1 | namespace Stub; 2 | 3 | interface DiInterface 4 | { 5 | public function getShared(value); 6 | } 7 | -------------------------------------------------------------------------------- /stub/echoes.zep: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Printing output 4 | */ 5 | 6 | namespace Stub; 7 | 8 | class Echoes 9 | { 10 | public function testEcho1() 11 | { 12 | echo 1; 13 | } 14 | 15 | public function testEcho2() 16 | { 17 | echo 1.0; 18 | } 19 | 20 | public function testEcho3() 21 | { 22 | echo true; 23 | } 24 | 25 | public function testEcho4() 26 | { 27 | echo false; 28 | } 29 | 30 | public function testEcho5() 31 | { 32 | echo "hello"; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /stub/evaltest.zep: -------------------------------------------------------------------------------- 1 | namespace Stub; 2 | 3 | class EvalTest 4 | { 5 | public function evalCode(string code) 6 | { 7 | return eval(code); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /stub/exception.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub; 3 | 4 | /** 5 | * Sample exception class 6 | */ 7 | class Exception extends \Exception 8 | { 9 | /** 10 | * @link https://github.com/zephir-lang/zephir/issues/915 11 | */ 12 | public function testRuntimePropertyFetch(string! message) 13 | { 14 | let this->message = message; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /stub/exists.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub; 3 | 4 | class Exists 5 | { 6 | public function testClassExists(var className, bool autoload=true) -> bool 7 | { 8 | return class_exists(className, autoload); 9 | } 10 | 11 | public function testInterfaceExists(var interfaceName, bool autoload=true) -> bool 12 | { 13 | return interface_exists(interfaceName, autoload); 14 | } 15 | 16 | public function testMethodExists(var obj, var methodName) -> bool 17 | { 18 | return method_exists(obj, methodName); 19 | } 20 | 21 | public function testFileExists(var fileName) -> bool 22 | { 23 | return file_exists(fileName); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /stub/exitdie.zep: -------------------------------------------------------------------------------- 1 | namespace Stub; 2 | 3 | class ExitDie 4 | { 5 | public function testExit(var param = null) -> void 6 | { 7 | if empty(param) { 8 | exit(); 9 | } 10 | 11 | exit(param); 12 | } 13 | 14 | public function testDie(var param = null) -> void 15 | { 16 | if empty(param) { 17 | die(); 18 | } 19 | 20 | die(param); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /stub/extendedinterface.zep: -------------------------------------------------------------------------------- 1 | namespace Stub; 2 | 3 | interface ExtendedInterface extends \IteratorAggregate, \Countable 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /stub/factorial.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub; 3 | 4 | class Factorial 5 | { 6 | 7 | public function intIterativeFactorial(int n) -> int 8 | { 9 | long result = 1, i; 10 | for i in range(2, n) { 11 | let result *= i; 12 | } 13 | return result; 14 | } 15 | 16 | public function intRecursiveFactorial(int num) -> int 17 | { 18 | return num === 0 || num === 1 ? 1 : num * this->intRecursiveFactorial(num - 1); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /stub/fortytwo.zep: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * FortyTwo 4 | */ 5 | 6 | namespace Stub; 7 | 8 | class FortyTwo 9 | { 10 | 11 | public function proof() -> void 12 | { 13 | var box, side; 14 | int i, j; 15 | 16 | let box = [ 17 | [10, 24, 8], [ 8, 15, 19], [19, 17, 6], 18 | [ 6, 16, 20], [20, 13, 9], [9, 11, 22], 19 | [22, 2, 18], [18, 4, 20], [5, 21, 16], 20 | [16, 3, 23], [23, 7, 12], [12, 25, 5], 21 | [24, 7, 11], [11, 27, 4], [11, 27, 4] 22 | ]; 23 | for side in box { 24 | let j = 0; 25 | for i in range(0, 2) { 26 | let j += side[i]; 27 | } 28 | if j != 42 { 29 | throw new Exception("not true"); 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /stub/functional.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub; 3 | 4 | class Functional 5 | { 6 | 7 | public function map1(array a) 8 | { 9 | return a->map(x => x * x); 10 | } 11 | 12 | public function map2(array a, callable b) 13 | { 14 | return a->map(b); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /stub/functions.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub; 3 | 4 | class Functions 5 | { 6 | /** 7 | * @issue https://github.com/zephir-lang/zephir/issues/658 8 | */ 9 | public function filterVar1() -> bool 10 | { 11 | var ret; 12 | let ret = "0"; 13 | 14 | return false === filter_var(ret, FILTER_VALIDATE_FLOAT, 20480); 15 | } 16 | 17 | /** 18 | * @issue https://github.com/zephir-lang/zephir/issues/658 19 | */ 20 | public function filterVar2() -> bool 21 | { 22 | var ret; 23 | let ret = "0"; 24 | 25 | return false == filter_var(ret, FILTER_VALIDATE_FLOAT, 20480); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /stub/globals/env.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Globals; 3 | 4 | class Env 5 | { 6 | public function read(string name) -> var 7 | { 8 | return isset _ENV[name] ? _ENV[name] : false; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /stub/globals/post.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Globals; 3 | 4 | class Post 5 | { 6 | /** 7 | * Tests "Invalid superglobal for _POST" 8 | * 9 | * @issue https://github.com/zephir-lang/zephir/issues/1623 10 | */ 11 | public function hasValue(string name) -> boolean 12 | { 13 | return isset _POST[name]; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /stub/globals/server.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Globals; 2 | 3 | class Server 4 | { 5 | /** 6 | * @see https://github.com/zephir-lang/zephir/issues/1961 7 | */ 8 | public function f1() -> void 9 | { 10 | echo _SERVER["PHP_SELF"]; 11 | this->f2(); 12 | echo _SERVER["PHP_SELF"]; 13 | } 14 | 15 | public function f2() -> void 16 | { 17 | echo _SERVER["SCRIPT_NAME"]; 18 | } 19 | 20 | /** 21 | * @see https://github.com/zephir-lang/zephir/issues/1970 22 | */ 23 | public function check() -> var 24 | { 25 | return _SERVER["HTTP_USER_AGENT"]; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /stub/globals/session/child.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Globals\Session; 3 | 4 | class Child extends Base 5 | { 6 | public function destroy() 7 | { 8 | return this->removeSessionData(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /stub/integration/psr/extendexternal.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Integration\Psr; 2 | 3 | use Psr\Log\AbstractLogger; 4 | 5 | class ExtendExternal extends AbstractLogger 6 | { 7 | } 8 | -------------------------------------------------------------------------------- /stub/integration/psr/http/message/messageinterfaceex.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Integration\Psr\Http\Message; 2 | 3 | use Psr\Http\Message\MessageInterface; 4 | 5 | interface MessageInterfaceEx extends MessageInterface 6 | { 7 | } 8 | -------------------------------------------------------------------------------- /stub/interfaces/implementint.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Interfaces; 2 | 3 | class ImplementInt implements InterfaceInt 4 | { 5 | protected val = null; 6 | 7 | public function set(int val) -> void 8 | { 9 | let this->val = val; 10 | } 11 | 12 | public function get() -> int 13 | { 14 | return this->val; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /stub/interfaces/implementinterface.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Interfaces; 2 | 3 | class ImplementInterface implements InterfaceIntSignature 4 | { 5 | protected obj; 6 | 7 | public function get( obj) -> int 8 | { 9 | return obj->get(); 10 | } 11 | 12 | public function getVoid( obj) -> void 13 | { 14 | let this->obj = obj; 15 | } 16 | 17 | public function getObj() -> 18 | { 19 | return this->obj; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /stub/interfaces/interfaceint.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Interfaces; 2 | 3 | interface InterfaceInt 4 | { 5 | public function set(int val) -> void; 6 | 7 | public function get() -> int; 8 | } 9 | -------------------------------------------------------------------------------- /stub/interfaces/interfaceintsignature.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Interfaces; 2 | 3 | interface InterfaceIntSignature 4 | { 5 | public function get( obj) -> int; 6 | } 7 | -------------------------------------------------------------------------------- /stub/interfaces/interfacestaticmethod.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Interfaces; 2 | 3 | interface InterfaceStaticMethod 4 | { 5 | public static function reset(); 6 | } 7 | -------------------------------------------------------------------------------- /stub/internalclasses.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub; 3 | 4 | class InternalClasses 5 | { 6 | public function testStaticCall() 7 | { 8 | return \Phalcon\Di::getDefault(); 9 | } 10 | 11 | public function testStaticPropertyFetch() 12 | { 13 | /** 14 | * @todo Rewrite code in zephir for dinamic property check 15 | */ 16 | return \Phalcon\Mvc\Model\Query::TYPE_DELETE; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /stub/internalinterfaces.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub; 3 | 4 | class InternalInterfaces implements \Countable 5 | { 6 | public function count() -> int 7 | { 8 | return 0; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /stub/invoke.zep: -------------------------------------------------------------------------------- 1 | namespace Stub; 2 | 3 | class Invoke 4 | { 5 | private a; 6 | 7 | public function __construct() 8 | { 9 | let this->a = "aaa"; 10 | } 11 | 12 | public function __invoke() -> string 13 | { 14 | return gettype(this->a); 15 | } 16 | 17 | public static function test() -> string 18 | { 19 | var func; 20 | let func = new Invoke(); 21 | return {func}(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /stub/invokes/abstractinvoker.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Invokes; 3 | 4 | abstract class AbstractInvoker extends AbstractProtected 5 | { 6 | public function __toString() 7 | { 8 | return this->renderArrayElements(this->text); 9 | } 10 | 11 | public function __invoke() -> 12 | { 13 | return this; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /stub/invokes/abstractinvokercomplex.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Invokes; 3 | 4 | abstract class AbstractInvokerComplex extends AbstractProtected 5 | { 6 | public function __toString() 7 | { 8 | return this->renderArrayElementsComplex(this->text); 9 | } 10 | 11 | public function __invoke() -> 12 | { 13 | return this; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /stub/invokes/invokeprotected.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Invokes; 3 | 4 | class InvokeProtected extends AbstractInvoker 5 | { 6 | public function __construct(string text) 7 | { 8 | let this->text = text; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /stub/invokes/invokeprotectedcomplex.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Invokes; 3 | 4 | class InvokeProtectedComplex extends AbstractInvokerComplex 5 | { 6 | public function __construct(string text) 7 | { 8 | let this->text = text; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /stub/issue1134.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub; 3 | 4 | /** 5 | * @issue https://github.com/zephir-lang/zephir/issues/1134 6 | */ 7 | class Issue1134 8 | { 9 | private data; 10 | 11 | public function __construct(array config = []) 12 | { 13 | let this->data = config; 14 | } 15 | 16 | public function arrayWithFilledDefaultValue(array someDefaultData = ["key": "val"]) 17 | { 18 | return someDefaultData; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /stub/issue1521.zep: -------------------------------------------------------------------------------- 1 | namespace Stub; 2 | 3 | class Issue1521 4 | { 5 | public params; 6 | 7 | public function test() 8 | { 9 | let this->params = [ 10 | "merchantNumber":"0818217122", 11 | "zero":"0" 12 | ]; 13 | 14 | return this->params; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /stub/issue2165/issueextendinterface.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Issue2165; 2 | 3 | interface IssueExtendInterface 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /stub/issue2165/issueinterface.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Issue2165; 2 | 3 | interface IssueInterface extends IssueExtendInterface 4 | { 5 | const EPSILON = 0.00000001; 6 | } 7 | -------------------------------------------------------------------------------- /stub/issue887.zep: -------------------------------------------------------------------------------- 1 | namespace Stub; 2 | 3 | /** 4 | * @issue https://github.com/zephir-lang/zephir/issues/887 5 | */ 6 | class Issue887 7 | { 8 | public data; 9 | 10 | public function __construct() 11 | { 12 | let this->data = []; 13 | } 14 | 15 | public function add(key, value) 16 | { 17 | let this->data[key] = value; 18 | } 19 | 20 | public function fetch_array() 21 | { 22 | return this->data; 23 | } 24 | 25 | public function fetch_object() 26 | { 27 | return (object) this->data; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /stub/issue893.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub; 3 | 4 | /** 5 | * @issue https://github.com/zephir-lang/zephir/issues/893 6 | */ 7 | class Issue893 extends \DOMDocument 8 | { 9 | } 10 | -------------------------------------------------------------------------------- /stub/issue914.zep: -------------------------------------------------------------------------------- 1 | namespace Stub; 2 | 3 | class Issue914 extends \mysqli 4 | { 5 | public function __construct() 6 | { 7 | parent::__construct(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /stub/issues.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub; 3 | 4 | class Issues 5 | { 6 | protected adapter; 7 | 8 | public function setAdapter(var adapter) 9 | { 10 | let this->adapter = adapter; 11 | } 12 | 13 | public function someMethod(var methodName) 14 | { 15 | return this->adapter->{methodName}(); 16 | } 17 | 18 | public function test() 19 | { 20 | echo "test"; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /stub/mcall/caller.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Mcall; 2 | 3 | class Caller 4 | { 5 | public static function start(callable f) -> var 6 | { 7 | return {f}(); 8 | } 9 | 10 | public static function perform() -> string 11 | { 12 | return __METHOD__; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /stub/methodabstract.zep: -------------------------------------------------------------------------------- 1 | namespace Stub; 2 | 3 | abstract class MethodAbstract implements MethodInterface 4 | { 5 | public function testInterfaceMetho() 6 | { 7 | this->testMethod(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /stub/methodinterface.zep: -------------------------------------------------------------------------------- 1 | namespace Stub; 2 | 3 | interface MethodInterface 4 | { 5 | public function testMethod(); 6 | } 7 | -------------------------------------------------------------------------------- /stub/namespaces/a/b/sub.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Namespaces\A\B; 2 | 3 | class Sub 4 | { 5 | public value; 6 | } 7 | -------------------------------------------------------------------------------- /stub/namespaces/classentry.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Namespaces; 2 | 3 | use Stub\Namespaces\A\B\Sub; 4 | 5 | class ClassEntry 6 | { 7 | public function setParam(<\Stub\Namespaces\A\B\Sub> param) -> <\Stub\Namespaces\A\B\Sub> 8 | { 9 | return param; 10 | } 11 | 12 | public function setParamImported( param) -> 13 | { 14 | return param; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /stub/oo/abstractstatic.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Oo; 2 | 3 | abstract class AbstractStatic 4 | { 5 | public static function getCalledClass() -> string 6 | { 7 | return get_called_class(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /stub/oo/concretestatic.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Oo; 2 | 3 | class ConcreteStatic extends AbstractStatic 4 | { 5 | public static function parentFunction() 6 | { 7 | return __METHOD__; 8 | } 9 | 10 | public static function childFunction() 11 | { 12 | return self::parentFunction(); 13 | } 14 | 15 | public static function callParentFunction() -> string 16 | { 17 | return parent::getCalledClass(); 18 | } 19 | 20 | public static function simpleStaticIntReturn() -> int 21 | { 22 | return 1337; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /stub/oo/deprecatedmethods.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Oo; 2 | 3 | class DeprecatedMethods 4 | { 5 | public deprecated function publicDeprecated() 6 | { 7 | return true; 8 | } 9 | 10 | public function normalMethod() 11 | { 12 | return this->privateDeprecated(); 13 | } 14 | 15 | private deprecated function privateDeprecated() 16 | { 17 | return true; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /stub/oo/extend/Exception.zep: -------------------------------------------------------------------------------- 1 | use \Exception as PHPException; 2 | 3 | namespace Stub\Oo\Extend; 4 | 5 | class Exception extends PHPException 6 | { 7 | } 8 | -------------------------------------------------------------------------------- /stub/oo/extend/db/Exception.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Oo\Extend\Db; 2 | 3 | use Stub\Oo\Extend\Exception as ItException; 4 | 5 | class Exception extends ItException 6 | { 7 | } 8 | -------------------------------------------------------------------------------- /stub/oo/extend/db/query/Exception.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Oo\Extend\Db\Query; 2 | 3 | use Stub\Oo\Extend\Db\Exception as ItDbException; 4 | 5 | class Exception extends ItDbException 6 | { 7 | } 8 | -------------------------------------------------------------------------------- /stub/oo/extend/db/query/placeholder/Exception.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Oo\Extend\Db\Query\Placeholder; 2 | 3 | class Exception extends \Stub\Oo\Extend\Db\Query\Exception 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /stub/oo/extend/spl/ArrayObject.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Oo\Extend\Spl; 3 | 4 | class ArrayObject extends \ArrayObject 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /stub/oo/extend/spl/DirectoryIterator.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Oo\Extend\Spl; 3 | 4 | class DirectoryIterator extends \DirectoryIterator 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /stub/oo/extend/spl/DoublyLinkedList.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Oo\Extend\Spl; 3 | 4 | class DoublyLinkedList extends \SplDoublyLinkedList 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /stub/oo/extend/spl/FileInfo.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Oo\Extend\Spl; 3 | 4 | class FileInfo extends \SplFileInfo 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /stub/oo/extend/spl/FileObject.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Oo\Extend\Spl; 3 | 4 | class FileObject extends \SplFileObject 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /stub/oo/extend/spl/FilesystemIterator.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Oo\Extend\Spl; 3 | 4 | class FilesystemIterator extends \FilesystemIterator 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /stub/oo/extend/spl/FixedArray.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Oo\Extend\Spl; 3 | 4 | class FixedArray extends \SplFixedArray 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /stub/oo/extend/spl/GlobIterator.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Oo\Extend\Spl; 3 | 4 | class GlobIterator extends \GlobIterator 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /stub/oo/extend/spl/Heap.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Oo\Extend\Spl; 3 | 4 | class Heap extends \SplHeap 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /stub/oo/extend/spl/MaxHeap.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Oo\Extend\Spl; 3 | 4 | class MaxHeap extends \SplMaxHeap 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /stub/oo/extend/spl/MinHeap.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Oo\Extend\Spl; 3 | 4 | class MinHeap extends \SplMinHeap 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /stub/oo/extend/spl/PriorityQueue.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Oo\Extend\Spl; 3 | 4 | class PriorityQueue extends \SplPriorityQueue 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /stub/oo/extend/spl/Queue.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Oo\Extend\Spl; 3 | 4 | class Queue extends \SplQueue 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /stub/oo/extend/spl/RecursiveDirectoryIterator.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Oo\Extend\Spl; 3 | 4 | class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /stub/oo/extend/spl/Stack.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Oo\Extend\Spl; 3 | 4 | class Stack extends \SplStack 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /stub/oo/extend/spl/TempFileObject.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Oo\Extend\Spl; 3 | 4 | class TempFileObject extends \SplTempFileObject 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /stub/oo/extendpdoclass.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Oo; 3 | 4 | class ExtendPdoClass extends \PDO 5 | { 6 | public function __construct(string dsn, string username = null, string password = null, attrs = []) 7 | { 8 | let attrs[\PDO::ATTR_STATEMENT_CLASS] = ["Stub\\PdoStatement"]; 9 | parent::__construct(dsn, username, password, attrs); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /stub/oo/ooconstruct.zep: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Class with constructor 4 | */ 5 | 6 | namespace Stub\Oo; 7 | 8 | class OoConstruct 9 | { 10 | 11 | public function __construct() 12 | { 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /stub/oo/ooconstructparams.zep: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Class with constructor + params 4 | */ 5 | 6 | namespace Stub\Oo; 7 | 8 | class OoConstructParams 9 | { 10 | protected a; 11 | 12 | protected b; 13 | 14 | public function __construct(a, b) 15 | { 16 | let this->a = a, 17 | this->b = b; 18 | } 19 | 20 | public function getA() 21 | { 22 | return this->a; 23 | } 24 | 25 | public function getB() 26 | { 27 | return this->b; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /stub/oo/oodynamica.zep: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Class with dynamic new 4 | */ 5 | 6 | namespace Stub\Oo; 7 | 8 | class OoDynamicA 9 | { 10 | public static function getNew() 11 | { 12 | var className, fullClassName; 13 | let className = get_called_class(); 14 | let fullClassName = "\\" . className; 15 | return new {fullClassName}(); 16 | } 17 | 18 | public static function call2() { 19 | return \Stub\Oo\OoDynamicA::getNew(); 20 | } 21 | 22 | public static function call1() { 23 | return \Stub\Oo\OoDynamicA::call2(); 24 | } 25 | 26 | public function execute() { 27 | return "A"; 28 | } 29 | 30 | public function execute2() { 31 | return "AA"; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /stub/oo/oodynamicb.zep: -------------------------------------------------------------------------------- 1 | /** 2 | * Class with dynamic new 3 | */ 4 | 5 | namespace Stub\Oo; 6 | 7 | class OoDynamicB extends OoDynamicA 8 | { 9 | public function execute() { 10 | return "B"; 11 | } 12 | 13 | public function execute2() { 14 | return "BB"; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /stub/oo/oonoconstruct.zep: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Class without constructor 4 | */ 5 | 6 | namespace Stub\Oo; 7 | 8 | class OoNoConstruct 9 | { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /stub/oo/param.zep: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Arithmetic operations 4 | */ 5 | 6 | namespace Stub\Oo; 7 | 8 | class Param 9 | { 10 | public value; 11 | } 12 | -------------------------------------------------------------------------------- /stub/oo/scopes/abstractclass.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Oo\Scopes; 2 | 3 | abstract class AbstractClass 4 | { 5 | private privateProperty2 = "private2"; 6 | protected protectedProperty2 = "protected2"; 7 | 8 | public function setProperty(string name, var value) -> var 9 | { 10 | let this->{name} = value; 11 | 12 | return this; 13 | } 14 | 15 | public function getPrivateProperty2() -> var 16 | { 17 | return this->privateProperty2; 18 | } 19 | 20 | public function getProtectedProperty2() -> var 21 | { 22 | return this->protectedProperty2; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /stub/oo/scopes/abstractclassmagic.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Oo\Scopes; 2 | 3 | abstract class AbstractClassMagic 4 | { 5 | public setCount = 0; 6 | private privateProperty = "private"; 7 | protected protectedProperty = "protected"; 8 | public publicProperty = "public"; 9 | 10 | public function __set(string name, var value) -> void 11 | { 12 | let this->{name} = value; 13 | let this->setCount = this->setCount + 1; 14 | } 15 | 16 | public function __get(string name) -> var 17 | { 18 | return this->{name}; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /stub/oo/scopes/hasprivatemethod.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Oo\Scopes; 2 | 3 | class HasPrivateMethod 4 | { 5 | public function callPrivateMethod() -> string 6 | { 7 | return this->isPrivate(); 8 | } 9 | 10 | private function isPrivate() -> string 11 | { 12 | return __FUNCTION__; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /stub/oo/scopes/scopetesterinterface.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Oo\Scopes; 2 | 3 | interface ScopeTesterInterface 4 | { 5 | public function run() -> string; 6 | } 7 | -------------------------------------------------------------------------------- /stub/ooimpl/abeginning.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\OoImpl; 2 | 3 | interface ABeginning extends ZBeginning 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /stub/ooimpl/zbeginning.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\OoImpl; 2 | 3 | interface ZBeginning 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /stub/openssl.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub; 3 | 4 | class Openssl 5 | { 6 | public function randomPseudoBytes(int length) -> string 7 | { 8 | return openssl_random_pseudo_bytes(length); 9 | } 10 | 11 | public function randomPseudoBytesLoop() -> string 12 | { 13 | var arr, i = 0; 14 | let arr = []; 15 | for i in range(1, 10) { 16 | let arr[] = openssl_random_pseudo_bytes(10); 17 | } 18 | 19 | return arr; 20 | } 21 | 22 | public function opensslEncrypt(string data) 23 | { 24 | return openssl_encrypt(data, "AES-256-CBC", "passphrase", OPENSSL_RAW_DATA, "1234567890123456"); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /stub/optimizers/acos.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Optimizers; 3 | 4 | class ACos 5 | { 6 | public function testInt() 7 | { 8 | int a = 1; 9 | 10 | return acos(a); 11 | } 12 | 13 | public function testVar() 14 | { 15 | var a = 1; 16 | 17 | return acos(a); 18 | } 19 | 20 | public function testIntValue1() 21 | { 22 | return acos(0); 23 | } 24 | 25 | public function testIntParameter(int a) 26 | { 27 | return acos(a); 28 | } 29 | 30 | public function testVarParameter(var a) 31 | { 32 | return acos(a); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /stub/optimizers/arraymerge.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Optimizers; 3 | 4 | class ArrayMerge 5 | { 6 | static public function mergeTwoRequiredArrays(array arr1, array arr2) 7 | { 8 | return array_merge(arr1, arr2); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /stub/optimizers/asin.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Optimizers; 3 | 4 | class ASin 5 | { 6 | public function testInt() 7 | { 8 | int a = 1; 9 | 10 | return asin(a); 11 | } 12 | 13 | public function testVar() 14 | { 15 | var a = 1; 16 | 17 | return asin(a); 18 | } 19 | 20 | public function testIntValue1() 21 | { 22 | return asin(0); 23 | } 24 | 25 | public function testIntParameter(int a) 26 | { 27 | return asin(a); 28 | } 29 | 30 | public function testVarParameter(var a) 31 | { 32 | return asin(a); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /stub/optimizers/cos.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Optimizers; 3 | 4 | class Cos 5 | { 6 | public function testInt() 7 | { 8 | int a = 4; 9 | 10 | return cos(a); 11 | } 12 | 13 | public function testVar() 14 | { 15 | var a = 4; 16 | 17 | return cos(a); 18 | } 19 | 20 | public function testIntValue1() 21 | { 22 | return cos(4); 23 | } 24 | 25 | public function testIntValue2() 26 | { 27 | return cos(16); 28 | } 29 | 30 | public function testIntParameter(int a) 31 | { 32 | return cos(a); 33 | } 34 | 35 | public function testVarParameter(var a) 36 | { 37 | return cos(a); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /stub/optimizers/createarray.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Optimizers; 3 | 4 | class CreateArray 5 | { 6 | public function createNoSize() 7 | { 8 | return create_array(); 9 | } 10 | 11 | public function createSize(int n) 12 | { 13 | return create_array(n); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /stub/optimizers/sin.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Optimizers; 3 | 4 | class Sin 5 | { 6 | public function testInt() 7 | { 8 | int a = 4; 9 | 10 | return sin(a); 11 | } 12 | 13 | public function testVar() 14 | { 15 | var a = 4; 16 | 17 | return sin(a); 18 | } 19 | 20 | public function testIntValue1() 21 | { 22 | return sin(4); 23 | } 24 | 25 | public function testIntValue2() 26 | { 27 | return sin(16); 28 | } 29 | 30 | public function testIntParameter(int a) 31 | { 32 | return sin(a); 33 | } 34 | 35 | public function testVarParameter(var a) 36 | { 37 | return sin(a); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /stub/optimizers/sqrt.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Optimizers; 3 | 4 | class Sqrt 5 | { 6 | public function testInt() 7 | { 8 | int a = 4; 9 | 10 | return sqrt(a); 11 | } 12 | 13 | public function testVar() 14 | { 15 | var a = 4; 16 | 17 | return sqrt(a); 18 | } 19 | 20 | public function testIntValue1() 21 | { 22 | return sqrt(4); 23 | } 24 | 25 | public function testIntValue2() 26 | { 27 | return sqrt(16); 28 | } 29 | 30 | public function testIntParameter(int a) 31 | { 32 | return sqrt(a); 33 | } 34 | 35 | public function testVarParameter(var a) 36 | { 37 | return sqrt(a); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /stub/optimizers/substr.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Optimizers; 3 | 4 | class Substr 5 | { 6 | public function testTwoArguments(var str, var start) 7 | { 8 | return substr(str, start); 9 | } 10 | 11 | public function testThreeArguments(var str, var start, var offset) 12 | { 13 | return substr(str, start, offset); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /stub/pdostatement.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub; 3 | 4 | class PdoStatement extends \PDOStatement 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /stub/properties/app.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Properties; 2 | 3 | class App 4 | { 5 | /** @var \Stub\Properties\StaticPrivateProperties */ 6 | protected instance { get }; 7 | 8 | public function __construct() 9 | { 10 | let this->instance = StaticPrivateProperties::getInstance(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /stub/properties/extendspublicproperties.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Properties; 3 | 4 | class ExtendsPublicProperties extends PublicProperties 5 | { 6 | public testPropertyFromClassNameConstantValue = PublicProperties::TEST_CONST; 7 | 8 | protected someGetterSetterArray = ["holy"]; 9 | } 10 | -------------------------------------------------------------------------------- /stub/properties/getobjectvars.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Properties; 3 | 4 | class GetObjectVars 5 | { 6 | public a = 1; 7 | protected b = 2; 8 | private c = 3; 9 | 10 | /** 11 | * @issue https://github.com/zephir-lang/zephir/issues/1245 12 | */ 13 | public function issue1245() -> array 14 | { 15 | return get_object_vars(this); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /stub/properties/propertyupdate.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Properties; 2 | 3 | class PropertyUpdate 4 | { 5 | public p1; 6 | 7 | public function update1() { 8 | let this->p1[] = "aaa"; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /stub/properties/staticprivateproperties.zep: -------------------------------------------------------------------------------- 1 | namespace Stub\Properties; 2 | 3 | class StaticPrivateProperties 4 | { 5 | private static instance; 6 | 7 | public static function getInstance() -> 8 | { 9 | var localInstance; 10 | let localInstance = self::instance; 11 | 12 | if unlikely typeof localInstance !== "object" { 13 | let localInstance = new self(); 14 | let self::instance = localInstance; 15 | } 16 | 17 | return self::instance; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /stub/properties/staticpropertyarray.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Properties; 3 | 4 | /** 5 | * @link https://github.com/zephir-lang/zephir/issues/367 6 | * @link https://github.com/zephir-lang/zephir/issues/188 7 | */ 8 | class StaticPropertyArray 9 | { 10 | /** 11 | * This is a public property with an initial empty-array value 12 | */ 13 | public static someEmptyArray = []; 14 | 15 | /** 16 | * This is a public property with an initial array value 17 | */ 18 | public static someArray = [1, 2, 3, 4]; 19 | } 20 | -------------------------------------------------------------------------------- /stub/range.zep: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Arithmetic operations 4 | */ 5 | 6 | namespace Stub; 7 | 8 | class Range 9 | { 10 | public function inclusive1() 11 | { 12 | return 0..10; 13 | } 14 | 15 | public function exclusive1() 16 | { 17 | return 0...10; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /stub/references.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub; 3 | 4 | class References 5 | { 6 | public function assignByRef() 7 | { 8 | /*var a, b; 9 | 10 | let a = 100, 11 | b = &a, 12 | b = 50; 13 | 14 | return a == b;*/ 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /stub/requires/External3.zep: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * External3 operations 4 | */ 5 | 6 | namespace Stub\Requires; 7 | 8 | class External3 9 | { 10 | protected someVariable; 11 | 12 | public function req(var path, var requires) -> void 13 | { 14 | ob_clean(); 15 | require path; 16 | requires->setContent(ob_get_contents()); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /stub/router/exception.zep: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Stub\Router\Exception 4 | * 5 | * Exceptions generated by the router 6 | */ 7 | 8 | namespace Stub\Router; 9 | 10 | class Exception extends \Exception 11 | { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /stub/scalldynamic.zep: -------------------------------------------------------------------------------- 1 | /** 2 | * Static Function calls 3 | */ 4 | 5 | namespace Stub; 6 | 7 | class ScallDynamic extends ScallParent 8 | { 9 | 10 | static public function testMethod1() -> string 11 | { 12 | return "hello public"; 13 | } 14 | 15 | static protected function testMethod2() -> string 16 | { 17 | return "hello protected"; 18 | } 19 | 20 | static private function testMethod3() -> string 21 | { 22 | return "hello private"; 23 | } 24 | 25 | static public function selfDynamicCall1(var methodName) -> string 26 | { 27 | return self::{methodName}(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /stub/scallexternal.zep: -------------------------------------------------------------------------------- 1 | /** 2 | * Call external static functions 3 | */ 4 | 5 | namespace Stub; 6 | 7 | class ScallExternal 8 | { 9 | public static sproperty; 10 | 11 | public function testCall1() 12 | { 13 | return Scall::testMethod1(); 14 | } 15 | 16 | public function testCall2(var a, var b) 17 | { 18 | return Scall::testMethod4(a, b); 19 | } 20 | 21 | public static function testMethod3(long a, long b) 22 | { 23 | return a + b; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /stub/scalllateconstruct.zep: -------------------------------------------------------------------------------- 1 | /** 2 | * Static Function call via constructor and late binding 3 | */ 4 | 5 | namespace Stub; 6 | 7 | class ScallLateConstruct 8 | { 9 | protected protectedVar; 10 | 11 | public function __construct() 12 | { 13 | this->testPublicInit(); 14 | } 15 | 16 | static public function testStaticInit() -> string 17 | { 18 | return "hello public"; 19 | } 20 | 21 | public function testPublicInit() 22 | { 23 | let this->protectedVar = self::testStaticInit(); 24 | } 25 | 26 | public function varValue() -> string 27 | { 28 | return this->protectedVar; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /stub/scallparent.zep: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Static Function calls 4 | */ 5 | 6 | namespace Stub; 7 | 8 | class ScallParent 9 | { 10 | static public function testMethod1() -> string 11 | { 12 | return "hello parent public"; 13 | } 14 | 15 | static protected function testMethod2() -> string 16 | { 17 | return "hello parent protected"; 18 | } 19 | 20 | static public function testCallStatic() -> string 21 | { 22 | return static::testMethodStatic(); 23 | } 24 | 25 | static protected function testMethodStatic() -> string 26 | { 27 | return "hello ScallParent"; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /stub/spl.zep: -------------------------------------------------------------------------------- 1 | namespace Stub; 2 | 3 | class Spl 4 | { 5 | /** 6 | * @issue https://github.com/zephir-lang/zephir/issues/1212 7 | */ 8 | public static function issue1212(string file) 9 | { 10 | return new \SplFileObject(file); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /stub/testinterface.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub; 3 | 4 | /** 5 | * Sample exception class 6 | */ 7 | interface TestInterface 8 | { 9 | 10 | const C1 = null; 11 | 12 | const C2 = false; 13 | 14 | const C3 = true; 15 | 16 | const C4 = 10; 17 | 18 | const C5 = 10.25; 19 | 20 | const C6 = "test"; 21 | } 22 | -------------------------------------------------------------------------------- /stub/typeinstances.zep: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Cast tests 4 | */ 5 | 6 | namespace Stub; 7 | 8 | class TypeInstances 9 | { 10 | public function testInstanceOfString1() 11 | { 12 | return new string(24); 13 | } 14 | 15 | public function testInstanceOfString2() 16 | { 17 | return new string(-24); 18 | } 19 | 20 | public function testInstanceOfString3() 21 | { 22 | return new string(0); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /stub/types/maybe.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Types; 3 | 4 | class MayBe 5 | { 6 | public function gc(int maxlifetime) -> int | false 7 | { 8 | return 1; 9 | } 10 | 11 | public function gcFalse() -> int | false 12 | { 13 | return false; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /stub/types/obj.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub\Types; 3 | 4 | class Obj 5 | { 6 | public function nullableObjectReturnNull() -> object | null 7 | { 8 | return null; 9 | } 10 | 11 | public function nullableObjectReturnObj() -> object | null 12 | { 13 | return new \stdClass(); 14 | } 15 | 16 | public function objectReturn() -> object 17 | { 18 | return new \stdClass(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /stub/unknownclass.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Stub; 3 | 4 | class UnknownClass 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /templates/Api/default-config.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | "theme" : "zephir" 4 | 5 | } -------------------------------------------------------------------------------- /templates/Api/themes/api-base/class.phtml: -------------------------------------------------------------------------------- 1 | partial('layout/layout.phtml', ['contentPartial' => 'partials/class/content.phtml']) ?> 2 | -------------------------------------------------------------------------------- /templates/Api/themes/api-base/classes.phtml: -------------------------------------------------------------------------------- 1 | partial('layout/layout.phtml', ['contentPartial' => 'partials/classes.phtml']) ?> 2 | -------------------------------------------------------------------------------- /templates/Api/themes/api-base/index.phtml: -------------------------------------------------------------------------------- 1 | partial('layout/layout.phtml', ['contentPartial' => 'partials/index.phtml']) ?> 2 | -------------------------------------------------------------------------------- /templates/Api/themes/api-base/namespace.phtml: -------------------------------------------------------------------------------- 1 | partial('layout/layout.phtml', ['contentPartial' => 'partials/namespace/content.phtml']) ?> 2 | -------------------------------------------------------------------------------- /templates/Api/themes/api-base/namespaces.phtml: -------------------------------------------------------------------------------- 1 | partial('layout/layout.phtml', ['contentPartial' => 'partials/namespaces.phtml']) ?> 2 | -------------------------------------------------------------------------------- /templates/Api/themes/api-base/source.phtml: -------------------------------------------------------------------------------- 1 | partial('layout/layout.phtml', ['contentPartial' => 'partials/source.phtml']) ?> 2 | -------------------------------------------------------------------------------- /templates/Api/themes/api-base/theme.json: -------------------------------------------------------------------------------- 1 | { 2 | "javascript" : [ 3 | "api_definition.js", 4 | "static/jquery.min.js", 5 | "static/zephir-doc.js" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /templates/Api/themes/zephir/partials/breadcrumb.phtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/Api/themes/zephir/partials/class/method-summary-params.phtml: -------------------------------------------------------------------------------- 1 | getParameters()) { 7 | $i = 0; 8 | $parameters = []; 9 | 10 | foreach ($method->getParameters() as $param) { 11 | if ($param['data-type']) { 12 | $parameters[$i] = ''.$param['data-type'].' '; 13 | } 14 | $parameters[$i] .= '$'.$param['name'].''; 15 | 16 | $i++; 17 | } 18 | 19 | echo trim(implode(', ', $parameters)); 20 | } 21 | -------------------------------------------------------------------------------- /templates/Api/themes/zephir/partials/classes.phtml: -------------------------------------------------------------------------------- 1 |
2 | 3 |
    4 | $class){ ?> 5 | 6 |
  • 7 | 8 | 9 |
10 | 11 |
-------------------------------------------------------------------------------- /templates/Api/themes/zephir/partials/index.phtml: -------------------------------------------------------------------------------- 1 | 6 | 7 | partial('partials/breadcrumb.phtml', ['items'=> []]) ?> 8 | 9 |
10 | 19 |
20 | -------------------------------------------------------------------------------- /templates/Api/themes/zephir/partials/namespace/method-summary-params.phtml: -------------------------------------------------------------------------------- 1 | getParameters()){ 6 | $i=0; 7 | foreach($method->getParameters() as $param){ 8 | 9 | if($param['data-type']){ 10 | ?> 0 ? ',' : ''; 14 | ?> $ 'Namespaces']]; 7 | ?> 8 | 9 | partial('partials/breadcrumb.phtml', ['items'=> $items]) ?> 10 | 11 |
12 | 21 |
22 | -------------------------------------------------------------------------------- /templates/Api/themes/zephir/theme.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends" : "api-base", 3 | 4 | "javascript" : [ 5 | "static/prettify.js" 6 | ], 7 | 8 | "css" : [ 9 | "static/prettify.css", 10 | "static/zephir-theme.css" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /templates/engine/clean: -------------------------------------------------------------------------------- 1 | find . -name \*.lo -o -name \*.o -o -name \*.gch | xargs rm -f 2 | make clean 3 | phpize --clean 4 | -------------------------------------------------------------------------------- /templates/engine/ext.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by Zephir do not modify it! */ 3 | 4 | #include "%PROJECT_LOWER_SAFE%.h" -------------------------------------------------------------------------------- /templates/engine/ext_config.h: -------------------------------------------------------------------------------- 1 | /* This file was generated automatically by Zephir do not modify it! */ 2 | #include "config.h" -------------------------------------------------------------------------------- /templates/engine/php_ext.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by Zephir do not modify it! */ 3 | 4 | #include "php_%PROJECT_LOWER_SAFE%.h" -------------------------------------------------------------------------------- /templates/engine/pkg-config.m4: -------------------------------------------------------------------------------- 1 | 2 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 3 | if test "x$PKG_CONFIG" = "xno"; then 4 | AC_MSG_RESULT([pkg-config not found]) 5 | AC_MSG_ERROR([Please reinstall the pkg-config distribution]) 6 | fi 7 | 8 | -------------------------------------------------------------------------------- /templates/engine/project.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by Zephir do not modify it! */ 3 | 4 | #ifndef ZEPHIR_CLASS_ENTRIES_H 5 | #define ZEPHIR_CLASS_ENTRIES_H 6 | 7 | %INCLUDE_HEADERS% 8 | 9 | #endif -------------------------------------------------------------------------------- /tests/Extension/ArrayIteratorTest.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view 11 | * the LICENSE file that was distributed with this source code. 12 | */ 13 | 14 | namespace Extension; 15 | 16 | use PHPUnit\Framework\TestCase; 17 | 18 | final class ArrayIteratorTest extends TestCase 19 | { 20 | public function testTest(): void 21 | { 22 | $class = new \Stub\ArrayIteratorTest(); 23 | 24 | $this->assertTrue(!empty($class->test())); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tests/Extension/CblockTest.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view 11 | * the LICENSE file that was distributed with this source code. 12 | */ 13 | 14 | namespace Extension; 15 | 16 | use PHPUnit\Framework\TestCase; 17 | use Stub\Cblock; 18 | 19 | final class CblockTest extends TestCase 20 | { 21 | public function testBlock(): void 22 | { 23 | $test = new Cblock(); 24 | $this->assertSame($test->testCblock1(), 10); 25 | $this->assertSame($test->testCblock2(), 55); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /tests/Extension/DeclareTest.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view 11 | * the LICENSE file that was distributed with this source code. 12 | */ 13 | 14 | namespace Extension; 15 | 16 | use PHPUnit\Framework\TestCase; 17 | 18 | final class DeclareTest extends TestCase 19 | { 20 | public function testDeclareMcallExpression(): void 21 | { 22 | $test = new \Stub\DeclareTest(); 23 | $this->assertSame($test->testDeclareMcallExpression(), 'hello'); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tests/Extension/FunctionsTest.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view 11 | * the LICENSE file that was distributed with this source code. 12 | */ 13 | 14 | namespace Extension; 15 | 16 | use PHPUnit\Framework\TestCase; 17 | use Stub\Functions; 18 | 19 | class FunctionsTest extends TestCase 20 | { 21 | public function testFilterVar(): void 22 | { 23 | $class = new Functions(); 24 | 25 | $this->assertFalse($class->filterVar1()); 26 | $this->assertTrue($class->filterVar2()); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tests/Extension/Integral/FannkuchTest.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view 11 | * the LICENSE file that was distributed with this source code. 12 | */ 13 | 14 | namespace Extension\Integral; 15 | 16 | use PHPUnit\Framework\TestCase; 17 | use Stub\Fannkuch; 18 | 19 | final class FannkuchTest extends TestCase 20 | { 21 | public function testFannkuch(): void 22 | { 23 | $test = new Fannkuch(); 24 | $this->assertSame($test->process(5), [11, 5, 7]); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tests/Extension/Issue914Test.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace Extension; 15 | 16 | use PHPUnit\Framework\TestCase; 17 | use Stub\Issue914; 18 | 19 | final class Issue914Test extends TestCase 20 | { 21 | public function testIssue914(): void 22 | { 23 | $test = new Issue914(); 24 | 25 | $this->assertInstanceOf(\mysqli::class, $test); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /tests/Zephir/ConfigExceptionTest.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view 11 | * the LICENSE file that was distributed with this source code. 12 | */ 13 | 14 | namespace Zephir\Test; 15 | 16 | use PHPUnit\Framework\TestCase; 17 | use Zephir\ConfigException; 18 | 19 | final class ConfigExceptionTest extends TestCase 20 | { 21 | public function testConstruct(): void 22 | { 23 | $configException = new ConfigException('foo', 25); 24 | $this->assertSame($configException->getCode(), 25); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tests/fixtures/badconfig/config.json: -------------------------------------------------------------------------------- 1 | bad file 2 | -------------------------------------------------------------------------------- /tests/fixtures/class-empty.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Fixture; 13 | 14 | class EmptyClass 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /tests/fixtures/deps/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "namespace": "deps", 3 | "name": "deps", 4 | "version": "0.0.1", 5 | "verbose": false, 6 | 7 | "requires": { 8 | "extensions": [ 9 | "foo", 10 | "bar", 11 | "baz" 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tests/fixtures/deps/deps/test.zep: -------------------------------------------------------------------------------- 1 | namespace Deps; 2 | 3 | class Test 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /tests/fixtures/devmode/.gitignore: -------------------------------------------------------------------------------- 1 | /.zephir 2 | /ext 3 | -------------------------------------------------------------------------------- /tests/fixtures/devmode/devmode/test.zep: -------------------------------------------------------------------------------- 1 | namespace Devmode; 2 | 3 | class Test 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /tests/fixtures/exists.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | -------------------------------------------------------------------------------- /tests/fixtures/genfailure1: -------------------------------------------------------------------------------- 1 | Zephir files to compile couldn't be found. Did you add a first class to the extension? 2 | -------------------------------------------------------------------------------- /tests/fixtures/genfailure2: -------------------------------------------------------------------------------- 1 | Could not load extension(s): foo, bar, baz. You must load extensions above before build this extension. 2 | -------------------------------------------------------------------------------- /tests/fixtures/internal/.gitignore: -------------------------------------------------------------------------------- 1 | /.zephir 2 | /ext 3 | -------------------------------------------------------------------------------- /tests/fixtures/internal/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "namespace": "internaltest", 3 | "name": "internaltest", 4 | "version": "0.0.1", 5 | "verbose": false, 6 | 7 | "optimizations": { 8 | "internal-call-transformation": true 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/fixtures/internal/expected/issue-1956.txt: -------------------------------------------------------------------------------- 1 | InternalTest\Test -------------------------------------------------------------------------------- /tests/fixtures/internal/internaltest/test.zep: -------------------------------------------------------------------------------- 1 | namespace InternalTest; 2 | 3 | class Test 4 | { 5 | internal function test1956() -> 6 | { 7 | return this; 8 | } 9 | 10 | public function issue1956() -> 11 | { 12 | return this->test1956(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tests/fixtures/lifecycle/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | [*.{c,h}] 4 | trim_trailing_whitespace = false 5 | -------------------------------------------------------------------------------- /tests/fixtures/lifecycle/.gitignore: -------------------------------------------------------------------------------- 1 | /.zephir 2 | /ext 3 | -------------------------------------------------------------------------------- /tests/fixtures/lifecycle/lifecycle/test.zep: -------------------------------------------------------------------------------- 1 | namespace Lifecycle; 2 | 3 | class Test 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /tests/fixtures/logger/closures.zep: -------------------------------------------------------------------------------- 1 | namespace Test; 2 | 3 | class Closures 4 | { 5 | public function simple3() 6 | { 7 | return function(param1) { 8 | 9 | }; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tests/fixtures/mocks/ExtendsProtectedProperties.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * LICENSE the file that was distributed with this source code. 10 | */ 11 | 12 | use Stub\Properties\ProtectedProperties; 13 | 14 | class ExtendsProtectedProperties extends ProtectedProperties 15 | { 16 | protected $someArrayVar = [ 17 | 'key' => 'value', 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /tests/fixtures/mocks/TestAbstractClass.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | abstract class TestAbstractClass 12 | { 13 | } 14 | -------------------------------------------------------------------------------- /tests/fixtures/mocks/TestExClass.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | class TestExClass 12 | { 13 | } 14 | -------------------------------------------------------------------------------- /tests/fixtures/mocks/TestExInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | interface TestExInterface 12 | { 13 | } 14 | -------------------------------------------------------------------------------- /tests/fixtures/mocks/TestScopePhp.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | class TestScopePhp 12 | { 13 | private $privateProperty = 'private'; 14 | protected $protectedProperty = 'protected'; 15 | public $publicProperty = 'public'; 16 | } 17 | -------------------------------------------------------------------------------- /tests/fixtures/mocks/TestScopePhpMagicExtending.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | class TestScopePhpMagicExtending extends TestScopePhpMagic 13 | { 14 | private $privateProperty2 = 'private2'; 15 | 16 | public function getPrivateProperty2() 17 | { 18 | return $this->privateProperty2; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tests/fixtures/mocks/TestStaticProtectedProperties.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | */ 11 | 12 | use Stub\Properties\StaticProtectedProperties; 13 | 14 | /** 15 | * @issue https://github.com/zephir-lang/zephir/issues/1536 16 | */ 17 | class TestStaticProtectedProperties extends StaticProtectedProperties 18 | { 19 | } 20 | -------------------------------------------------------------------------------- /tests/fixtures/mocks/UserExample.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * LICENSE the file that was distributed with this source code. 10 | */ 11 | 12 | use Stub\Oo\PropertyAccess; 13 | 14 | class UserExample extends PropertyAccess 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /tests/fixtures/protodir/.gitignore: -------------------------------------------------------------------------------- 1 | /.zephir 2 | /ext 3 | -------------------------------------------------------------------------------- /tests/fixtures/protodir/connectionexception.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *protodir_connectionexception_ce; 3 | 4 | ZEPHIR_INIT_CLASS(ProtoDir_ConnectionException); 5 | 6 | PHP_METHOD(ProtoDir_ConnectionException, getRequest); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_protodir_connectionexception_getrequest, 0, 0, 0) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(protodir_connectionexception_method_entry) { 12 | #if PHP_VERSION_ID >= 80000 13 | PHP_ME(ProtoDir_ConnectionException, getRequest, arginfo_protodir_connectionexception_getrequest, ZEND_ACC_PUBLIC) 14 | #else 15 | PHP_ME(ProtoDir_ConnectionException, getRequest, NULL, ZEND_ACC_PUBLIC) 16 | #endif 17 | PHP_FE_END 18 | }; 19 | -------------------------------------------------------------------------------- /tests/fixtures/protodir/protodir/ConnectionException.zep: -------------------------------------------------------------------------------- 1 | namespace ProtoDir; 2 | 3 | use Fake\Http\Client\NetworkExceptionInterface; 4 | 5 | class ConnectionException extends \RuntimeException implements NetworkExceptionInterface 6 | { 7 | public function getRequest() 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/fixtures/protodir/prototypes/fake/interfaces.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | return [1, 2, 3]; 13 | -------------------------------------------------------------------------------- /tests/fixtures/require-me-2.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | define('REQUIRE_ME', 32); 12 | -------------------------------------------------------------------------------- /tests/fixtures/require-me-3.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | $this->someVariable['test'] = 'test'; 12 | echo $this->someVariable['test']; 13 | -------------------------------------------------------------------------------- /tests/fixtures/require-me-before-once.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | return [1, 2, 3]; 13 | -------------------------------------------------------------------------------- /tests/fixtures/require-me-once.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | const REQUIRE_ONCE_ME = 43; 12 | -------------------------------------------------------------------------------- /tests/fixtures/requires/myapp.phar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zephir-lang/zephir/ab31770196ab2aab5b9b62860e296da8a70603c6/tests/fixtures/requires/myapp.phar -------------------------------------------------------------------------------- /tests/fixtures/stubs/.gitignore: -------------------------------------------------------------------------------- 1 | .zephir 2 | ide 3 | ext 4 | -------------------------------------------------------------------------------- /tests/fixtures/stubs/issues/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "namespace": "stubs", 3 | "name": "issue_ext", 4 | "description": "", 5 | "author": "", 6 | "version": "0.0.1", 7 | "verbose": false, 8 | "requires": { 9 | "extensions": [] 10 | }, 11 | "stubs": { 12 | "path": "ide\/%version%\/%namespace%\/", 13 | "stubs-run-after-generate": false 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tests/fixtures/stubs/issues/expected/Exception.php: -------------------------------------------------------------------------------- 1 | void 13 | { 14 | // mock implementation... 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tests/fixtures/stubs/issues/stubs/events/ManagerInterface.zep: -------------------------------------------------------------------------------- 1 | namespace Stubs\Events; 2 | 3 | /** 4 | * Test Events Manager, offers an easy way to intercept and manipulate, if 5 | * needed, the normal flow of operation. With the EventsManager the developer 6 | * can create hooks or plugins that will offer monitoring of data, manipulation, 7 | * conditional execution and much more. 8 | */ 9 | interface ManagerInterface 10 | { 11 | /** 12 | * Attach a listener to the events manager 13 | * 14 | * @param object|callable handler 15 | */ 16 | public function attach(string! eventType, handler) -> void; 17 | } 18 | -------------------------------------------------------------------------------- /tests/fixtures/stubs/issues/stubs/exception.zep: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is part of the Zephir. 3 | * 4 | * (c) Phalcon Team 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | namespace Stubs; 11 | 12 | use Throwable; 13 | 14 | /** 15 | * Exceptions for the Collection object 16 | */ 17 | class Exception extends \Exception implements Throwable 18 | { 19 | public function __construct() {} 20 | } 21 | -------------------------------------------------------------------------------- /tests/fixtures/stubs/issues/stubs/issue_1907.zep: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is part of the Zephir. 3 | * 4 | * (c) Phalcon Team 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | namespace Stubs; 11 | 12 | use Throwable; 13 | use Stubs\Exception; 14 | 15 | /** 16 | * Generated Stub should have `extends Exception` without slash 17 | * because we using import for this class with FQN 18 | */ 19 | class Issue_1907 extends Exception implements Throwable 20 | { 21 | public function __construct() {} 22 | } 23 | -------------------------------------------------------------------------------- /tests/fixtures/stubs/issues/stubs/issue_1922.zep: -------------------------------------------------------------------------------- 1 | namespace Stubs; 2 | 3 | class Issue_1922 4 | { 5 | public function getVar(string! key) -> var | null 6 | { 7 | return null; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tests/fixtures/stubs/issues/stubs/issue_1986.zep: -------------------------------------------------------------------------------- 1 | namespace Stubs; 2 | 3 | use Stubs\Events\ManagerInterface as EventsManagerInterface; 4 | 5 | class Issue_1986 implements EventsManagerInterface 6 | { 7 | public eventsManager; 8 | 9 | public function getEventsManager() -> 10 | { 11 | return this->eventsManager; 12 | } 13 | 14 | /** 15 | * Attach a listener to the events manager 16 | * 17 | * @param object|callable handler 18 | */ 19 | public function attach(string! eventType, handler) -> void 20 | { 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/fixtures/stubs/issues/stubs/issue_2092.zep: -------------------------------------------------------------------------------- 1 | namespace Stubs; 2 | 3 | use Stubs\Events\ManagerInterface; 4 | 5 | /** 6 | * Should process return type and generate docblock. 7 | */ 8 | class Issue_2092 9 | { 10 | /** 11 | * Returns the internal event manager 12 | * Expects: 13 | * return \Stubs\Events\ManagerInterface|null 14 | */ 15 | public function getInternalEventsManager() -> | null 16 | { 17 | return null; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/fixtures/template.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | return $a; 13 | -------------------------------------------------------------------------------- /tests/fixtures/throw-exception.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Fixture; 13 | 14 | throw new \Exception(); 15 | -------------------------------------------------------------------------------- /tests/fixtures/typehints/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | [*.{c,h}] 4 | trim_trailing_whitespace = false 5 | -------------------------------------------------------------------------------- /tests/fixtures/typehints/.gitignore: -------------------------------------------------------------------------------- 1 | .tmp 2 | ext 3 | -------------------------------------------------------------------------------- /tests/fixtures/typehints/expected_both3.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *typehints_both_ce; 3 | 4 | ZEPHIR_INIT_CLASS(TypeHints_Both); 5 | 6 | PHP_METHOD(TypeHints_Both, both); 7 | 8 | ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_typehints_both_both, 0, 1, IS_STRING, 0) 9 | ZEND_ARG_TYPE_INFO(0, _string, IS_STRING, 0) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(typehints_both_method_entry) { 13 | PHP_ME(TypeHints_Both, both, arginfo_typehints_both_both, ZEND_ACC_PUBLIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /tests/fixtures/typehints/typehints/args.zep: -------------------------------------------------------------------------------- 1 | namespace TypeHints; 2 | 3 | class Args { 4 | public function args(_var, string _string, boolean _bool, int _int, long _long, double _double, _args) { 5 | echo _var; 6 | echo _string; 7 | echo _bool; 8 | echo _long; 9 | echo _double; 10 | echo _args; 11 | } 12 | } 13 | 14 | function args(_var, string _string, boolean _bool, int _int, long _long, double _double, _args) { 15 | echo _var; 16 | echo _string; 17 | echo _bool; 18 | echo _long; 19 | echo _double; 20 | echo _args; 21 | } 22 | -------------------------------------------------------------------------------- /tests/fixtures/typehints/typehints/both.zep: -------------------------------------------------------------------------------- 1 | namespace TypeHints; 2 | 3 | class Both { 4 | public function both(string _string) -> string { 5 | return _string; 6 | } 7 | } 8 | 9 | function both(string _string) -> string { 10 | return _string; 11 | } 12 | -------------------------------------------------------------------------------- /tests/output/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/sharness/.gitignore: -------------------------------------------------------------------------------- 1 | lib/sharness/ 2 | test-results/ 3 | trash directory.*.sh/ 4 | 5 | # prove saved state 6 | .prove 7 | -------------------------------------------------------------------------------- /tests/sharness/t0002-generate.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # shellcheck disable=SC2034 4 | test_description="Test generate commands" 5 | 6 | # shellcheck disable=SC1091 7 | source ./setup.sh 8 | 9 | test_expect_success "Life Cycle Test" " 10 | cd $FIXTURESDIR/lifecycle && 11 | zephirc fullclean 2>&1 >/dev/null && 12 | zephirc generate 2>&1 >/dev/null && 13 | test_cmp ext/lifecycle.c expected3.c 14 | " 15 | 16 | test_done 17 | -------------------------------------------------------------------------------- /tests/sharness/t0003-init-errors.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # shellcheck disable=SC2034 4 | test_description="Test init command for failures" 5 | 6 | # shellcheck disable=SC1091 7 | source ./setup.sh 8 | 9 | test_expect_success "Should fail when not enough arguments" " 10 | cd $OUTPUTDIR && 11 | echo 'Not enough arguments (missing: \"namespace\").' >expected && 12 | test_expect_code 1 zephirc init 2>actual && 13 | test_cmp expected actual 14 | " 15 | 16 | test_done 17 | -------------------------------------------------------------------------------- /tests/sharness/t0003-init-success.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # shellcheck disable=SC2034 4 | test_description="Test init command for success" 5 | 6 | # shellcheck disable=SC1091 7 | source ./setup.sh 8 | 9 | test_expect_success "Should not dump config file" " 10 | cd $OUTPUTDIR && 11 | zephirc --version -Wunused-variable 2>&1 >/dev/null && 12 | test ! -f ./config.json 13 | " 14 | 15 | test_expect_success "Should generate a project and dump config file" " 16 | cd $OUTPUTDIR && 17 | zephirc init success && 18 | test -d ./success && 19 | test -d ./success/success && 20 | test -d ./success/ext && 21 | test -f ./success/config.json 22 | " 23 | 24 | test_done 25 | -------------------------------------------------------------------------------- /zephir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem This file is part of the Zephir. 3 | rem 4 | rem (c) Phalcon Team 5 | rem 6 | rem For the full copyright and license information, please view 7 | rem the LICENSE file that was distributed with this source code. 8 | cls 9 | 10 | if "%PHP_PEAR_PHP_BIN%" neq "" ( 11 | set PHPBIN=%PHP_PEAR_PHP_BIN% 12 | ) else set PHPBIN=php 13 | 14 | SET mypath=%~dp0 15 | echo %mypath:~0,-1% 16 | "%PHPBIN%" "%mypath%\zephir" %* 17 | --------------------------------------------------------------------------------