123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075 |
- /*
- +----------------------------------------------------------------------+
- | PHP Version 5 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2016 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Andi Gutmans <andi@zend.com> |
- | Zeev Suraski <zeev@zend.com> |
- +----------------------------------------------------------------------+
- */
- /* $Id$ */
- #include "php.h"
- #include "php_streams.h"
- #include "php_main.h"
- #include "php_globals.h"
- #include "php_ini.h"
- #include "php_standard.h"
- #include "php_math.h"
- #include "php_http.h"
- #include "php_incomplete_class.h"
- #include "php_getopt.h"
- #include "ext/standard/info.h"
- #include "ext/session/php_session.h"
- #include "zend_operators.h"
- #include "ext/standard/php_dns.h"
- #include "ext/standard/php_uuencode.h"
- #ifdef PHP_WIN32
- #include "win32/php_win32_globals.h"
- #include "win32/time.h"
- #endif
- typedef struct yy_buffer_state *YY_BUFFER_STATE;
- #include "zend.h"
- #include "zend_ini_scanner.h"
- #include "zend_language_scanner.h"
- #include <zend_language_parser.h>
- #include <stdarg.h>
- #include <stdlib.h>
- #include <math.h>
- #include <time.h>
- #include <stdio.h>
- #ifndef PHP_WIN32
- #include <sys/types.h>
- #include <sys/stat.h>
- #endif
- #ifdef NETWARE
- #include <netinet/in.h>
- #endif
- #ifndef PHP_WIN32
- # include <netdb.h>
- #else
- #include "win32/inet.h"
- #endif
- #if HAVE_ARPA_INET_H
- # include <arpa/inet.h>
- #endif
- #if HAVE_UNISTD_H
- # include <unistd.h>
- #endif
- #if HAVE_STRING_H
- # include <string.h>
- #else
- # include <strings.h>
- #endif
- #if HAVE_LOCALE_H
- # include <locale.h>
- #endif
- #if HAVE_SYS_MMAN_H
- # include <sys/mman.h>
- #endif
- #if HAVE_SYS_LOADAVG_H
- # include <sys/loadavg.h>
- #endif
- #ifdef PHP_WIN32
- # include "win32/unistd.h"
- #endif
- #ifndef INADDR_NONE
- #define INADDR_NONE ((unsigned long int) -1)
- #endif
- #include "zend_globals.h"
- #include "php_globals.h"
- #include "SAPI.h"
- #include "php_ticks.h"
- #ifdef ZTS
- PHPAPI int basic_globals_id;
- #else
- PHPAPI php_basic_globals basic_globals;
- #endif
- #include "php_fopen_wrappers.h"
- #include "streamsfuncs.h"
- static zend_class_entry *incomplete_class_entry = NULL;
- typedef struct _user_tick_function_entry {
- zval **arguments;
- int arg_count;
- int calling;
- } user_tick_function_entry;
- /* some prototypes for local functions */
- static void user_shutdown_function_dtor(php_shutdown_function_entry *shutdown_function_entry);
- static void user_tick_function_dtor(user_tick_function_entry *tick_function_entry);
- static HashTable basic_submodules;
- #undef sprintf
- /* {{{ arginfo */
- /* {{{ main/main.c */
- ZEND_BEGIN_ARG_INFO(arginfo_set_time_limit, 0)
- ZEND_ARG_INFO(0, seconds)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ main/sapi.c */
- ZEND_BEGIN_ARG_INFO(arginfo_header_register_callback, 0)
- ZEND_ARG_INFO(0, callback)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ main/output.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_ob_start, 0, 0, 0)
- ZEND_ARG_INFO(0, user_function)
- ZEND_ARG_INFO(0, chunk_size)
- ZEND_ARG_INFO(0, flags)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_ob_flush, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_ob_clean, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_ob_end_flush, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_ob_end_clean, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_ob_get_flush, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_ob_get_clean, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_ob_get_contents, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_ob_get_level, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_ob_get_length, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_ob_list_handlers, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_ob_get_status, 0, 0, 0)
- ZEND_ARG_INFO(0, full_status)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_ob_implicit_flush, 0, 0, 0)
- ZEND_ARG_INFO(0, flag)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_output_reset_rewrite_vars, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_output_add_rewrite_var, 0)
- ZEND_ARG_INFO(0, name)
- ZEND_ARG_INFO(0, value)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ main/streams/userspace.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_wrapper_register, 0, 0, 2)
- ZEND_ARG_INFO(0, protocol)
- ZEND_ARG_INFO(0, classname)
- ZEND_ARG_INFO(0, flags)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_wrapper_unregister, 0)
- ZEND_ARG_INFO(0, protocol)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_wrapper_restore, 0)
- ZEND_ARG_INFO(0, protocol)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ array.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_krsort, 0, 0, 1)
- ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
- ZEND_ARG_INFO(0, sort_flags)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_ksort, 0, 0, 1)
- ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
- ZEND_ARG_INFO(0, sort_flags)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_count, 0, 0, 1)
- ZEND_ARG_INFO(0, var)
- ZEND_ARG_INFO(0, mode)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_natsort, 0)
- ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_natcasesort, 0)
- ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_asort, 0, 0, 1)
- ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
- ZEND_ARG_INFO(0, sort_flags)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_arsort, 0, 0, 1)
- ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
- ZEND_ARG_INFO(0, sort_flags)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_sort, 0, 0, 1)
- ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
- ZEND_ARG_INFO(0, sort_flags)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_rsort, 0, 0, 1)
- ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
- ZEND_ARG_INFO(0, sort_flags)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_usort, 0)
- ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
- ZEND_ARG_INFO(0, cmp_function)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_uasort, 0)
- ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
- ZEND_ARG_INFO(0, cmp_function)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_uksort, 0)
- ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
- ZEND_ARG_INFO(0, cmp_function)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_end, 0)
- ZEND_ARG_INFO(1, arg)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_prev, 0)
- ZEND_ARG_INFO(1, arg)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_next, 0)
- ZEND_ARG_INFO(1, arg)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_reset, 0)
- ZEND_ARG_INFO(1, arg)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_current, 0)
- ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arg)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_key, 0)
- ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arg)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_min, 0, 0, 1)
- ZEND_ARG_VARIADIC_INFO(0, args)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_max, 0, 0, 1)
- ZEND_ARG_VARIADIC_INFO(0, args)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_walk, 0, 0, 2)
- ZEND_ARG_INFO(1, input) /* ARRAY_INFO(1, arg, 0) */
- ZEND_ARG_INFO(0, funcname)
- ZEND_ARG_INFO(0, userdata)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_walk_recursive, 0, 0, 2)
- ZEND_ARG_INFO(1, input) /* ARRAY_INFO(1, arg, 0) */
- ZEND_ARG_INFO(0, funcname)
- ZEND_ARG_INFO(0, userdata)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_in_array, 0, 0, 2)
- ZEND_ARG_INFO(0, needle)
- ZEND_ARG_INFO(0, haystack) /* ARRAY_INFO(0, haystack, 0) */
- ZEND_ARG_INFO(0, strict)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_search, 0, 0, 2)
- ZEND_ARG_INFO(0, needle)
- ZEND_ARG_INFO(0, haystack) /* ARRAY_INFO(0, haystack, 0) */
- ZEND_ARG_INFO(0, strict)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_extract, 0, 0, 1)
- ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arg) /* ARRAY_INFO(0, arg, 0) */
- ZEND_ARG_INFO(0, extract_type)
- ZEND_ARG_INFO(0, prefix)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_compact, 0, 0, 1)
- ZEND_ARG_VARIADIC_INFO(0, var_names)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_fill, 0)
- ZEND_ARG_INFO(0, start_key)
- ZEND_ARG_INFO(0, num)
- ZEND_ARG_INFO(0, val)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_fill_keys, 0)
- ZEND_ARG_INFO(0, keys) /* ARRAY_INFO(0, keys, 0) */
- ZEND_ARG_INFO(0, val)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_range, 0, 0, 2)
- ZEND_ARG_INFO(0, low)
- ZEND_ARG_INFO(0, high)
- ZEND_ARG_INFO(0, step)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_shuffle, 0)
- ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_push, 0, 0, 2)
- ZEND_ARG_INFO(1, stack) /* ARRAY_INFO(1, stack, 0) */
- ZEND_ARG_VARIADIC_INFO(0, vars)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_pop, 0)
- ZEND_ARG_INFO(1, stack) /* ARRAY_INFO(1, stack, 0) */
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_shift, 0)
- ZEND_ARG_INFO(1, stack) /* ARRAY_INFO(1, stack, 0) */
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_unshift, 0, 0, 2)
- ZEND_ARG_INFO(1, stack) /* ARRAY_INFO(1, stack, 0) */
- ZEND_ARG_VARIADIC_INFO(0, vars)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_splice, 0, 0, 2)
- ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
- ZEND_ARG_INFO(0, offset)
- ZEND_ARG_INFO(0, length)
- ZEND_ARG_INFO(0, replacement) /* ARRAY_INFO(0, arg, 1) */
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_slice, 0, 0, 2)
- ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(1, arg, 0) */
- ZEND_ARG_INFO(0, offset)
- ZEND_ARG_INFO(0, length)
- ZEND_ARG_INFO(0, preserve_keys)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_merge, 0, 0, 2)
- ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg, 0) */
- ZEND_ARG_VARIADIC_INFO(0, arrays)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_merge_recursive, 0, 0, 2)
- ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg, 0) */
- ZEND_ARG_VARIADIC_INFO(0, arrays)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_replace, 0, 0, 2)
- ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg, 0) */
- ZEND_ARG_VARIADIC_INFO(0, arrays)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_replace_recursive, 0, 0, 2)
- ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg, 0) */
- ZEND_ARG_VARIADIC_INFO(0, arrays)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_keys, 0, 0, 1)
- ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
- ZEND_ARG_INFO(0, search_value)
- ZEND_ARG_INFO(0, strict)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_values, 0)
- ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_count_values, 0)
- ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_column, 0, 0, 2)
- ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
- ZEND_ARG_INFO(0, column_key)
- ZEND_ARG_INFO(0, index_key)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_reverse, 0, 0, 1)
- ZEND_ARG_INFO(0, input) /* ARRAY_INFO(0, arg, 0) */
- ZEND_ARG_INFO(0, preserve_keys)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_pad, 0)
- ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
- ZEND_ARG_INFO(0, pad_size)
- ZEND_ARG_INFO(0, pad_value)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_flip, 0)
- ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_change_key_case, 0, 0, 1)
- ZEND_ARG_INFO(0, input) /* ARRAY_INFO(0, arg, 0) */
- ZEND_ARG_INFO(0, case)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_unique, 0, 0, 1)
- ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
- ZEND_ARG_INFO(0, flags)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_intersect_key, 0, 0, 2)
- ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
- ZEND_ARG_VARIADIC_INFO(0, arrays)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_intersect_ukey, 0)
- ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
- ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
- ZEND_ARG_INFO(0, callback_key_compare_func)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_intersect, 0, 0, 2)
- ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
- ZEND_ARG_VARIADIC_INFO(0, arrays)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_uintersect, 0)
- ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
- ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
- ZEND_ARG_INFO(0, callback_data_compare_func)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_intersect_assoc, 0, 0, 2)
- ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
- ZEND_ARG_VARIADIC_INFO(0, arrays)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_uintersect_assoc, 0)
- ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
- ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
- ZEND_ARG_INFO(0, callback_data_compare_func)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_intersect_uassoc, 0)
- ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
- ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
- ZEND_ARG_INFO(0, callback_key_compare_func)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_uintersect_uassoc, 0)
- ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
- ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
- ZEND_ARG_INFO(0, callback_data_compare_func)
- ZEND_ARG_INFO(0, callback_key_compare_func)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_diff_key, 0, 0, 2)
- ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
- ZEND_ARG_VARIADIC_INFO(0, arrays)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_diff_ukey, 0)
- ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
- ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
- ZEND_ARG_INFO(0, callback_key_comp_func)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_diff, 0, 0, 2)
- ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
- ZEND_ARG_VARIADIC_INFO(0, arrays)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_udiff, 0)
- ZEND_ARG_INFO(0, arr1)
- ZEND_ARG_INFO(0, arr2)
- ZEND_ARG_INFO(0, callback_data_comp_func)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_diff_assoc, 0, 0, 2)
- ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
- ZEND_ARG_VARIADIC_INFO(0, arrays)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_diff_uassoc, 0)
- ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
- ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
- ZEND_ARG_INFO(0, callback_data_comp_func)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_udiff_assoc, 0)
- ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
- ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
- ZEND_ARG_INFO(0, callback_key_comp_func)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_udiff_uassoc, 0)
- ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
- ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
- ZEND_ARG_INFO(0, callback_data_comp_func)
- ZEND_ARG_INFO(0, callback_key_comp_func)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_multisort, 0, 0, 1)
- ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arr1) /* ARRAY_INFO(0, arg1, 0) */
- ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, sort_order)
- ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, sort_flags)
- ZEND_ARG_VARIADIC_INFO(ZEND_SEND_PREFER_REF, arr2)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_rand, 0, 0, 1)
- ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
- ZEND_ARG_INFO(0, num_req)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_sum, 0)
- ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_product, 0)
- ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_reduce, 0, 0, 2)
- ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
- ZEND_ARG_INFO(0, callback)
- ZEND_ARG_INFO(0, initial)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_filter, 0, 0, 1)
- ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
- ZEND_ARG_INFO(0, callback)
- ZEND_ARG_INFO(0, use_keys)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_map, 0, 0, 2)
- ZEND_ARG_INFO(0, callback)
- ZEND_ARG_VARIADIC_INFO(0, arrays)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_key_exists, 0)
- ZEND_ARG_INFO(0, key)
- ZEND_ARG_INFO(0, search)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_array_chunk, 0, 0, 2)
- ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
- ZEND_ARG_INFO(0, size)
- ZEND_ARG_INFO(0, preserve_keys)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_array_combine, 0)
- ZEND_ARG_INFO(0, keys) /* ARRAY_INFO(0, keys, 0) */
- ZEND_ARG_INFO(0, values) /* ARRAY_INFO(0, values, 0) */
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ basic_functions.c */
- ZEND_BEGIN_ARG_INFO(arginfo_get_magic_quotes_gpc, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_get_magic_quotes_runtime, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_set_magic_quotes_runtime, 0, 0, 1)
- ZEND_ARG_INFO(0, new_setting)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_constant, 0)
- ZEND_ARG_INFO(0, const_name)
- ZEND_END_ARG_INFO()
- #ifdef HAVE_INET_NTOP
- ZEND_BEGIN_ARG_INFO(arginfo_inet_ntop, 0)
- ZEND_ARG_INFO(0, in_addr)
- ZEND_END_ARG_INFO()
- #endif
- #ifdef HAVE_INET_PTON
- ZEND_BEGIN_ARG_INFO(arginfo_inet_pton, 0)
- ZEND_ARG_INFO(0, ip_address)
- ZEND_END_ARG_INFO()
- #endif
- ZEND_BEGIN_ARG_INFO(arginfo_ip2long, 0)
- ZEND_ARG_INFO(0, ip_address)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_long2ip, 0)
- ZEND_ARG_INFO(0, proper_address)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_getenv, 0, 0, 1)
- ZEND_ARG_INFO(0, varname)
- ZEND_ARG_INFO(0, local_only)
- ZEND_END_ARG_INFO()
- #ifdef HAVE_PUTENV
- ZEND_BEGIN_ARG_INFO(arginfo_putenv, 0)
- ZEND_ARG_INFO(0, setting)
- ZEND_END_ARG_INFO()
- #endif
- ZEND_BEGIN_ARG_INFO_EX(arginfo_getopt, 0, 0, 1)
- ZEND_ARG_INFO(0, options)
- ZEND_ARG_INFO(0, opts) /* ARRAY_INFO(0, opts, 1) */
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_flush, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_sleep, 0)
- ZEND_ARG_INFO(0, seconds)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_usleep, 0)
- ZEND_ARG_INFO(0, micro_seconds)
- ZEND_END_ARG_INFO()
- #if HAVE_NANOSLEEP
- ZEND_BEGIN_ARG_INFO(arginfo_time_nanosleep, 0)
- ZEND_ARG_INFO(0, seconds)
- ZEND_ARG_INFO(0, nanoseconds)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_time_sleep_until, 0)
- ZEND_ARG_INFO(0, timestamp)
- ZEND_END_ARG_INFO()
- #endif
- ZEND_BEGIN_ARG_INFO(arginfo_get_current_user, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_get_cfg_var, 0)
- ZEND_ARG_INFO(0, option_name)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_error_log, 0, 0, 1)
- ZEND_ARG_INFO(0, message)
- ZEND_ARG_INFO(0, message_type)
- ZEND_ARG_INFO(0, destination)
- ZEND_ARG_INFO(0, extra_headers)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_error_get_last, 0, 0, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_call_user_func, 0, 0, 1)
- ZEND_ARG_INFO(0, function_name)
- ZEND_ARG_VARIADIC_INFO(0, parameters)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_call_user_func_array, 0, 0, 2)
- ZEND_ARG_INFO(0, function_name)
- ZEND_ARG_INFO(0, parameters) /* ARRAY_INFO(0, parameters, 1) */
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_call_user_method, 0, 0, 2)
- ZEND_ARG_INFO(0, method_name)
- ZEND_ARG_INFO(1, object)
- ZEND_ARG_VARIADIC_INFO(0, parameters)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_call_user_method_array, 0)
- ZEND_ARG_INFO(0, method_name)
- ZEND_ARG_INFO(1, object)
- ZEND_ARG_INFO(0, params) /* ARRAY_INFO(0, params, 1) */
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_forward_static_call, 0, 0, 1)
- ZEND_ARG_INFO(0, function_name)
- ZEND_ARG_VARIADIC_INFO(0, parameters)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_forward_static_call_array, 0, 0, 2)
- ZEND_ARG_INFO(0, function_name)
- ZEND_ARG_INFO(0, parameters) /* ARRAY_INFO(0, parameters, 1) */
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_register_shutdown_function, 0, 0, 1)
- ZEND_ARG_INFO(0, function_name)
- ZEND_ARG_VARIADIC_INFO(0, parameters)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_highlight_file, 0, 0, 1)
- ZEND_ARG_INFO(0, file_name)
- ZEND_ARG_INFO(0, return)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_php_strip_whitespace, 0)
- ZEND_ARG_INFO(0, file_name)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_highlight_string, 0, 0, 1)
- ZEND_ARG_INFO(0, string)
- ZEND_ARG_INFO(0, return)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_ini_get, 0)
- ZEND_ARG_INFO(0, varname)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_ini_get_all, 0, 0, 0)
- ZEND_ARG_INFO(0, extension)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_ini_set, 0)
- ZEND_ARG_INFO(0, varname)
- ZEND_ARG_INFO(0, newvalue)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_ini_restore, 0)
- ZEND_ARG_INFO(0, varname)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_set_include_path, 0)
- ZEND_ARG_INFO(0, new_include_path)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_get_include_path, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_restore_include_path, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_print_r, 0, 0, 1)
- ZEND_ARG_INFO(0, var)
- ZEND_ARG_INFO(0, return)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_connection_aborted, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_connection_status, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_ignore_user_abort, 0, 0, 0)
- ZEND_ARG_INFO(0, value)
- ZEND_END_ARG_INFO()
- #if HAVE_GETSERVBYNAME
- ZEND_BEGIN_ARG_INFO(arginfo_getservbyname, 0)
- ZEND_ARG_INFO(0, service)
- ZEND_ARG_INFO(0, protocol)
- ZEND_END_ARG_INFO()
- #endif
- #if HAVE_GETSERVBYPORT
- ZEND_BEGIN_ARG_INFO(arginfo_getservbyport, 0)
- ZEND_ARG_INFO(0, port)
- ZEND_ARG_INFO(0, protocol)
- ZEND_END_ARG_INFO()
- #endif
- #if HAVE_GETPROTOBYNAME
- ZEND_BEGIN_ARG_INFO(arginfo_getprotobyname, 0)
- ZEND_ARG_INFO(0, name)
- ZEND_END_ARG_INFO()
- #endif
- #if HAVE_GETPROTOBYNUMBER
- ZEND_BEGIN_ARG_INFO(arginfo_getprotobynumber, 0)
- ZEND_ARG_INFO(0, proto)
- ZEND_END_ARG_INFO()
- #endif
- ZEND_BEGIN_ARG_INFO_EX(arginfo_register_tick_function, 0, 0, 1)
- ZEND_ARG_INFO(0, function_name)
- ZEND_ARG_VARIADIC_INFO(0, parameters)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_unregister_tick_function, 0)
- ZEND_ARG_INFO(0, function_name)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_is_uploaded_file, 0)
- ZEND_ARG_INFO(0, path)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_move_uploaded_file, 0)
- ZEND_ARG_INFO(0, path)
- ZEND_ARG_INFO(0, new_path)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_ini_file, 0, 0, 1)
- ZEND_ARG_INFO(0, filename)
- ZEND_ARG_INFO(0, process_sections)
- ZEND_ARG_INFO(0, scanner_mode)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_ini_string, 0, 0, 1)
- ZEND_ARG_INFO(0, ini_string)
- ZEND_ARG_INFO(0, process_sections)
- ZEND_ARG_INFO(0, scanner_mode)
- ZEND_END_ARG_INFO()
- #if ZEND_DEBUG
- ZEND_BEGIN_ARG_INFO(arginfo_config_get_hash, 0)
- ZEND_END_ARG_INFO()
- #endif
- #ifdef HAVE_GETLOADAVG
- ZEND_BEGIN_ARG_INFO(arginfo_sys_getloadavg, 0)
- ZEND_END_ARG_INFO()
- #endif
- /* }}} */
- /* {{{ assert.c */
- ZEND_BEGIN_ARG_INFO(arginfo_assert, 0)
- ZEND_ARG_INFO(0, assertion)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_assert_options, 0, 0, 1)
- ZEND_ARG_INFO(0, what)
- ZEND_ARG_INFO(0, value)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ base64.c */
- ZEND_BEGIN_ARG_INFO(arginfo_base64_encode, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_base64_decode, 0, 0, 1)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, strict)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ browscap.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_get_browser, 0, 0, 0)
- ZEND_ARG_INFO(0, browser_name)
- ZEND_ARG_INFO(0, return_array)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ crc32.c */
- ZEND_BEGIN_ARG_INFO(arginfo_crc32, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ crypt.c */
- #if HAVE_CRYPT
- ZEND_BEGIN_ARG_INFO_EX(arginfo_crypt, 0, 0, 1)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, salt)
- ZEND_END_ARG_INFO()
- #endif
- /* }}} */
- /* {{{ cyr_convert.c */
- ZEND_BEGIN_ARG_INFO(arginfo_convert_cyr_string, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, from)
- ZEND_ARG_INFO(0, to)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ datetime.c */
- #if HAVE_STRPTIME
- ZEND_BEGIN_ARG_INFO(arginfo_strptime, 0)
- ZEND_ARG_INFO(0, timestamp)
- ZEND_ARG_INFO(0, format)
- ZEND_END_ARG_INFO()
- #endif
- /* }}} */
- /* {{{ dir.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_opendir, 0, 0, 1)
- ZEND_ARG_INFO(0, path)
- ZEND_ARG_INFO(0, context)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_dir, 0, 0, 1)
- ZEND_ARG_INFO(0, directory)
- ZEND_ARG_INFO(0, context)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_closedir, 0, 0, 0)
- ZEND_ARG_INFO(0, dir_handle)
- ZEND_END_ARG_INFO()
- #if defined(HAVE_CHROOT) && !defined(ZTS) && ENABLE_CHROOT_FUNC
- ZEND_BEGIN_ARG_INFO(arginfo_chroot, 0)
- ZEND_ARG_INFO(0, directory)
- ZEND_END_ARG_INFO()
- #endif
- ZEND_BEGIN_ARG_INFO(arginfo_chdir, 0)
- ZEND_ARG_INFO(0, directory)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_getcwd, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_rewinddir, 0, 0, 0)
- ZEND_ARG_INFO(0, dir_handle)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_readdir, 0, 0, 0)
- ZEND_ARG_INFO(0, dir_handle)
- ZEND_END_ARG_INFO()
- #ifdef HAVE_GLOB
- ZEND_BEGIN_ARG_INFO_EX(arginfo_glob, 0, 0, 1)
- ZEND_ARG_INFO(0, pattern)
- ZEND_ARG_INFO(0, flags)
- ZEND_END_ARG_INFO()
- #endif
- ZEND_BEGIN_ARG_INFO_EX(arginfo_scandir, 0, 0, 1)
- ZEND_ARG_INFO(0, dir)
- ZEND_ARG_INFO(0, sorting_order)
- ZEND_ARG_INFO(0, context)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ dns.c */
- ZEND_BEGIN_ARG_INFO(arginfo_gethostbyaddr, 0)
- ZEND_ARG_INFO(0, ip_address)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_gethostbyname, 0)
- ZEND_ARG_INFO(0, hostname)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_gethostbynamel, 0)
- ZEND_ARG_INFO(0, hostname)
- ZEND_END_ARG_INFO()
- #ifdef HAVE_GETHOSTNAME
- ZEND_BEGIN_ARG_INFO(arginfo_gethostname, 0)
- ZEND_END_ARG_INFO()
- #endif
- #if defined(PHP_WIN32) || (HAVE_DNS_SEARCH_FUNC && !(defined(__BEOS__) || defined(NETWARE)))
- ZEND_BEGIN_ARG_INFO_EX(arginfo_dns_check_record, 0, 0, 1)
- ZEND_ARG_INFO(0, host)
- ZEND_ARG_INFO(0, type)
- ZEND_END_ARG_INFO()
- # if defined(PHP_WIN32) || HAVE_FULL_DNS_FUNCS
- ZEND_BEGIN_ARG_INFO_EX(arginfo_dns_get_record, 0, 0, 1)
- ZEND_ARG_INFO(0, hostname)
- ZEND_ARG_INFO(0, type)
- ZEND_ARG_ARRAY_INFO(1, authns, 1)
- ZEND_ARG_ARRAY_INFO(1, addtl, 1)
- ZEND_ARG_INFO(0, raw)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_dns_get_mx, 0, 0, 2)
- ZEND_ARG_INFO(0, hostname)
- ZEND_ARG_INFO(1, mxhosts) /* ARRAY_INFO(1, mxhosts, 1) */
- ZEND_ARG_INFO(1, weight) /* ARRAY_INFO(1, weight, 1) */
- ZEND_END_ARG_INFO()
- # endif
- #endif /* defined(PHP_WIN32) || (HAVE_DNS_SEARCH_FUNC && !(defined(__BEOS__) || defined(NETWARE))) */
- /* }}} */
- /* {{{ exec.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_exec, 0, 0, 1)
- ZEND_ARG_INFO(0, command)
- ZEND_ARG_INFO(1, output) /* ARRAY_INFO(1, output, 1) */
- ZEND_ARG_INFO(1, return_value)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_system, 0, 0, 1)
- ZEND_ARG_INFO(0, command)
- ZEND_ARG_INFO(1, return_value)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_passthru, 0, 0, 1)
- ZEND_ARG_INFO(0, command)
- ZEND_ARG_INFO(1, return_value)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_escapeshellcmd, 0)
- ZEND_ARG_INFO(0, command)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_escapeshellarg, 0)
- ZEND_ARG_INFO(0, arg)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_shell_exec, 0)
- ZEND_ARG_INFO(0, cmd)
- ZEND_END_ARG_INFO()
- #ifdef HAVE_NICE
- ZEND_BEGIN_ARG_INFO(arginfo_proc_nice, 0)
- ZEND_ARG_INFO(0, priority)
- ZEND_END_ARG_INFO()
- #endif
- /* }}} */
- /* {{{ file.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_flock, 0, 0, 2)
- ZEND_ARG_INFO(0, fp)
- ZEND_ARG_INFO(0, operation)
- ZEND_ARG_INFO(1, wouldblock)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_get_meta_tags, 0, 0, 1)
- ZEND_ARG_INFO(0, filename)
- ZEND_ARG_INFO(0, use_include_path)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_file_get_contents, 0, 0, 1)
- ZEND_ARG_INFO(0, filename)
- ZEND_ARG_INFO(0, flags)
- ZEND_ARG_INFO(0, context)
- ZEND_ARG_INFO(0, offset)
- ZEND_ARG_INFO(0, maxlen)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_file_put_contents, 0, 0, 2)
- ZEND_ARG_INFO(0, filename)
- ZEND_ARG_INFO(0, data)
- ZEND_ARG_INFO(0, flags)
- ZEND_ARG_INFO(0, context)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_file, 0, 0, 1)
- ZEND_ARG_INFO(0, filename)
- ZEND_ARG_INFO(0, flags)
- ZEND_ARG_INFO(0, context)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_tempnam, 0)
- ZEND_ARG_INFO(0, dir)
- ZEND_ARG_INFO(0, prefix)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_tmpfile, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_fopen, 0, 0, 2)
- ZEND_ARG_INFO(0, filename)
- ZEND_ARG_INFO(0, mode)
- ZEND_ARG_INFO(0, use_include_path)
- ZEND_ARG_INFO(0, context)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_fclose, 0)
- ZEND_ARG_INFO(0, fp)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_popen, 0)
- ZEND_ARG_INFO(0, command)
- ZEND_ARG_INFO(0, mode)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_pclose, 0)
- ZEND_ARG_INFO(0, fp)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_feof, 0)
- ZEND_ARG_INFO(0, fp)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_fgets, 0, 0, 1)
- ZEND_ARG_INFO(0, fp)
- ZEND_ARG_INFO(0, length)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_fgetc, 0)
- ZEND_ARG_INFO(0, fp)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_fgetss, 0, 0, 1)
- ZEND_ARG_INFO(0, fp)
- ZEND_ARG_INFO(0, length)
- ZEND_ARG_INFO(0, allowable_tags)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_fscanf, 0, 0, 2)
- ZEND_ARG_INFO(0, stream)
- ZEND_ARG_INFO(0, format)
- ZEND_ARG_VARIADIC_INFO(1, vars)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_fwrite, 0, 0, 2)
- ZEND_ARG_INFO(0, fp)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, length)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_fflush, 0)
- ZEND_ARG_INFO(0, fp)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_rewind, 0)
- ZEND_ARG_INFO(0, fp)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_ftell, 0)
- ZEND_ARG_INFO(0, fp)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_fseek, 0, 0, 2)
- ZEND_ARG_INFO(0, fp)
- ZEND_ARG_INFO(0, offset)
- ZEND_ARG_INFO(0, whence)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_mkdir, 0, 0, 1)
- ZEND_ARG_INFO(0, pathname)
- ZEND_ARG_INFO(0, mode)
- ZEND_ARG_INFO(0, recursive)
- ZEND_ARG_INFO(0, context)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_rmdir, 0, 0, 1)
- ZEND_ARG_INFO(0, dirname)
- ZEND_ARG_INFO(0, context)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_readfile, 0, 0, 1)
- ZEND_ARG_INFO(0, filename)
- ZEND_ARG_INFO(0, flags)
- ZEND_ARG_INFO(0, context)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_umask, 0, 0, 0)
- ZEND_ARG_INFO(0, mask)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_fpassthru, 0)
- ZEND_ARG_INFO(0, fp)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_rename, 0, 0, 2)
- ZEND_ARG_INFO(0, old_name)
- ZEND_ARG_INFO(0, new_name)
- ZEND_ARG_INFO(0, context)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_unlink, 0, 0, 1)
- ZEND_ARG_INFO(0, filename)
- ZEND_ARG_INFO(0, context)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_ftruncate, 0)
- ZEND_ARG_INFO(0, fp)
- ZEND_ARG_INFO(0, size)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_fstat, 0)
- ZEND_ARG_INFO(0, fp)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_copy, 0, 0, 2)
- ZEND_ARG_INFO(0, source_file)
- ZEND_ARG_INFO(0, destination_file)
- ZEND_ARG_INFO(0, context)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_fread, 0)
- ZEND_ARG_INFO(0, fp)
- ZEND_ARG_INFO(0, length)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_fputcsv, 0, 0, 2)
- ZEND_ARG_INFO(0, fp)
- ZEND_ARG_INFO(0, fields) /* ARRAY_INFO(0, fields, 1) */
- ZEND_ARG_INFO(0, delimiter)
- ZEND_ARG_INFO(0, enclosure)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_fgetcsv, 0, 0, 1)
- ZEND_ARG_INFO(0, fp)
- ZEND_ARG_INFO(0, length)
- ZEND_ARG_INFO(0, delimiter)
- ZEND_ARG_INFO(0, enclosure)
- ZEND_ARG_INFO(0, escape)
- ZEND_END_ARG_INFO()
- #if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
- ZEND_BEGIN_ARG_INFO(arginfo_realpath, 0)
- ZEND_ARG_INFO(0, path)
- ZEND_END_ARG_INFO()
- #endif
- #ifdef HAVE_FNMATCH
- ZEND_BEGIN_ARG_INFO_EX(arginfo_fnmatch, 0, 0, 2)
- ZEND_ARG_INFO(0, pattern)
- ZEND_ARG_INFO(0, filename)
- ZEND_ARG_INFO(0, flags)
- ZEND_END_ARG_INFO()
- #endif
- ZEND_BEGIN_ARG_INFO(arginfo_sys_get_temp_dir, 0)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ filestat.c */
- ZEND_BEGIN_ARG_INFO(arginfo_disk_total_space, 0)
- ZEND_ARG_INFO(0, path)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_disk_free_space, 0)
- ZEND_ARG_INFO(0, path)
- ZEND_END_ARG_INFO()
- #ifndef NETWARE
- ZEND_BEGIN_ARG_INFO(arginfo_chgrp, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_ARG_INFO(0, group)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_chown, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_ARG_INFO(0, user)
- ZEND_END_ARG_INFO()
- #endif
- #if HAVE_LCHOWN
- ZEND_BEGIN_ARG_INFO(arginfo_lchgrp, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_ARG_INFO(0, group)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_lchown, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_ARG_INFO(0, user)
- ZEND_END_ARG_INFO()
- #endif
- ZEND_BEGIN_ARG_INFO(arginfo_chmod, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_ARG_INFO(0, mode)
- ZEND_END_ARG_INFO()
- #if HAVE_UTIME
- ZEND_BEGIN_ARG_INFO_EX(arginfo_touch, 0, 0, 1)
- ZEND_ARG_INFO(0, filename)
- ZEND_ARG_INFO(0, time)
- ZEND_ARG_INFO(0, atime)
- ZEND_END_ARG_INFO()
- #endif
- ZEND_BEGIN_ARG_INFO_EX(arginfo_clearstatcache, 0, 0, 0)
- ZEND_ARG_INFO(0, clear_realpath_cache)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_realpath_cache_size, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_realpath_cache_get, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_fileperms, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_fileinode, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_filesize, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_fileowner, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_filegroup, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_fileatime, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_filemtime, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_filectime, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_filetype, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_is_writable, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_is_readable, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_is_executable, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_is_file, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_is_dir, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_is_link, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_file_exists, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_lstat, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stat, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ formatted_print.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_sprintf, 0, 0, 2)
- ZEND_ARG_INFO(0, format)
- ZEND_ARG_VARIADIC_INFO(0, args)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_vsprintf, 0)
- ZEND_ARG_INFO(0, format)
- ZEND_ARG_INFO(0, args) /* ARRAY_INFO(0, args, 1) */
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_printf, 0, 0, 1)
- ZEND_ARG_INFO(0, format)
- ZEND_ARG_VARIADIC_INFO(0, args)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_vprintf, 0)
- ZEND_ARG_INFO(0, format)
- ZEND_ARG_INFO(0, args) /* ARRAY_INFO(0, args, 1) */
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_fprintf, 0, 0, 2)
- ZEND_ARG_INFO(0, stream)
- ZEND_ARG_INFO(0, format)
- ZEND_ARG_VARIADIC_INFO(0, args)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_vfprintf, 0)
- ZEND_ARG_INFO(0, stream)
- ZEND_ARG_INFO(0, format)
- ZEND_ARG_INFO(0, args) /* ARRAY_INFO(0, args, 1) */
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ fsock.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_fsockopen, 0, 0, 2)
- ZEND_ARG_INFO(0, hostname)
- ZEND_ARG_INFO(0, port)
- ZEND_ARG_INFO(1, errno)
- ZEND_ARG_INFO(1, errstr)
- ZEND_ARG_INFO(0, timeout)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_pfsockopen, 0, 0, 2)
- ZEND_ARG_INFO(0, hostname)
- ZEND_ARG_INFO(0, port)
- ZEND_ARG_INFO(1, errno)
- ZEND_ARG_INFO(1, errstr)
- ZEND_ARG_INFO(0, timeout)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ ftok.c */
- #if HAVE_FTOK
- ZEND_BEGIN_ARG_INFO(arginfo_ftok, 0)
- ZEND_ARG_INFO(0, pathname)
- ZEND_ARG_INFO(0, proj)
- ZEND_END_ARG_INFO()
- #endif
- /* }}} */
- /* {{{ head.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_header, 0, 0, 1)
- ZEND_ARG_INFO(0, header)
- ZEND_ARG_INFO(0, replace)
- ZEND_ARG_INFO(0, http_response_code)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_header_remove, 0, 0, 0)
- ZEND_ARG_INFO(0, name)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_setcookie, 0, 0, 1)
- ZEND_ARG_INFO(0, name)
- ZEND_ARG_INFO(0, value)
- ZEND_ARG_INFO(0, expires)
- ZEND_ARG_INFO(0, path)
- ZEND_ARG_INFO(0, domain)
- ZEND_ARG_INFO(0, secure)
- ZEND_ARG_INFO(0, httponly)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_setrawcookie, 0, 0, 1)
- ZEND_ARG_INFO(0, name)
- ZEND_ARG_INFO(0, value)
- ZEND_ARG_INFO(0, expires)
- ZEND_ARG_INFO(0, path)
- ZEND_ARG_INFO(0, domain)
- ZEND_ARG_INFO(0, secure)
- ZEND_ARG_INFO(0, httponly)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_headers_sent, 0, 0, 0)
- ZEND_ARG_INFO(1, file)
- ZEND_ARG_INFO(1, line)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_headers_list, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_http_response_code, 0, 0, 0)
- ZEND_ARG_INFO(0, response_code)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ html.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_htmlspecialchars, 0, 0, 1)
- ZEND_ARG_INFO(0, string)
- ZEND_ARG_INFO(0, quote_style)
- ZEND_ARG_INFO(0, charset)
- ZEND_ARG_INFO(0, double_encode)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_htmlspecialchars_decode, 0, 0, 1)
- ZEND_ARG_INFO(0, string)
- ZEND_ARG_INFO(0, quote_style)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_html_entity_decode, 0, 0, 1)
- ZEND_ARG_INFO(0, string)
- ZEND_ARG_INFO(0, quote_style)
- ZEND_ARG_INFO(0, charset)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_htmlentities, 0, 0, 1)
- ZEND_ARG_INFO(0, string)
- ZEND_ARG_INFO(0, quote_style)
- ZEND_ARG_INFO(0, charset)
- ZEND_ARG_INFO(0, double_encode)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_get_html_translation_table, 0, 0, 0)
- ZEND_ARG_INFO(0, table)
- ZEND_ARG_INFO(0, quote_style)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ http.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_http_build_query, 0, 0, 1)
- ZEND_ARG_INFO(0, formdata)
- ZEND_ARG_INFO(0, prefix)
- ZEND_ARG_INFO(0, arg_separator)
- ZEND_ARG_INFO(0, enc_type)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ image.c */
- ZEND_BEGIN_ARG_INFO(arginfo_image_type_to_mime_type, 0)
- ZEND_ARG_INFO(0, imagetype)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_image_type_to_extension, 0, 0, 1)
- ZEND_ARG_INFO(0, imagetype)
- ZEND_ARG_INFO(0, include_dot)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_getimagesize, 0, 0, 1)
- ZEND_ARG_INFO(0, imagefile)
- ZEND_ARG_INFO(1, info) /* ARRAY_INFO(1, info, 1) */
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ info.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_phpinfo, 0, 0, 0)
- ZEND_ARG_INFO(0, what)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_phpversion, 0, 0, 0)
- ZEND_ARG_INFO(0, extension)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_phpcredits, 0, 0, 0)
- ZEND_ARG_INFO(0, flag)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_php_sapi_name, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_php_uname, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_php_ini_scanned_files, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_php_ini_loaded_file, 0)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ iptc.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_iptcembed, 0, 0, 2)
- ZEND_ARG_INFO(0, iptcdata)
- ZEND_ARG_INFO(0, jpeg_file_name)
- ZEND_ARG_INFO(0, spool)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_iptcparse, 0)
- ZEND_ARG_INFO(0, iptcdata)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ lcg.c */
- ZEND_BEGIN_ARG_INFO(arginfo_lcg_value, 0)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ levenshtein.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_levenshtein, 0, 0, 2)
- ZEND_ARG_INFO(0, str1)
- ZEND_ARG_INFO(0, str2)
- ZEND_ARG_INFO(0, cost_ins)
- ZEND_ARG_INFO(0, cost_rep)
- ZEND_ARG_INFO(0, cost_del)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ link.c */
- #if defined(HAVE_SYMLINK) || defined(PHP_WIN32)
- ZEND_BEGIN_ARG_INFO(arginfo_readlink, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_linkinfo, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_symlink, 0)
- ZEND_ARG_INFO(0, target)
- ZEND_ARG_INFO(0, link)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_link, 0)
- ZEND_ARG_INFO(0, target)
- ZEND_ARG_INFO(0, link)
- ZEND_END_ARG_INFO()
- #endif
- /* }}} */
- /* {{{ mail.c */
- ZEND_BEGIN_ARG_INFO(arginfo_ezmlm_hash, 0)
- ZEND_ARG_INFO(0, addr)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_mail, 0, 0, 3)
- ZEND_ARG_INFO(0, to)
- ZEND_ARG_INFO(0, subject)
- ZEND_ARG_INFO(0, message)
- ZEND_ARG_INFO(0, additional_headers)
- ZEND_ARG_INFO(0, additional_parameters)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ math.c */
- ZEND_BEGIN_ARG_INFO(arginfo_abs, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_ceil, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_floor, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_round, 0, 0, 1)
- ZEND_ARG_INFO(0, number)
- ZEND_ARG_INFO(0, precision)
- ZEND_ARG_INFO(0, mode)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_sin, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_cos, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_tan, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_asin, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_acos, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_atan, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_atan2, 0)
- ZEND_ARG_INFO(0, y)
- ZEND_ARG_INFO(0, x)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_sinh, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_cosh, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_tanh, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_asinh, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_acosh, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_atanh, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_pi, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_is_finite, 0)
- ZEND_ARG_INFO(0, val)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_is_infinite, 0)
- ZEND_ARG_INFO(0, val)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_is_nan, 0)
- ZEND_ARG_INFO(0, val)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_pow, 0)
- ZEND_ARG_INFO(0, base)
- ZEND_ARG_INFO(0, exponent)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_exp, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_expm1, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_log1p, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_log, 0, 0, 1)
- ZEND_ARG_INFO(0, number)
- ZEND_ARG_INFO(0, base)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_log10, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_sqrt, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_hypot, 0)
- ZEND_ARG_INFO(0, num1)
- ZEND_ARG_INFO(0, num2)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_deg2rad, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_rad2deg, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_bindec, 0)
- ZEND_ARG_INFO(0, binary_number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_hexdec, 0)
- ZEND_ARG_INFO(0, hexadecimal_number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_octdec, 0)
- ZEND_ARG_INFO(0, octal_number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_decbin, 0)
- ZEND_ARG_INFO(0, decimal_number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_decoct, 0)
- ZEND_ARG_INFO(0, decimal_number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_dechex, 0)
- ZEND_ARG_INFO(0, decimal_number)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_base_convert, 0)
- ZEND_ARG_INFO(0, number)
- ZEND_ARG_INFO(0, frombase)
- ZEND_ARG_INFO(0, tobase)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_number_format, 0, 0, 1)
- ZEND_ARG_INFO(0, number)
- ZEND_ARG_INFO(0, num_decimal_places)
- ZEND_ARG_INFO(0, dec_separator)
- ZEND_ARG_INFO(0, thousands_separator)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_fmod, 0)
- ZEND_ARG_INFO(0, x)
- ZEND_ARG_INFO(0, y)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ md5.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_md5, 0, 0, 1)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, raw_output)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_md5_file, 0, 0, 1)
- ZEND_ARG_INFO(0, filename)
- ZEND_ARG_INFO(0, raw_output)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ metaphone.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_metaphone, 0, 0, 1)
- ZEND_ARG_INFO(0, text)
- ZEND_ARG_INFO(0, phones)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ microtime.c */
- #ifdef HAVE_GETTIMEOFDAY
- ZEND_BEGIN_ARG_INFO_EX(arginfo_microtime, 0, 0, 0)
- ZEND_ARG_INFO(0, get_as_float)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_gettimeofday, 0, 0, 0)
- ZEND_ARG_INFO(0, get_as_float)
- ZEND_END_ARG_INFO()
- #endif
- #ifdef HAVE_GETRUSAGE
- ZEND_BEGIN_ARG_INFO_EX(arginfo_getrusage, 0, 0, 0)
- ZEND_ARG_INFO(0, who)
- ZEND_END_ARG_INFO()
- #endif
- /* }}} */
- /* {{{ pack.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_pack, 0, 0, 2)
- ZEND_ARG_INFO(0, format)
- ZEND_ARG_VARIADIC_INFO(0, args)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_unpack, 0)
- ZEND_ARG_INFO(0, format)
- ZEND_ARG_INFO(0, input)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ pageinfo.c */
- ZEND_BEGIN_ARG_INFO(arginfo_getmyuid, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_getmygid, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_getmypid, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_getmyinode, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_getlastmod, 0)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ password.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_password_hash, 0, 0, 2)
- ZEND_ARG_INFO(0, password)
- ZEND_ARG_INFO(0, algo)
- ZEND_ARG_INFO(0, options)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_password_get_info, 0, 0, 1)
- ZEND_ARG_INFO(0, hash)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_password_needs_rehash, 0, 0, 2)
- ZEND_ARG_INFO(0, hash)
- ZEND_ARG_INFO(0, algo)
- ZEND_ARG_INFO(0, options)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_password_verify, 0, 0, 2)
- ZEND_ARG_INFO(0, password)
- ZEND_ARG_INFO(0, hash)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ proc_open.c */
- #ifdef PHP_CAN_SUPPORT_PROC_OPEN
- ZEND_BEGIN_ARG_INFO_EX(arginfo_proc_terminate, 0, 0, 1)
- ZEND_ARG_INFO(0, process)
- ZEND_ARG_INFO(0, signal)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_proc_close, 0)
- ZEND_ARG_INFO(0, process)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_proc_get_status, 0)
- ZEND_ARG_INFO(0, process)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_proc_open, 0, 0, 3)
- ZEND_ARG_INFO(0, command)
- ZEND_ARG_INFO(0, descriptorspec) /* ARRAY_INFO(0, descriptorspec, 1) */
- ZEND_ARG_INFO(1, pipes) /* ARRAY_INFO(1, pipes, 1) */
- ZEND_ARG_INFO(0, cwd)
- ZEND_ARG_INFO(0, env) /* ARRAY_INFO(0, env, 1) */
- ZEND_ARG_INFO(0, other_options) /* ARRAY_INFO(0, other_options, 1) */
- ZEND_END_ARG_INFO()
- #endif
- /* }}} */
- /* {{{ quot_print.c */
- ZEND_BEGIN_ARG_INFO(arginfo_quoted_printable_decode, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ quot_print.c */
- ZEND_BEGIN_ARG_INFO(arginfo_quoted_printable_encode, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ rand.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_srand, 0, 0, 0)
- ZEND_ARG_INFO(0, seed)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_mt_srand, 0, 0, 0)
- ZEND_ARG_INFO(0, seed)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_rand, 0, 0, 0)
- ZEND_ARG_INFO(0, min)
- ZEND_ARG_INFO(0, max)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_mt_rand, 0, 0, 0)
- ZEND_ARG_INFO(0, min)
- ZEND_ARG_INFO(0, max)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_getrandmax, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_mt_getrandmax, 0)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ sha1.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_sha1, 0, 0, 1)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, raw_output)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_sha1_file, 0, 0, 1)
- ZEND_ARG_INFO(0, filename)
- ZEND_ARG_INFO(0, raw_output)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ soundex.c */
- ZEND_BEGIN_ARG_INFO(arginfo_soundex, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ streamsfuncs.c */
- #if HAVE_SOCKETPAIR
- ZEND_BEGIN_ARG_INFO(arginfo_stream_socket_pair, 0)
- ZEND_ARG_INFO(0, domain)
- ZEND_ARG_INFO(0, type)
- ZEND_ARG_INFO(0, protocol)
- ZEND_END_ARG_INFO()
- #endif
- ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_client, 0, 0, 1)
- ZEND_ARG_INFO(0, remoteaddress)
- ZEND_ARG_INFO(1, errcode)
- ZEND_ARG_INFO(1, errstring)
- ZEND_ARG_INFO(0, timeout)
- ZEND_ARG_INFO(0, flags)
- ZEND_ARG_INFO(0, context)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_server, 0, 0, 1)
- ZEND_ARG_INFO(0, localaddress)
- ZEND_ARG_INFO(1, errcode)
- ZEND_ARG_INFO(1, errstring)
- ZEND_ARG_INFO(0, flags)
- ZEND_ARG_INFO(0, context)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_accept, 0, 0, 1)
- ZEND_ARG_INFO(0, serverstream)
- ZEND_ARG_INFO(0, timeout)
- ZEND_ARG_INFO(1, peername)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_socket_get_name, 0)
- ZEND_ARG_INFO(0, stream)
- ZEND_ARG_INFO(0, want_peer)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_sendto, 0, 0, 2)
- ZEND_ARG_INFO(0, stream)
- ZEND_ARG_INFO(0, data)
- ZEND_ARG_INFO(0, flags)
- ZEND_ARG_INFO(0, target_addr)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_recvfrom, 0, 0, 2)
- ZEND_ARG_INFO(0, stream)
- ZEND_ARG_INFO(0, amount)
- ZEND_ARG_INFO(0, flags)
- ZEND_ARG_INFO(1, remote_addr)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_get_contents, 0, 0, 1)
- ZEND_ARG_INFO(0, source)
- ZEND_ARG_INFO(0, maxlen)
- ZEND_ARG_INFO(0, offset)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_copy_to_stream, 0, 0, 2)
- ZEND_ARG_INFO(0, source)
- ZEND_ARG_INFO(0, dest)
- ZEND_ARG_INFO(0, maxlen)
- ZEND_ARG_INFO(0, pos)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_get_meta_data, 0)
- ZEND_ARG_INFO(0, fp)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_get_transports, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_get_wrappers, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_resolve_include_path, 0)
- ZEND_ARG_INFO(0, filename)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_is_local, 0)
- ZEND_ARG_INFO(0, stream)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_supports_lock, 0, 0, 1)
- ZEND_ARG_INFO(0, stream)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_select, 0, 0, 4)
- ZEND_ARG_INFO(1, read_streams) /* ARRAY_INFO(1, read_streams, 1) */
- ZEND_ARG_INFO(1, write_streams) /* ARRAY_INFO(1, write_streams, 1) */
- ZEND_ARG_INFO(1, except_streams) /* ARRAY_INFO(1, except_streams, 1) */
- ZEND_ARG_INFO(0, tv_sec)
- ZEND_ARG_INFO(0, tv_usec)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_context_get_options, 0)
- ZEND_ARG_INFO(0, stream_or_context)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_context_set_option, 0)
- ZEND_ARG_INFO(0, stream_or_context)
- ZEND_ARG_INFO(0, wrappername)
- ZEND_ARG_INFO(0, optionname)
- ZEND_ARG_INFO(0, value)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_context_set_params, 0)
- ZEND_ARG_INFO(0, stream_or_context)
- ZEND_ARG_INFO(0, options) /* ARRAY_INFO(0, options, 1) */
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_get_params, 0, ZEND_RETURN_VALUE, 1)
- ZEND_ARG_INFO(0, stream_or_context)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_get_default, 0, 0, 0)
- ZEND_ARG_INFO(0, options) /* ARRAY_INFO(0, options, 1) */
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_context_set_default, 0)
- ZEND_ARG_INFO(0, options)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_create, 0, 0, 0)
- ZEND_ARG_INFO(0, options) /* ARRAY_INFO(0, options, 1) */
- ZEND_ARG_INFO(0, params) /* ARRAY_INFO(0, params, 1) */
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_filter_prepend, 0, 0, 2)
- ZEND_ARG_INFO(0, stream)
- ZEND_ARG_INFO(0, filtername)
- ZEND_ARG_INFO(0, read_write)
- ZEND_ARG_INFO(0, filterparams)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_filter_append, 0, 0, 2)
- ZEND_ARG_INFO(0, stream)
- ZEND_ARG_INFO(0, filtername)
- ZEND_ARG_INFO(0, read_write)
- ZEND_ARG_INFO(0, filterparams)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_filter_remove, 0)
- ZEND_ARG_INFO(0, stream_filter)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_get_line, 0, 0, 2)
- ZEND_ARG_INFO(0, stream)
- ZEND_ARG_INFO(0, maxlen)
- ZEND_ARG_INFO(0, ending)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_set_blocking, 0)
- ZEND_ARG_INFO(0, socket)
- ZEND_ARG_INFO(0, mode)
- ZEND_END_ARG_INFO()
- #if HAVE_SYS_TIME_H || defined(PHP_WIN32)
- ZEND_BEGIN_ARG_INFO(arginfo_stream_set_timeout, 0)
- ZEND_ARG_INFO(0, stream)
- ZEND_ARG_INFO(0, seconds)
- ZEND_ARG_INFO(0, microseconds)
- ZEND_END_ARG_INFO()
- #endif
- ZEND_BEGIN_ARG_INFO(arginfo_stream_set_read_buffer, 0)
- ZEND_ARG_INFO(0, fp)
- ZEND_ARG_INFO(0, buffer)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_set_write_buffer, 0)
- ZEND_ARG_INFO(0, fp)
- ZEND_ARG_INFO(0, buffer)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_set_chunk_size, 0)
- ZEND_ARG_INFO(0, fp)
- ZEND_ARG_INFO(0, chunk_size)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_enable_crypto, 0, 0, 2)
- ZEND_ARG_INFO(0, stream)
- ZEND_ARG_INFO(0, enable)
- ZEND_ARG_INFO(0, cryptokind)
- ZEND_ARG_INFO(0, sessionstream)
- ZEND_END_ARG_INFO()
- #ifdef HAVE_SHUTDOWN
- ZEND_BEGIN_ARG_INFO(arginfo_stream_socket_shutdown, 0)
- ZEND_ARG_INFO(0, stream)
- ZEND_ARG_INFO(0, how)
- ZEND_END_ARG_INFO()
- #endif
- /* }}} */
- /* {{{ string.c */
- ZEND_BEGIN_ARG_INFO(arginfo_bin2hex, 0)
- ZEND_ARG_INFO(0, data)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_hex2bin, 0)
- ZEND_ARG_INFO(0, data)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_strspn, 0, 0, 2)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, mask)
- ZEND_ARG_INFO(0, start)
- ZEND_ARG_INFO(0, len)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_strcspn, 0, 0, 2)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, mask)
- ZEND_ARG_INFO(0, start)
- ZEND_ARG_INFO(0, len)
- ZEND_END_ARG_INFO()
- #if HAVE_NL_LANGINFO
- ZEND_BEGIN_ARG_INFO(arginfo_nl_langinfo, 0)
- ZEND_ARG_INFO(0, item)
- ZEND_END_ARG_INFO()
- #endif
- #ifdef HAVE_STRCOLL
- ZEND_BEGIN_ARG_INFO(arginfo_strcoll, 0)
- ZEND_ARG_INFO(0, str1)
- ZEND_ARG_INFO(0, str2)
- ZEND_END_ARG_INFO()
- #endif
- ZEND_BEGIN_ARG_INFO_EX(arginfo_trim, 0, 0, 1)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, character_mask)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_rtrim, 0, 0, 1)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, character_mask)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_ltrim, 0, 0, 1)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, character_mask)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_wordwrap, 0, 0, 1)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, width)
- ZEND_ARG_INFO(0, break)
- ZEND_ARG_INFO(0, cut)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_explode, 0, 0, 2)
- ZEND_ARG_INFO(0, separator)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, limit)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_implode, 0)
- ZEND_ARG_INFO(0, glue)
- ZEND_ARG_INFO(0, pieces)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_strtok, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, token)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_strtoupper, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_strtolower, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_basename, 0, 0, 1)
- ZEND_ARG_INFO(0, path)
- ZEND_ARG_INFO(0, suffix)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_dirname, 0)
- ZEND_ARG_INFO(0, path)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_pathinfo, 0, 0, 1)
- ZEND_ARG_INFO(0, path)
- ZEND_ARG_INFO(0, options)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_stristr, 0, 0, 2)
- ZEND_ARG_INFO(0, haystack)
- ZEND_ARG_INFO(0, needle)
- ZEND_ARG_INFO(0, part)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_strstr, 0, 0, 2)
- ZEND_ARG_INFO(0, haystack)
- ZEND_ARG_INFO(0, needle)
- ZEND_ARG_INFO(0, part)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_strpos, 0, 0, 2)
- ZEND_ARG_INFO(0, haystack)
- ZEND_ARG_INFO(0, needle)
- ZEND_ARG_INFO(0, offset)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_stripos, 0, 0, 2)
- ZEND_ARG_INFO(0, haystack)
- ZEND_ARG_INFO(0, needle)
- ZEND_ARG_INFO(0, offset)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_strrpos, 0, 0, 2)
- ZEND_ARG_INFO(0, haystack)
- ZEND_ARG_INFO(0, needle)
- ZEND_ARG_INFO(0, offset)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_strripos, 0, 0, 2)
- ZEND_ARG_INFO(0, haystack)
- ZEND_ARG_INFO(0, needle)
- ZEND_ARG_INFO(0, offset)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_strrchr, 0)
- ZEND_ARG_INFO(0, haystack)
- ZEND_ARG_INFO(0, needle)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_chunk_split, 0, 0, 1)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, chunklen)
- ZEND_ARG_INFO(0, ending)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_substr, 0, 0, 2)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, start)
- ZEND_ARG_INFO(0, length)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_substr_replace, 0, 0, 3)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, replace)
- ZEND_ARG_INFO(0, start)
- ZEND_ARG_INFO(0, length)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_quotemeta, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_ord, 0)
- ZEND_ARG_INFO(0, character)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_chr, 0)
- ZEND_ARG_INFO(0, codepoint)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_ucfirst, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_lcfirst, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_ucwords, 0, 0, 1)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, delimiters)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_strtr, 0, 0, 2)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, from)
- ZEND_ARG_INFO(0, to)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_strrev, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_similar_text, 0, 0, 2)
- ZEND_ARG_INFO(0, str1)
- ZEND_ARG_INFO(0, str2)
- ZEND_ARG_INFO(1, percent)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_addcslashes, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, charlist)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_addslashes, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stripcslashes, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stripslashes, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_str_replace, 0, 0, 3)
- ZEND_ARG_INFO(0, search)
- ZEND_ARG_INFO(0, replace)
- ZEND_ARG_INFO(0, subject)
- ZEND_ARG_INFO(1, replace_count)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_str_ireplace, 0, 0, 3)
- ZEND_ARG_INFO(0, search)
- ZEND_ARG_INFO(0, replace)
- ZEND_ARG_INFO(0, subject)
- ZEND_ARG_INFO(1, replace_count)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_hebrev, 0, 0, 1)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, max_chars_per_line)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_hebrevc, 0, 0, 1)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, max_chars_per_line)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_nl2br, 0, 0, 1)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, is_xhtml)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_strip_tags, 0, 0, 1)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, allowable_tags)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_setlocale, 0, 0, 2)
- ZEND_ARG_INFO(0, category)
- ZEND_ARG_VARIADIC_INFO(0, locales)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_str, 0, 0, 1)
- ZEND_ARG_INFO(0, encoded_string)
- ZEND_ARG_INFO(1, result)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_str_getcsv, 0, 0, 1)
- ZEND_ARG_INFO(0, string)
- ZEND_ARG_INFO(0, delimiter)
- ZEND_ARG_INFO(0, enclosure)
- ZEND_ARG_INFO(0, escape)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_str_repeat, 0)
- ZEND_ARG_INFO(0, input)
- ZEND_ARG_INFO(0, mult)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_count_chars, 0, 0, 1)
- ZEND_ARG_INFO(0, input)
- ZEND_ARG_INFO(0, mode)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_strnatcmp, 0)
- ZEND_ARG_INFO(0, s1)
- ZEND_ARG_INFO(0, s2)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_localeconv, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_strnatcasecmp, 0)
- ZEND_ARG_INFO(0, s1)
- ZEND_ARG_INFO(0, s2)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_substr_count, 0, 0, 2)
- ZEND_ARG_INFO(0, haystack)
- ZEND_ARG_INFO(0, needle)
- ZEND_ARG_INFO(0, offset)
- ZEND_ARG_INFO(0, length)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_str_pad, 0, 0, 2)
- ZEND_ARG_INFO(0, input)
- ZEND_ARG_INFO(0, pad_length)
- ZEND_ARG_INFO(0, pad_string)
- ZEND_ARG_INFO(0, pad_type)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_sscanf, 0, 0, 2)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, format)
- ZEND_ARG_VARIADIC_INFO(1, vars)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_str_rot13, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_str_shuffle, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_str_word_count, 0, 0, 1)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, format)
- ZEND_ARG_INFO(0, charlist)
- ZEND_END_ARG_INFO()
- #ifdef HAVE_STRFMON
- ZEND_BEGIN_ARG_INFO(arginfo_money_format, 0)
- ZEND_ARG_INFO(0, format)
- ZEND_ARG_INFO(0, value)
- ZEND_END_ARG_INFO()
- #endif
- ZEND_BEGIN_ARG_INFO_EX(arginfo_str_split, 0, 0, 1)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, split_length)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_strpbrk, 0, 0, 1)
- ZEND_ARG_INFO(0, haystack)
- ZEND_ARG_INFO(0, char_list)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_substr_compare, 0, 0, 3)
- ZEND_ARG_INFO(0, main_str)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, offset)
- ZEND_ARG_INFO(0, length)
- ZEND_ARG_INFO(0, case_sensitivity)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ syslog.c */
- #ifdef HAVE_SYSLOG_H
- ZEND_BEGIN_ARG_INFO(arginfo_openlog, 0)
- ZEND_ARG_INFO(0, ident)
- ZEND_ARG_INFO(0, option)
- ZEND_ARG_INFO(0, facility)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_closelog, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_syslog, 0)
- ZEND_ARG_INFO(0, priority)
- ZEND_ARG_INFO(0, message)
- ZEND_END_ARG_INFO()
- #endif
- /* }}} */
- /* {{{ type.c */
- ZEND_BEGIN_ARG_INFO(arginfo_gettype, 0)
- ZEND_ARG_INFO(0, var)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_settype, 0)
- ZEND_ARG_INFO(1, var)
- ZEND_ARG_INFO(0, type)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_intval, 0, 0, 1)
- ZEND_ARG_INFO(0, var)
- ZEND_ARG_INFO(0, base)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_floatval, 0)
- ZEND_ARG_INFO(0, var)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_strval, 0)
- ZEND_ARG_INFO(0, var)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_boolval, 0)
- ZEND_ARG_INFO(0, var)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_is_null, 0)
- ZEND_ARG_INFO(0, var)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_is_resource, 0)
- ZEND_ARG_INFO(0, var)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_is_bool, 0)
- ZEND_ARG_INFO(0, var)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_is_long, 0)
- ZEND_ARG_INFO(0, var)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_is_float, 0)
- ZEND_ARG_INFO(0, var)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_is_string, 0)
- ZEND_ARG_INFO(0, var)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_is_array, 0)
- ZEND_ARG_INFO(0, var)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_is_object, 0)
- ZEND_ARG_INFO(0, var)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_is_numeric, 0)
- ZEND_ARG_INFO(0, value)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_is_scalar, 0)
- ZEND_ARG_INFO(0, value)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_is_callable, 0, 0, 1)
- ZEND_ARG_INFO(0, var)
- ZEND_ARG_INFO(0, syntax_only)
- ZEND_ARG_INFO(1, callable_name)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ uniqid.c */
- #ifdef HAVE_GETTIMEOFDAY
- ZEND_BEGIN_ARG_INFO_EX(arginfo_uniqid, 0, 0, 0)
- ZEND_ARG_INFO(0, prefix)
- ZEND_ARG_INFO(0, more_entropy)
- ZEND_END_ARG_INFO()
- #endif
- /* }}} */
- /* {{{ url.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_url, 0, 0, 1)
- ZEND_ARG_INFO(0, url)
- ZEND_ARG_INFO(0, component)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_urlencode, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_urldecode, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_rawurlencode, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_rawurldecode, 0)
- ZEND_ARG_INFO(0, str)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_get_headers, 0, 0, 1)
- ZEND_ARG_INFO(0, url)
- ZEND_ARG_INFO(0, format)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ user_filters.c */
- ZEND_BEGIN_ARG_INFO(arginfo_stream_bucket_make_writeable, 0)
- ZEND_ARG_INFO(0, brigade)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_bucket_prepend, 0)
- ZEND_ARG_INFO(0, brigade)
- ZEND_ARG_INFO(0, bucket)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_bucket_append, 0)
- ZEND_ARG_INFO(0, brigade)
- ZEND_ARG_INFO(0, bucket)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_bucket_new, 0)
- ZEND_ARG_INFO(0, stream)
- ZEND_ARG_INFO(0, buffer)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_get_filters, 0)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_stream_filter_register, 0)
- ZEND_ARG_INFO(0, filtername)
- ZEND_ARG_INFO(0, classname)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ uuencode.c */
- ZEND_BEGIN_ARG_INFO(arginfo_convert_uuencode, 0)
- ZEND_ARG_INFO(0, data)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_convert_uudecode, 0)
- ZEND_ARG_INFO(0, data)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ var.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_var_dump, 0, 0, 1)
- ZEND_ARG_VARIADIC_INFO(0, vars)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_debug_zval_dump, 0, 0, 1)
- ZEND_ARG_VARIADIC_INFO(0, vars)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_var_export, 0, 0, 1)
- ZEND_ARG_INFO(0, var)
- ZEND_ARG_INFO(0, return)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_serialize, 0)
- ZEND_ARG_INFO(0, var)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_unserialize, 0)
- ZEND_ARG_INFO(0, variable_representation)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_memory_get_usage, 0, 0, 0)
- ZEND_ARG_INFO(0, real_usage)
- ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO_EX(arginfo_memory_get_peak_usage, 0, 0, 0)
- ZEND_ARG_INFO(0, real_usage)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* {{{ versioning.c */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_version_compare, 0, 0, 2)
- ZEND_ARG_INFO(0, ver1)
- ZEND_ARG_INFO(0, ver2)
- ZEND_ARG_INFO(0, oper)
- ZEND_END_ARG_INFO()
- /* }}} */
- /* }}} */
- const zend_function_entry basic_functions[] = { /* {{{ */
- PHP_FE(constant, arginfo_constant)
- PHP_FE(bin2hex, arginfo_bin2hex)
- PHP_FE(hex2bin, arginfo_hex2bin)
- PHP_FE(sleep, arginfo_sleep)
- PHP_FE(usleep, arginfo_usleep)
- #if HAVE_NANOSLEEP
- PHP_FE(time_nanosleep, arginfo_time_nanosleep)
- PHP_FE(time_sleep_until, arginfo_time_sleep_until)
- #endif
- #if HAVE_STRPTIME
- PHP_FE(strptime, arginfo_strptime)
- #endif
- PHP_FE(flush, arginfo_flush)
- PHP_FE(wordwrap, arginfo_wordwrap)
- PHP_FE(htmlspecialchars, arginfo_htmlspecialchars)
- PHP_FE(htmlentities, arginfo_htmlentities)
- PHP_FE(html_entity_decode, arginfo_html_entity_decode)
- PHP_FE(htmlspecialchars_decode, arginfo_htmlspecialchars_decode)
- PHP_FE(get_html_translation_table, arginfo_get_html_translation_table)
- PHP_FE(sha1, arginfo_sha1)
- PHP_FE(sha1_file, arginfo_sha1_file)
- PHP_NAMED_FE(md5,php_if_md5, arginfo_md5)
- PHP_NAMED_FE(md5_file,php_if_md5_file, arginfo_md5_file)
- PHP_NAMED_FE(crc32,php_if_crc32, arginfo_crc32)
- PHP_FE(iptcparse, arginfo_iptcparse)
- PHP_FE(iptcembed, arginfo_iptcembed)
- PHP_FE(getimagesize, arginfo_getimagesize)
- PHP_FE(getimagesizefromstring, arginfo_getimagesize)
- PHP_FE(image_type_to_mime_type, arginfo_image_type_to_mime_type)
- PHP_FE(image_type_to_extension, arginfo_image_type_to_extension)
- PHP_FE(phpinfo, arginfo_phpinfo)
- PHP_FE(phpversion, arginfo_phpversion)
- PHP_FE(phpcredits, arginfo_phpcredits)
- PHP_FE(php_sapi_name, arginfo_php_sapi_name)
- PHP_FE(php_uname, arginfo_php_uname)
- PHP_FE(php_ini_scanned_files, arginfo_php_ini_scanned_files)
- PHP_FE(php_ini_loaded_file, arginfo_php_ini_loaded_file)
- PHP_FE(strnatcmp, arginfo_strnatcmp)
- PHP_FE(strnatcasecmp, arginfo_strnatcasecmp)
- PHP_FE(substr_count, arginfo_substr_count)
- PHP_FE(strspn, arginfo_strspn)
- PHP_FE(strcspn, arginfo_strcspn)
- PHP_FE(strtok, arginfo_strtok)
- PHP_FE(strtoupper, arginfo_strtoupper)
- PHP_FE(strtolower, arginfo_strtolower)
- PHP_FE(strpos, arginfo_strpos)
- PHP_FE(stripos, arginfo_stripos)
- PHP_FE(strrpos, arginfo_strrpos)
- PHP_FE(strripos, arginfo_strripos)
- PHP_FE(strrev, arginfo_strrev)
- PHP_FE(hebrev, arginfo_hebrev)
- PHP_FE(hebrevc, arginfo_hebrevc)
- PHP_FE(nl2br, arginfo_nl2br)
- PHP_FE(basename, arginfo_basename)
- PHP_FE(dirname, arginfo_dirname)
- PHP_FE(pathinfo, arginfo_pathinfo)
- PHP_FE(stripslashes, arginfo_stripslashes)
- PHP_FE(stripcslashes, arginfo_stripcslashes)
- PHP_FE(strstr, arginfo_strstr)
- PHP_FE(stristr, arginfo_stristr)
- PHP_FE(strrchr, arginfo_strrchr)
- PHP_FE(str_shuffle, arginfo_str_shuffle)
- PHP_FE(str_word_count, arginfo_str_word_count)
- PHP_FE(str_split, arginfo_str_split)
- PHP_FE(strpbrk, arginfo_strpbrk)
- PHP_FE(substr_compare, arginfo_substr_compare)
- #ifdef HAVE_STRCOLL
- PHP_FE(strcoll, arginfo_strcoll)
- #endif
- #ifdef HAVE_STRFMON
- PHP_FE(money_format, arginfo_money_format)
- #endif
- PHP_FE(substr, arginfo_substr)
- PHP_FE(substr_replace, arginfo_substr_replace)
- PHP_FE(quotemeta, arginfo_quotemeta)
- PHP_FE(ucfirst, arginfo_ucfirst)
- PHP_FE(lcfirst, arginfo_lcfirst)
- PHP_FE(ucwords, arginfo_ucwords)
- PHP_FE(strtr, arginfo_strtr)
- PHP_FE(addslashes, arginfo_addslashes)
- PHP_FE(addcslashes, arginfo_addcslashes)
- PHP_FE(rtrim, arginfo_rtrim)
- PHP_FE(str_replace, arginfo_str_replace)
- PHP_FE(str_ireplace, arginfo_str_ireplace)
- PHP_FE(str_repeat, arginfo_str_repeat)
- PHP_FE(count_chars, arginfo_count_chars)
- PHP_FE(chunk_split, arginfo_chunk_split)
- PHP_FE(trim, arginfo_trim)
- PHP_FE(ltrim, arginfo_ltrim)
- PHP_FE(strip_tags, arginfo_strip_tags)
- PHP_FE(similar_text, arginfo_similar_text)
- PHP_FE(explode, arginfo_explode)
- PHP_FE(implode, arginfo_implode)
- PHP_FALIAS(join, implode, arginfo_implode)
- PHP_FE(setlocale, arginfo_setlocale)
- PHP_FE(localeconv, arginfo_localeconv)
- #if HAVE_NL_LANGINFO
- PHP_FE(nl_langinfo, arginfo_nl_langinfo)
- #endif
- PHP_FE(soundex, arginfo_soundex)
- PHP_FE(levenshtein, arginfo_levenshtein)
- PHP_FE(chr, arginfo_chr)
- PHP_FE(ord, arginfo_ord)
- PHP_FE(parse_str, arginfo_parse_str)
- PHP_FE(str_getcsv, arginfo_str_getcsv)
- PHP_FE(str_pad, arginfo_str_pad)
- PHP_FALIAS(chop, rtrim, arginfo_rtrim)
- PHP_FALIAS(strchr, strstr, arginfo_strstr)
- PHP_NAMED_FE(sprintf, PHP_FN(user_sprintf), arginfo_sprintf)
- PHP_NAMED_FE(printf, PHP_FN(user_printf), arginfo_printf)
- PHP_FE(vprintf, arginfo_vprintf)
- PHP_FE(vsprintf, arginfo_vsprintf)
- PHP_FE(fprintf, arginfo_fprintf)
- PHP_FE(vfprintf, arginfo_vfprintf)
- PHP_FE(sscanf, arginfo_sscanf)
- PHP_FE(fscanf, arginfo_fscanf)
- PHP_FE(parse_url, arginfo_parse_url)
- PHP_FE(urlencode, arginfo_urlencode)
- PHP_FE(urldecode, arginfo_urldecode)
- PHP_FE(rawurlencode, arginfo_rawurlencode)
- PHP_FE(rawurldecode, arginfo_rawurldecode)
- PHP_FE(http_build_query, arginfo_http_build_query)
- #if defined(HAVE_SYMLINK) || defined(PHP_WIN32)
- PHP_FE(readlink, arginfo_readlink)
- PHP_FE(linkinfo, arginfo_linkinfo)
- PHP_FE(symlink, arginfo_symlink)
- PHP_FE(link, arginfo_link)
- #endif
- PHP_FE(unlink, arginfo_unlink)
- PHP_FE(exec, arginfo_exec)
- PHP_FE(system, arginfo_system)
- PHP_FE(escapeshellcmd, arginfo_escapeshellcmd)
- PHP_FE(escapeshellarg, arginfo_escapeshellarg)
- PHP_FE(passthru, arginfo_passthru)
- PHP_FE(shell_exec, arginfo_shell_exec)
- #ifdef PHP_CAN_SUPPORT_PROC_OPEN
- PHP_FE(proc_open, arginfo_proc_open)
- PHP_FE(proc_close, arginfo_proc_close)
- PHP_FE(proc_terminate, arginfo_proc_terminate)
- PHP_FE(proc_get_status, arginfo_proc_get_status)
- #endif
- #ifdef HAVE_NICE
- PHP_FE(proc_nice, arginfo_proc_nice)
- #endif
- PHP_FE(rand, arginfo_rand)
- PHP_FE(srand, arginfo_srand)
- PHP_FE(getrandmax, arginfo_getrandmax)
- PHP_FE(mt_rand, arginfo_mt_rand)
- PHP_FE(mt_srand, arginfo_mt_srand)
- PHP_FE(mt_getrandmax, arginfo_mt_getrandmax)
- #if HAVE_GETSERVBYNAME
- PHP_FE(getservbyname, arginfo_getservbyname)
- #endif
- #if HAVE_GETSERVBYPORT
- PHP_FE(getservbyport, arginfo_getservbyport)
- #endif
- #if HAVE_GETPROTOBYNAME
- PHP_FE(getprotobyname, arginfo_getprotobyname)
- #endif
- #if HAVE_GETPROTOBYNUMBER
- PHP_FE(getprotobynumber, arginfo_getprotobynumber)
- #endif
- PHP_FE(getmyuid, arginfo_getmyuid)
- PHP_FE(getmygid, arginfo_getmygid)
- PHP_FE(getmypid, arginfo_getmypid)
- PHP_FE(getmyinode, arginfo_getmyinode)
- PHP_FE(getlastmod, arginfo_getlastmod)
- PHP_FE(base64_decode, arginfo_base64_decode)
- PHP_FE(base64_encode, arginfo_base64_encode)
- PHP_FE(password_hash, arginfo_password_hash)
- PHP_FE(password_get_info, arginfo_password_get_info)
- PHP_FE(password_needs_rehash, arginfo_password_needs_rehash)
- PHP_FE(password_verify, arginfo_password_verify)
- PHP_FE(convert_uuencode, arginfo_convert_uuencode)
- PHP_FE(convert_uudecode, arginfo_convert_uudecode)
- PHP_FE(abs, arginfo_abs)
- PHP_FE(ceil, arginfo_ceil)
- PHP_FE(floor, arginfo_floor)
- PHP_FE(round, arginfo_round)
- PHP_FE(sin, arginfo_sin)
- PHP_FE(cos, arginfo_cos)
- PHP_FE(tan, arginfo_tan)
- PHP_FE(asin, arginfo_asin)
- PHP_FE(acos, arginfo_acos)
- PHP_FE(atan, arginfo_atan)
- PHP_FE(atanh, arginfo_atanh)
- PHP_FE(atan2, arginfo_atan2)
- PHP_FE(sinh, arginfo_sinh)
- PHP_FE(cosh, arginfo_cosh)
- PHP_FE(tanh, arginfo_tanh)
- PHP_FE(asinh, arginfo_asinh)
- PHP_FE(acosh, arginfo_acosh)
- PHP_FE(expm1, arginfo_expm1)
- PHP_FE(log1p, arginfo_log1p)
- PHP_FE(pi, arginfo_pi)
- PHP_FE(is_finite, arginfo_is_finite)
- PHP_FE(is_nan, arginfo_is_nan)
- PHP_FE(is_infinite, arginfo_is_infinite)
- PHP_FE(pow, arginfo_pow)
- PHP_FE(exp, arginfo_exp)
- PHP_FE(log, arginfo_log)
- PHP_FE(log10, arginfo_log10)
- PHP_FE(sqrt, arginfo_sqrt)
- PHP_FE(hypot, arginfo_hypot)
- PHP_FE(deg2rad, arginfo_deg2rad)
- PHP_FE(rad2deg, arginfo_rad2deg)
- PHP_FE(bindec, arginfo_bindec)
- PHP_FE(hexdec, arginfo_hexdec)
- PHP_FE(octdec, arginfo_octdec)
- PHP_FE(decbin, arginfo_decbin)
- PHP_FE(decoct, arginfo_decoct)
- PHP_FE(dechex, arginfo_dechex)
- PHP_FE(base_convert, arginfo_base_convert)
- PHP_FE(number_format, arginfo_number_format)
- PHP_FE(fmod, arginfo_fmod)
- #ifdef HAVE_INET_NTOP
- PHP_RAW_NAMED_FE(inet_ntop, php_inet_ntop, arginfo_inet_ntop)
- #endif
- #ifdef HAVE_INET_PTON
- PHP_RAW_NAMED_FE(inet_pton, php_inet_pton, arginfo_inet_pton)
- #endif
- PHP_FE(ip2long, arginfo_ip2long)
- PHP_FE(long2ip, arginfo_long2ip)
- PHP_FE(getenv, arginfo_getenv)
- #ifdef HAVE_PUTENV
- PHP_FE(putenv, arginfo_putenv)
- #endif
- PHP_FE(getopt, arginfo_getopt)
- #ifdef HAVE_GETLOADAVG
- PHP_FE(sys_getloadavg, arginfo_sys_getloadavg)
- #endif
- #ifdef HAVE_GETTIMEOFDAY
- PHP_FE(microtime, arginfo_microtime)
- PHP_FE(gettimeofday, arginfo_gettimeofday)
- #endif
- #ifdef HAVE_GETRUSAGE
- PHP_FE(getrusage, arginfo_getrusage)
- #endif
- #ifdef HAVE_GETTIMEOFDAY
- PHP_FE(uniqid, arginfo_uniqid)
- #endif
- PHP_FE(quoted_printable_decode, arginfo_quoted_printable_decode)
- PHP_FE(quoted_printable_encode, arginfo_quoted_printable_encode)
- PHP_FE(convert_cyr_string, arginfo_convert_cyr_string)
- PHP_FE(get_current_user, arginfo_get_current_user)
- PHP_FE(set_time_limit, arginfo_set_time_limit)
- PHP_FE(header_register_callback, arginfo_header_register_callback)
- PHP_FE(get_cfg_var, arginfo_get_cfg_var)
- PHP_DEP_FALIAS(magic_quotes_runtime, set_magic_quotes_runtime, arginfo_set_magic_quotes_runtime)
- PHP_DEP_FE(set_magic_quotes_runtime, arginfo_set_magic_quotes_runtime)
- PHP_FE(get_magic_quotes_gpc, arginfo_get_magic_quotes_gpc)
- PHP_FE(get_magic_quotes_runtime, arginfo_get_magic_quotes_runtime)
- PHP_FE(error_log, arginfo_error_log)
- PHP_FE(error_get_last, arginfo_error_get_last)
- PHP_FE(call_user_func, arginfo_call_user_func)
- PHP_FE(call_user_func_array, arginfo_call_user_func_array)
- PHP_DEP_FE(call_user_method, arginfo_call_user_method)
- PHP_DEP_FE(call_user_method_array, arginfo_call_user_method_array)
- PHP_FE(forward_static_call, arginfo_forward_static_call)
- PHP_FE(forward_static_call_array, arginfo_forward_static_call_array)
- PHP_FE(serialize, arginfo_serialize)
- PHP_FE(unserialize, arginfo_unserialize)
- PHP_FE(var_dump, arginfo_var_dump)
- PHP_FE(var_export, arginfo_var_export)
- PHP_FE(debug_zval_dump, arginfo_debug_zval_dump)
- PHP_FE(print_r, arginfo_print_r)
- PHP_FE(memory_get_usage, arginfo_memory_get_usage)
- PHP_FE(memory_get_peak_usage, arginfo_memory_get_peak_usage)
- PHP_FE(register_shutdown_function, arginfo_register_shutdown_function)
- PHP_FE(register_tick_function, arginfo_register_tick_function)
- PHP_FE(unregister_tick_function, arginfo_unregister_tick_function)
- PHP_FE(highlight_file, arginfo_highlight_file)
- PHP_FALIAS(show_source, highlight_file, arginfo_highlight_file)
- PHP_FE(highlight_string, arginfo_highlight_string)
- PHP_FE(php_strip_whitespace, arginfo_php_strip_whitespace)
- PHP_FE(ini_get, arginfo_ini_get)
- PHP_FE(ini_get_all, arginfo_ini_get_all)
- PHP_FE(ini_set, arginfo_ini_set)
- PHP_FALIAS(ini_alter, ini_set, arginfo_ini_set)
- PHP_FE(ini_restore, arginfo_ini_restore)
- PHP_FE(get_include_path, arginfo_get_include_path)
- PHP_FE(set_include_path, arginfo_set_include_path)
- PHP_FE(restore_include_path, arginfo_restore_include_path)
- PHP_FE(setcookie, arginfo_setcookie)
- PHP_FE(setrawcookie, arginfo_setrawcookie)
- PHP_FE(header, arginfo_header)
- PHP_FE(header_remove, arginfo_header_remove)
- PHP_FE(headers_sent, arginfo_headers_sent)
- PHP_FE(headers_list, arginfo_headers_list)
- PHP_FE(http_response_code, arginfo_http_response_code)
- PHP_FE(connection_aborted, arginfo_connection_aborted)
- PHP_FE(connection_status, arginfo_connection_status)
- PHP_FE(ignore_user_abort, arginfo_ignore_user_abort)
- PHP_FE(parse_ini_file, arginfo_parse_ini_file)
- PHP_FE(parse_ini_string, arginfo_parse_ini_string)
- #if ZEND_DEBUG
- PHP_FE(config_get_hash, arginfo_config_get_hash)
- #endif
- PHP_FE(is_uploaded_file, arginfo_is_uploaded_file)
- PHP_FE(move_uploaded_file, arginfo_move_uploaded_file)
- /* functions from dns.c */
- PHP_FE(gethostbyaddr, arginfo_gethostbyaddr)
- PHP_FE(gethostbyname, arginfo_gethostbyname)
- PHP_FE(gethostbynamel, arginfo_gethostbynamel)
- #ifdef HAVE_GETHOSTNAME
- PHP_FE(gethostname, arginfo_gethostname)
- #endif
- #if defined(PHP_WIN32) || (HAVE_DNS_SEARCH_FUNC && !(defined(__BEOS__) || defined(NETWARE)))
- PHP_FE(dns_check_record, arginfo_dns_check_record)
- PHP_FALIAS(checkdnsrr, dns_check_record, arginfo_dns_check_record)
- # if defined(PHP_WIN32) || HAVE_FULL_DNS_FUNCS
- PHP_FE(dns_get_mx, arginfo_dns_get_mx)
- PHP_FALIAS(getmxrr, dns_get_mx, arginfo_dns_get_mx)
- PHP_FE(dns_get_record, arginfo_dns_get_record)
- # endif
- #endif
- /* functions from type.c */
- PHP_FE(intval, arginfo_intval)
- PHP_FE(floatval, arginfo_floatval)
- PHP_FALIAS(doubleval, floatval, arginfo_floatval)
- PHP_FE(strval, arginfo_strval)
- PHP_FE(boolval, arginfo_boolval)
- PHP_FE(gettype, arginfo_gettype)
- PHP_FE(settype, arginfo_settype)
- PHP_FE(is_null, arginfo_is_null)
- PHP_FE(is_resource, arginfo_is_resource)
- PHP_FE(is_bool, arginfo_is_bool)
- PHP_FE(is_long, arginfo_is_long)
- PHP_FE(is_float, arginfo_is_float)
- PHP_FALIAS(is_int, is_long, arginfo_is_long)
- PHP_FALIAS(is_integer, is_long, arginfo_is_long)
- PHP_FALIAS(is_double, is_float, arginfo_is_float)
- PHP_FALIAS(is_real, is_float, arginfo_is_float)
- PHP_FE(is_numeric, arginfo_is_numeric)
- PHP_FE(is_string, arginfo_is_string)
- PHP_FE(is_array, arginfo_is_array)
- PHP_FE(is_object, arginfo_is_object)
- PHP_FE(is_scalar, arginfo_is_scalar)
- PHP_FE(is_callable, arginfo_is_callable)
- /* functions from file.c */
- PHP_FE(pclose, arginfo_pclose)
- PHP_FE(popen, arginfo_popen)
- PHP_FE(readfile, arginfo_readfile)
- PHP_FE(rewind, arginfo_rewind)
- PHP_FE(rmdir, arginfo_rmdir)
- PHP_FE(umask, arginfo_umask)
- PHP_FE(fclose, arginfo_fclose)
- PHP_FE(feof, arginfo_feof)
- PHP_FE(fgetc, arginfo_fgetc)
- PHP_FE(fgets, arginfo_fgets)
- PHP_FE(fgetss, arginfo_fgetss)
- PHP_FE(fread, arginfo_fread)
- PHP_NAMED_FE(fopen, php_if_fopen, arginfo_fopen)
- PHP_FE(fpassthru, arginfo_fpassthru)
- PHP_NAMED_FE(ftruncate, php_if_ftruncate, arginfo_ftruncate)
- PHP_NAMED_FE(fstat, php_if_fstat, arginfo_fstat)
- PHP_FE(fseek, arginfo_fseek)
- PHP_FE(ftell, arginfo_ftell)
- PHP_FE(fflush, arginfo_fflush)
- PHP_FE(fwrite, arginfo_fwrite)
- PHP_FALIAS(fputs, fwrite, arginfo_fwrite)
- PHP_FE(mkdir, arginfo_mkdir)
- PHP_FE(rename, arginfo_rename)
- PHP_FE(copy, arginfo_copy)
- PHP_FE(tempnam, arginfo_tempnam)
- PHP_NAMED_FE(tmpfile, php_if_tmpfile, arginfo_tmpfile)
- PHP_FE(file, arginfo_file)
- PHP_FE(file_get_contents, arginfo_file_get_contents)
- PHP_FE(file_put_contents, arginfo_file_put_contents)
- PHP_FE(stream_select, arginfo_stream_select)
- PHP_FE(stream_context_create, arginfo_stream_context_create)
- PHP_FE(stream_context_set_params, arginfo_stream_context_set_params)
- PHP_FE(stream_context_get_params, arginfo_stream_context_get_params)
- PHP_FE(stream_context_set_option, arginfo_stream_context_set_option)
- PHP_FE(stream_context_get_options, arginfo_stream_context_get_options)
- PHP_FE(stream_context_get_default, arginfo_stream_context_get_default)
- PHP_FE(stream_context_set_default, arginfo_stream_context_set_default)
- PHP_FE(stream_filter_prepend, arginfo_stream_filter_prepend)
- PHP_FE(stream_filter_append, arginfo_stream_filter_append)
- PHP_FE(stream_filter_remove, arginfo_stream_filter_remove)
- PHP_FE(stream_socket_client, arginfo_stream_socket_client)
- PHP_FE(stream_socket_server, arginfo_stream_socket_server)
- PHP_FE(stream_socket_accept, arginfo_stream_socket_accept)
- PHP_FE(stream_socket_get_name, arginfo_stream_socket_get_name)
- PHP_FE(stream_socket_recvfrom, arginfo_stream_socket_recvfrom)
- PHP_FE(stream_socket_sendto, arginfo_stream_socket_sendto)
- PHP_FE(stream_socket_enable_crypto, arginfo_stream_socket_enable_crypto)
- #ifdef HAVE_SHUTDOWN
- PHP_FE(stream_socket_shutdown, arginfo_stream_socket_shutdown)
- #endif
- #if HAVE_SOCKETPAIR
- PHP_FE(stream_socket_pair, arginfo_stream_socket_pair)
- #endif
- PHP_FE(stream_copy_to_stream, arginfo_stream_copy_to_stream)
- PHP_FE(stream_get_contents, arginfo_stream_get_contents)
- PHP_FE(stream_supports_lock, arginfo_stream_supports_lock)
- PHP_FE(fgetcsv, arginfo_fgetcsv)
- PHP_FE(fputcsv, arginfo_fputcsv)
- PHP_FE(flock, arginfo_flock)
- PHP_FE(get_meta_tags, arginfo_get_meta_tags)
- PHP_FE(stream_set_read_buffer, arginfo_stream_set_read_buffer)
- PHP_FE(stream_set_write_buffer, arginfo_stream_set_write_buffer)
- PHP_FALIAS(set_file_buffer, stream_set_write_buffer, arginfo_stream_set_write_buffer)
- PHP_FE(stream_set_chunk_size, arginfo_stream_set_chunk_size)
- PHP_DEP_FALIAS(set_socket_blocking, stream_set_blocking, arginfo_stream_set_blocking)
- PHP_FE(stream_set_blocking, arginfo_stream_set_blocking)
- PHP_FALIAS(socket_set_blocking, stream_set_blocking, arginfo_stream_set_blocking)
- PHP_FE(stream_get_meta_data, arginfo_stream_get_meta_data)
- PHP_FE(stream_get_line, arginfo_stream_get_line)
- PHP_FE(stream_wrapper_register, arginfo_stream_wrapper_register)
- PHP_FALIAS(stream_register_wrapper, stream_wrapper_register, arginfo_stream_wrapper_register)
- PHP_FE(stream_wrapper_unregister, arginfo_stream_wrapper_unregister)
- PHP_FE(stream_wrapper_restore, arginfo_stream_wrapper_restore)
- PHP_FE(stream_get_wrappers, arginfo_stream_get_wrappers)
- PHP_FE(stream_get_transports, arginfo_stream_get_transports)
- PHP_FE(stream_resolve_include_path, arginfo_stream_resolve_include_path)
- PHP_FE(stream_is_local, arginfo_stream_is_local)
- PHP_FE(get_headers, arginfo_get_headers)
- #if HAVE_SYS_TIME_H || defined(PHP_WIN32)
- PHP_FE(stream_set_timeout, arginfo_stream_set_timeout)
- PHP_FALIAS(socket_set_timeout, stream_set_timeout, arginfo_stream_set_timeout)
- #endif
- PHP_FALIAS(socket_get_status, stream_get_meta_data, arginfo_stream_get_meta_data)
- #if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
- PHP_FE(realpath, arginfo_realpath)
- #endif
- #ifdef HAVE_FNMATCH
- PHP_FE(fnmatch, arginfo_fnmatch)
- #endif
- /* functions from fsock.c */
- PHP_FE(fsockopen, arginfo_fsockopen)
- PHP_FE(pfsockopen, arginfo_pfsockopen)
- /* functions from pack.c */
- PHP_FE(pack, arginfo_pack)
- PHP_FE(unpack, arginfo_unpack)
- /* functions from browscap.c */
- PHP_FE(get_browser, arginfo_get_browser)
- #if HAVE_CRYPT
- /* functions from crypt.c */
- PHP_FE(crypt, arginfo_crypt)
- #endif
- /* functions from dir.c */
- PHP_FE(opendir, arginfo_opendir)
- PHP_FE(closedir, arginfo_closedir)
- PHP_FE(chdir, arginfo_chdir)
- #if defined(HAVE_CHROOT) && !defined(ZTS) && ENABLE_CHROOT_FUNC
- PHP_FE(chroot, arginfo_chroot)
- #endif
- PHP_FE(getcwd, arginfo_getcwd)
- PHP_FE(rewinddir, arginfo_rewinddir)
- PHP_NAMED_FE(readdir, php_if_readdir, arginfo_readdir)
- PHP_FALIAS(dir, getdir, arginfo_dir)
- PHP_FE(scandir, arginfo_scandir)
- #ifdef HAVE_GLOB
- PHP_FE(glob, arginfo_glob)
- #endif
- /* functions from filestat.c */
- PHP_FE(fileatime, arginfo_fileatime)
- PHP_FE(filectime, arginfo_filectime)
- PHP_FE(filegroup, arginfo_filegroup)
- PHP_FE(fileinode, arginfo_fileinode)
- PHP_FE(filemtime, arginfo_filemtime)
- PHP_FE(fileowner, arginfo_fileowner)
- PHP_FE(fileperms, arginfo_fileperms)
- PHP_FE(filesize, arginfo_filesize)
- PHP_FE(filetype, arginfo_filetype)
- PHP_FE(file_exists, arginfo_file_exists)
- PHP_FE(is_writable, arginfo_is_writable)
- PHP_FALIAS(is_writeable, is_writable, arginfo_is_writable)
- PHP_FE(is_readable, arginfo_is_readable)
- PHP_FE(is_executable, arginfo_is_executable)
- PHP_FE(is_file, arginfo_is_file)
- PHP_FE(is_dir, arginfo_is_dir)
- PHP_FE(is_link, arginfo_is_link)
- PHP_NAMED_FE(stat, php_if_stat, arginfo_stat)
- PHP_NAMED_FE(lstat, php_if_lstat, arginfo_lstat)
- #ifndef NETWARE
- PHP_FE(chown, arginfo_chown)
- PHP_FE(chgrp, arginfo_chgrp)
- #endif
- #if HAVE_LCHOWN
- PHP_FE(lchown, arginfo_lchown)
- #endif
- #if HAVE_LCHOWN
- PHP_FE(lchgrp, arginfo_lchgrp)
- #endif
- PHP_FE(chmod, arginfo_chmod)
- #if HAVE_UTIME
- PHP_FE(touch, arginfo_touch)
- #endif
- PHP_FE(clearstatcache, arginfo_clearstatcache)
- PHP_FE(disk_total_space, arginfo_disk_total_space)
- PHP_FE(disk_free_space, arginfo_disk_free_space)
- PHP_FALIAS(diskfreespace, disk_free_space, arginfo_disk_free_space)
- PHP_FE(realpath_cache_size, arginfo_realpath_cache_size)
- PHP_FE(realpath_cache_get, arginfo_realpath_cache_get)
- /* functions from mail.c */
- PHP_FE(mail, arginfo_mail)
- PHP_FE(ezmlm_hash, arginfo_ezmlm_hash)
- /* functions from syslog.c */
- #ifdef HAVE_SYSLOG_H
- PHP_FE(openlog, arginfo_openlog)
- PHP_FE(syslog, arginfo_syslog)
- PHP_FE(closelog, arginfo_closelog)
- #endif
- /* functions from lcg.c */
- PHP_FE(lcg_value, arginfo_lcg_value)
- /* functions from metaphone.c */
- PHP_FE(metaphone, arginfo_metaphone)
- /* functions from output.c */
- PHP_FE(ob_start, arginfo_ob_start)
- PHP_FE(ob_flush, arginfo_ob_flush)
- PHP_FE(ob_clean, arginfo_ob_clean)
- PHP_FE(ob_end_flush, arginfo_ob_end_flush)
- PHP_FE(ob_end_clean, arginfo_ob_end_clean)
- PHP_FE(ob_get_flush, arginfo_ob_get_flush)
- PHP_FE(ob_get_clean, arginfo_ob_get_clean)
- PHP_FE(ob_get_length, arginfo_ob_get_length)
- PHP_FE(ob_get_level, arginfo_ob_get_level)
- PHP_FE(ob_get_status, arginfo_ob_get_status)
- PHP_FE(ob_get_contents, arginfo_ob_get_contents)
- PHP_FE(ob_implicit_flush, arginfo_ob_implicit_flush)
- PHP_FE(ob_list_handlers, arginfo_ob_list_handlers)
- /* functions from array.c */
- PHP_FE(ksort, arginfo_ksort)
- PHP_FE(krsort, arginfo_krsort)
- PHP_FE(natsort, arginfo_natsort)
- PHP_FE(natcasesort, arginfo_natcasesort)
- PHP_FE(asort, arginfo_asort)
- PHP_FE(arsort, arginfo_arsort)
- PHP_FE(sort, arginfo_sort)
- PHP_FE(rsort, arginfo_rsort)
- PHP_FE(usort, arginfo_usort)
- PHP_FE(uasort, arginfo_uasort)
- PHP_FE(uksort, arginfo_uksort)
- PHP_FE(shuffle, arginfo_shuffle)
- PHP_FE(array_walk, arginfo_array_walk)
- PHP_FE(array_walk_recursive, arginfo_array_walk_recursive)
- PHP_FE(count, arginfo_count)
- PHP_FE(end, arginfo_end)
- PHP_FE(prev, arginfo_prev)
- PHP_FE(next, arginfo_next)
- PHP_FE(reset, arginfo_reset)
- PHP_FE(current, arginfo_current)
- PHP_FE(key, arginfo_key)
- PHP_FE(min, arginfo_min)
- PHP_FE(max, arginfo_max)
- PHP_FE(in_array, arginfo_in_array)
- PHP_FE(array_search, arginfo_array_search)
- PHP_FE(extract, arginfo_extract)
- PHP_FE(compact, arginfo_compact)
- PHP_FE(array_fill, arginfo_array_fill)
- PHP_FE(array_fill_keys, arginfo_array_fill_keys)
- PHP_FE(range, arginfo_range)
- PHP_FE(array_multisort, arginfo_array_multisort)
- PHP_FE(array_push, arginfo_array_push)
- PHP_FE(array_pop, arginfo_array_pop)
- PHP_FE(array_shift, arginfo_array_shift)
- PHP_FE(array_unshift, arginfo_array_unshift)
- PHP_FE(array_splice, arginfo_array_splice)
- PHP_FE(array_slice, arginfo_array_slice)
- PHP_FE(array_merge, arginfo_array_merge)
- PHP_FE(array_merge_recursive, arginfo_array_merge_recursive)
- PHP_FE(array_replace, arginfo_array_replace)
- PHP_FE(array_replace_recursive, arginfo_array_replace_recursive)
- PHP_FE(array_keys, arginfo_array_keys)
- PHP_FE(array_values, arginfo_array_values)
- PHP_FE(array_count_values, arginfo_array_count_values)
- PHP_FE(array_column, arginfo_array_column)
- PHP_FE(array_reverse, arginfo_array_reverse)
- PHP_FE(array_reduce, arginfo_array_reduce)
- PHP_FE(array_pad, arginfo_array_pad)
- PHP_FE(array_flip, arginfo_array_flip)
- PHP_FE(array_change_key_case, arginfo_array_change_key_case)
- PHP_FE(array_rand, arginfo_array_rand)
- PHP_FE(array_unique, arginfo_array_unique)
- PHP_FE(array_intersect, arginfo_array_intersect)
- PHP_FE(array_intersect_key, arginfo_array_intersect_key)
- PHP_FE(array_intersect_ukey, arginfo_array_intersect_ukey)
- PHP_FE(array_uintersect, arginfo_array_uintersect)
- PHP_FE(array_intersect_assoc, arginfo_array_intersect_assoc)
- PHP_FE(array_uintersect_assoc, arginfo_array_uintersect_assoc)
- PHP_FE(array_intersect_uassoc, arginfo_array_intersect_uassoc)
- PHP_FE(array_uintersect_uassoc, arginfo_array_uintersect_uassoc)
- PHP_FE(array_diff, arginfo_array_diff)
- PHP_FE(array_diff_key, arginfo_array_diff_key)
- PHP_FE(array_diff_ukey, arginfo_array_diff_ukey)
- PHP_FE(array_udiff, arginfo_array_udiff)
- PHP_FE(array_diff_assoc, arginfo_array_diff_assoc)
- PHP_FE(array_udiff_assoc, arginfo_array_udiff_assoc)
- PHP_FE(array_diff_uassoc, arginfo_array_diff_uassoc)
- PHP_FE(array_udiff_uassoc, arginfo_array_udiff_uassoc)
- PHP_FE(array_sum, arginfo_array_sum)
- PHP_FE(array_product, arginfo_array_product)
- PHP_FE(array_filter, arginfo_array_filter)
- PHP_FE(array_map, arginfo_array_map)
- PHP_FE(array_chunk, arginfo_array_chunk)
- PHP_FE(array_combine, arginfo_array_combine)
- PHP_FE(array_key_exists, arginfo_array_key_exists)
- /* aliases from array.c */
- PHP_FALIAS(pos, current, arginfo_current)
- PHP_FALIAS(sizeof, count, arginfo_count)
- PHP_FALIAS(key_exists, array_key_exists, arginfo_array_key_exists)
- /* functions from assert.c */
- PHP_FE(assert, arginfo_assert)
- PHP_FE(assert_options, arginfo_assert_options)
- /* functions from versioning.c */
- PHP_FE(version_compare, arginfo_version_compare)
- /* functions from ftok.c*/
- #if HAVE_FTOK
- PHP_FE(ftok, arginfo_ftok)
- #endif
- PHP_FE(str_rot13, arginfo_str_rot13)
- PHP_FE(stream_get_filters, arginfo_stream_get_filters)
- PHP_FE(stream_filter_register, arginfo_stream_filter_register)
- PHP_FE(stream_bucket_make_writeable, arginfo_stream_bucket_make_writeable)
- PHP_FE(stream_bucket_prepend, arginfo_stream_bucket_prepend)
- PHP_FE(stream_bucket_append, arginfo_stream_bucket_append)
- PHP_FE(stream_bucket_new, arginfo_stream_bucket_new)
- PHP_FE(output_add_rewrite_var, arginfo_output_add_rewrite_var)
- PHP_FE(output_reset_rewrite_vars, arginfo_output_reset_rewrite_vars)
- PHP_FE(sys_get_temp_dir, arginfo_sys_get_temp_dir)
- PHP_FE_END
- };
- /* }}} */
- static const zend_module_dep standard_deps[] = { /* {{{ */
- ZEND_MOD_OPTIONAL("session")
- ZEND_MOD_END
- };
- /* }}} */
- zend_module_entry basic_functions_module = { /* {{{ */
- STANDARD_MODULE_HEADER_EX,
- NULL,
- standard_deps,
- "standard", /* extension name */
- basic_functions, /* function list */
- PHP_MINIT(basic), /* process startup */
- PHP_MSHUTDOWN(basic), /* process shutdown */
- PHP_RINIT(basic), /* request startup */
- PHP_RSHUTDOWN(basic), /* request shutdown */
- PHP_MINFO(basic), /* extension info */
- PHP_VERSION, /* extension version */
- STANDARD_MODULE_PROPERTIES
- };
- /* }}} */
- #if defined(HAVE_PUTENV)
- static void php_putenv_destructor(putenv_entry *pe) /* {{{ */
- {
- if (pe->previous_value) {
- #if _MSC_VER >= 1300
- /* VS.Net has a bug in putenv() when setting a variable that
- * is already set; if the SetEnvironmentVariable() API call
- * fails, the Crt will double free() a string.
- * We try to avoid this by setting our own value first */
- SetEnvironmentVariable(pe->key, "bugbug");
- #endif
- putenv(pe->previous_value);
- # if defined(PHP_WIN32)
- efree(pe->previous_value);
- # endif
- } else {
- # if HAVE_UNSETENV
- unsetenv(pe->key);
- # elif defined(PHP_WIN32)
- SetEnvironmentVariable(pe->key, NULL);
- # ifndef ZTS
- _putenv_s(pe->key, "");
- # endif
- # else
- char **env;
- for (env = environ; env != NULL && *env != NULL; env++) {
- if (!strncmp(*env, pe->key, pe->key_len) && (*env)[pe->key_len] == '=') { /* found it */
- *env = "";
- break;
- }
- }
- # endif
- }
- #ifdef HAVE_TZSET
- /* don't forget to reset the various libc globals that
- * we might have changed by an earlier call to tzset(). */
- if (!strncmp(pe->key, "TZ", pe->key_len)) {
- tzset();
- }
- #endif
- efree(pe->putenv_string);
- efree(pe->key);
- }
- /* }}} */
- #endif
- static void basic_globals_ctor(php_basic_globals *basic_globals_p TSRMLS_DC) /* {{{ */
- {
- BG(rand_is_seeded) = 0;
- BG(mt_rand_is_seeded) = 0;
- BG(umask) = -1;
- BG(next) = NULL;
- BG(left) = -1;
- BG(user_tick_functions) = NULL;
- BG(user_filter_map) = NULL;
- BG(serialize_lock) = 0;
- memset(&BG(serialize), 0, sizeof(BG(serialize)));
- memset(&BG(unserialize), 0, sizeof(BG(unserialize)));
- memset(&BG(url_adapt_state_ex), 0, sizeof(BG(url_adapt_state_ex)));
- #if defined(_REENTRANT) && defined(HAVE_MBRLEN) && defined(HAVE_MBSTATE_T)
- memset(&BG(mblen_state), 0, sizeof(BG(mblen_state)));
- #endif
- BG(incomplete_class) = incomplete_class_entry;
- BG(page_uid) = -1;
- BG(page_gid) = -1;
- }
- /* }}} */
- static void basic_globals_dtor(php_basic_globals *basic_globals_p TSRMLS_DC) /* {{{ */
- {
- if (BG(url_adapt_state_ex).tags) {
- zend_hash_destroy(BG(url_adapt_state_ex).tags);
- free(BG(url_adapt_state_ex).tags);
- }
- }
- /* }}} */
- #define PHP_DOUBLE_INFINITY_HIGH 0x7ff00000
- #define PHP_DOUBLE_QUIET_NAN_HIGH 0xfff80000
- PHPAPI double php_get_nan(void) /* {{{ */
- {
- #if HAVE_HUGE_VAL_NAN
- return HUGE_VAL + -HUGE_VAL;
- #elif defined(__i386__) || defined(_X86_) || defined(ALPHA) || defined(_ALPHA) || defined(__alpha)
- double val = 0.0;
- ((php_uint32*)&val)[1] = PHP_DOUBLE_QUIET_NAN_HIGH;
- ((php_uint32*)&val)[0] = 0;
- return val;
- #elif HAVE_ATOF_ACCEPTS_NAN
- return atof("NAN");
- #else
- return 0.0/0.0;
- #endif
- }
- /* }}} */
- PHPAPI double php_get_inf(void) /* {{{ */
- {
- #if HAVE_HUGE_VAL_INF
- return HUGE_VAL;
- #elif defined(__i386__) || defined(_X86_) || defined(ALPHA) || defined(_ALPHA) || defined(__alpha)
- double val = 0.0;
- ((php_uint32*)&val)[1] = PHP_DOUBLE_INFINITY_HIGH;
- ((php_uint32*)&val)[0] = 0;
- return val;
- #elif HAVE_ATOF_ACCEPTS_INF
- return atof("INF");
- #else
- return 1.0/0.0;
- #endif
- }
- /* }}} */
- #define BASIC_MINIT_SUBMODULE(module) \
- if (PHP_MINIT(module)(INIT_FUNC_ARGS_PASSTHRU) == SUCCESS) {\
- BASIC_ADD_SUBMODULE(module); \
- }
- #define BASIC_ADD_SUBMODULE(module) \
- zend_hash_add_empty_element(&basic_submodules, #module, strlen(#module));
- #define BASIC_RINIT_SUBMODULE(module) \
- if (zend_hash_exists(&basic_submodules, #module, strlen(#module))) { \
- PHP_RINIT(module)(INIT_FUNC_ARGS_PASSTHRU); \
- }
- #define BASIC_MINFO_SUBMODULE(module) \
- if (zend_hash_exists(&basic_submodules, #module, strlen(#module))) { \
- PHP_MINFO(module)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU); \
- }
- #define BASIC_RSHUTDOWN_SUBMODULE(module) \
- if (zend_hash_exists(&basic_submodules, #module, strlen(#module))) { \
- PHP_RSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS_PASSTHRU); \
- }
- #define BASIC_MSHUTDOWN_SUBMODULE(module) \
- if (zend_hash_exists(&basic_submodules, #module, strlen(#module))) { \
- PHP_MSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS_PASSTHRU); \
- }
- PHP_MINIT_FUNCTION(basic) /* {{{ */
- {
- #ifdef ZTS
- ts_allocate_id(&basic_globals_id, sizeof(php_basic_globals), (ts_allocate_ctor) basic_globals_ctor, (ts_allocate_dtor) basic_globals_dtor);
- #ifdef PHP_WIN32
- ts_allocate_id(&php_win32_core_globals_id, sizeof(php_win32_core_globals), (ts_allocate_ctor)php_win32_core_globals_ctor, (ts_allocate_dtor)php_win32_core_globals_dtor );
- #endif
- #else
- basic_globals_ctor(&basic_globals TSRMLS_CC);
- #ifdef PHP_WIN32
- php_win32_core_globals_ctor(&the_php_win32_core_globals TSRMLS_CC);
- #endif
- #endif
- zend_hash_init(&basic_submodules, 0, NULL, NULL, 1);
- BG(incomplete_class) = incomplete_class_entry = php_create_incomplete_class(TSRMLS_C);
- REGISTER_LONG_CONSTANT("CONNECTION_ABORTED", PHP_CONNECTION_ABORTED, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("CONNECTION_NORMAL", PHP_CONNECTION_NORMAL, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("CONNECTION_TIMEOUT", PHP_CONNECTION_TIMEOUT, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("INI_USER", ZEND_INI_USER, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("INI_PERDIR", ZEND_INI_PERDIR, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("INI_SYSTEM", ZEND_INI_SYSTEM, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("INI_ALL", ZEND_INI_ALL, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("INI_SCANNER_NORMAL", ZEND_INI_SCANNER_NORMAL, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("INI_SCANNER_RAW", ZEND_INI_SCANNER_RAW, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("INI_SCANNER_TYPED", ZEND_INI_SCANNER_TYPED, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("PHP_URL_SCHEME", PHP_URL_SCHEME, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("PHP_URL_HOST", PHP_URL_HOST, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("PHP_URL_PORT", PHP_URL_PORT, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("PHP_URL_USER", PHP_URL_USER, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("PHP_URL_PASS", PHP_URL_PASS, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("PHP_URL_PATH", PHP_URL_PATH, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("PHP_URL_QUERY", PHP_URL_QUERY, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("PHP_URL_FRAGMENT", PHP_URL_FRAGMENT, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("PHP_QUERY_RFC1738", PHP_QUERY_RFC1738, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("PHP_QUERY_RFC3986", PHP_QUERY_RFC3986, CONST_CS | CONST_PERSISTENT);
- #define REGISTER_MATH_CONSTANT(x) REGISTER_DOUBLE_CONSTANT(#x, x, CONST_CS | CONST_PERSISTENT)
- REGISTER_MATH_CONSTANT(M_E);
- REGISTER_MATH_CONSTANT(M_LOG2E);
- REGISTER_MATH_CONSTANT(M_LOG10E);
- REGISTER_MATH_CONSTANT(M_LN2);
- REGISTER_MATH_CONSTANT(M_LN10);
- REGISTER_MATH_CONSTANT(M_PI);
- REGISTER_MATH_CONSTANT(M_PI_2);
- REGISTER_MATH_CONSTANT(M_PI_4);
- REGISTER_MATH_CONSTANT(M_1_PI);
- REGISTER_MATH_CONSTANT(M_2_PI);
- REGISTER_MATH_CONSTANT(M_SQRTPI);
- REGISTER_MATH_CONSTANT(M_2_SQRTPI);
- REGISTER_MATH_CONSTANT(M_LNPI);
- REGISTER_MATH_CONSTANT(M_EULER);
- REGISTER_MATH_CONSTANT(M_SQRT2);
- REGISTER_MATH_CONSTANT(M_SQRT1_2);
- REGISTER_MATH_CONSTANT(M_SQRT3);
- REGISTER_DOUBLE_CONSTANT("INF", php_get_inf(), CONST_CS | CONST_PERSISTENT);
- REGISTER_DOUBLE_CONSTANT("NAN", php_get_nan(), CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_UP", PHP_ROUND_HALF_UP, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_DOWN", PHP_ROUND_HALF_DOWN, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_EVEN", PHP_ROUND_HALF_EVEN, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_ODD", PHP_ROUND_HALF_ODD, CONST_CS | CONST_PERSISTENT);
- #if ENABLE_TEST_CLASS
- test_class_startup();
- #endif
- register_phpinfo_constants(INIT_FUNC_ARGS_PASSTHRU);
- register_html_constants(INIT_FUNC_ARGS_PASSTHRU);
- register_string_constants(INIT_FUNC_ARGS_PASSTHRU);
- BASIC_ADD_SUBMODULE(dl)
- BASIC_ADD_SUBMODULE(mail)
- BASIC_ADD_SUBMODULE(streams)
- BASIC_MINIT_SUBMODULE(file)
- BASIC_MINIT_SUBMODULE(pack)
- BASIC_MINIT_SUBMODULE(browscap)
- BASIC_MINIT_SUBMODULE(standard_filters)
- BASIC_MINIT_SUBMODULE(user_filters)
- BASIC_MINIT_SUBMODULE(password)
- #if defined(HAVE_LOCALECONV) && defined(ZTS)
- BASIC_MINIT_SUBMODULE(localeconv)
- #endif
- #if defined(HAVE_NL_LANGINFO)
- BASIC_MINIT_SUBMODULE(nl_langinfo)
- #endif
- #if HAVE_CRYPT
- BASIC_MINIT_SUBMODULE(crypt)
- #endif
- BASIC_MINIT_SUBMODULE(lcg)
- BASIC_MINIT_SUBMODULE(dir)
- #ifdef HAVE_SYSLOG_H
- BASIC_MINIT_SUBMODULE(syslog)
- #endif
- BASIC_MINIT_SUBMODULE(array)
- BASIC_MINIT_SUBMODULE(assert)
- BASIC_MINIT_SUBMODULE(url_scanner_ex)
- #ifdef PHP_CAN_SUPPORT_PROC_OPEN
- BASIC_MINIT_SUBMODULE(proc_open)
- #endif
- BASIC_MINIT_SUBMODULE(exec)
- BASIC_MINIT_SUBMODULE(user_streams)
- BASIC_MINIT_SUBMODULE(imagetypes)
- php_register_url_stream_wrapper("php", &php_stream_php_wrapper TSRMLS_CC);
- php_register_url_stream_wrapper("file", &php_plain_files_wrapper TSRMLS_CC);
- #ifdef HAVE_GLOB
- php_register_url_stream_wrapper("glob", &php_glob_stream_wrapper TSRMLS_CC);
- #endif
- php_register_url_stream_wrapper("data", &php_stream_rfc2397_wrapper TSRMLS_CC);
- php_register_url_stream_wrapper("http", &php_stream_http_wrapper TSRMLS_CC);
- php_register_url_stream_wrapper("ftp", &php_stream_ftp_wrapper TSRMLS_CC);
- #if defined(PHP_WIN32) || (HAVE_DNS_SEARCH_FUNC && !(defined(__BEOS__) || defined(NETWARE)))
- # if defined(PHP_WIN32) || HAVE_FULL_DNS_FUNCS
- BASIC_MINIT_SUBMODULE(dns)
- # endif
- #endif
- return SUCCESS;
- }
- /* }}} */
- PHP_MSHUTDOWN_FUNCTION(basic) /* {{{ */
- {
- #ifdef HAVE_SYSLOG_H
- PHP_MSHUTDOWN(syslog)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
- #endif
- #ifdef ZTS
- ts_free_id(basic_globals_id);
- #ifdef PHP_WIN32
- ts_free_id(php_win32_core_globals_id);
- #endif
- #else
- basic_globals_dtor(&basic_globals TSRMLS_CC);
- #ifdef PHP_WIN32
- php_win32_core_globals_dtor(&the_php_win32_core_globals TSRMLS_CC);
- #endif
- #endif
- php_unregister_url_stream_wrapper("php" TSRMLS_CC);
- php_unregister_url_stream_wrapper("http" TSRMLS_CC);
- php_unregister_url_stream_wrapper("ftp" TSRMLS_CC);
- BASIC_MSHUTDOWN_SUBMODULE(browscap)
- BASIC_MSHUTDOWN_SUBMODULE(array)
- BASIC_MSHUTDOWN_SUBMODULE(assert)
- BASIC_MSHUTDOWN_SUBMODULE(url_scanner_ex)
- BASIC_MSHUTDOWN_SUBMODULE(file)
- BASIC_MSHUTDOWN_SUBMODULE(standard_filters)
- #if defined(HAVE_LOCALECONV) && defined(ZTS)
- BASIC_MSHUTDOWN_SUBMODULE(localeconv)
- #endif
- #if HAVE_CRYPT
- BASIC_MSHUTDOWN_SUBMODULE(crypt)
- #endif
- zend_hash_destroy(&basic_submodules);
- return SUCCESS;
- }
- /* }}} */
- PHP_RINIT_FUNCTION(basic) /* {{{ */
- {
- memset(BG(strtok_table), 0, 256);
- BG(serialize_lock) = 0;
- memset(&BG(serialize), 0, sizeof(BG(serialize)));
- memset(&BG(unserialize), 0, sizeof(BG(unserialize)));
- BG(strtok_string) = NULL;
- BG(strtok_zval) = NULL;
- BG(strtok_last) = NULL;
- BG(locale_string) = NULL;
- BG(array_walk_fci) = empty_fcall_info;
- BG(array_walk_fci_cache) = empty_fcall_info_cache;
- BG(user_compare_fci) = empty_fcall_info;
- BG(user_compare_fci_cache) = empty_fcall_info_cache;
- BG(page_uid) = -1;
- BG(page_gid) = -1;
- BG(page_inode) = -1;
- BG(page_mtime) = -1;
- #ifdef HAVE_PUTENV
- if (zend_hash_init(&BG(putenv_ht), 1, NULL, (void (*)(void *)) php_putenv_destructor, 0) == FAILURE) {
- return FAILURE;
- }
- #endif
- BG(user_shutdown_function_names) = NULL;
- PHP_RINIT(filestat)(INIT_FUNC_ARGS_PASSTHRU);
- #ifdef HAVE_SYSLOG_H
- BASIC_RINIT_SUBMODULE(syslog)
- #endif
- BASIC_RINIT_SUBMODULE(dir)
- BASIC_RINIT_SUBMODULE(url_scanner_ex)
- /* Setup default context */
- FG(default_context) = NULL;
- /* Default to global wrappers only */
- FG(stream_wrappers) = NULL;
- /* Default to global filters only */
- FG(stream_filters) = NULL;
- return SUCCESS;
- }
- /* }}} */
- PHP_RSHUTDOWN_FUNCTION(basic) /* {{{ */
- {
- if (BG(strtok_zval)) {
- zval_ptr_dtor(&BG(strtok_zval));
- }
- BG(strtok_string) = NULL;
- BG(strtok_zval) = NULL;
- #ifdef HAVE_PUTENV
- zend_hash_destroy(&BG(putenv_ht));
- #endif
- if (BG(umask) != -1) {
- umask(BG(umask));
- }
- /* Check if locale was changed and change it back
- * to the value in startup environment */
- if (BG(locale_string) != NULL) {
- setlocale(LC_ALL, "C");
- setlocale(LC_CTYPE, "");
- zend_update_current_locale();
- }
- STR_FREE(BG(locale_string));
- BG(locale_string) = NULL;
- /* FG(stream_wrappers) and FG(stream_filters) are destroyed
- * during php_request_shutdown() */
- PHP_RSHUTDOWN(filestat)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
- #ifdef HAVE_SYSLOG_H
- #ifdef PHP_WIN32
- BASIC_RSHUTDOWN_SUBMODULE(syslog)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
- #endif
- #endif
- BASIC_RSHUTDOWN_SUBMODULE(assert)
- BASIC_RSHUTDOWN_SUBMODULE(url_scanner_ex)
- BASIC_RSHUTDOWN_SUBMODULE(streams)
- #ifdef PHP_WIN32
- BASIC_RSHUTDOWN_SUBMODULE(win32_core_globals)
- #endif
- if (BG(user_tick_functions)) {
- zend_llist_destroy(BG(user_tick_functions));
- efree(BG(user_tick_functions));
- BG(user_tick_functions) = NULL;
- }
- BASIC_RSHUTDOWN_SUBMODULE(user_filters)
- BASIC_RSHUTDOWN_SUBMODULE(browscap)
- BG(page_uid) = -1;
- BG(page_gid) = -1;
- return SUCCESS;
- }
- /* }}} */
- PHP_MINFO_FUNCTION(basic) /* {{{ */
- {
- php_info_print_table_start();
- BASIC_MINFO_SUBMODULE(dl)
- BASIC_MINFO_SUBMODULE(mail)
- php_info_print_table_end();
- BASIC_MINFO_SUBMODULE(assert)
- }
- /* }}} */
- /* {{{ proto mixed constant(string const_name)
- Given the name of a constant this function will return the constant's associated value */
- PHP_FUNCTION(constant)
- {
- char *const_name;
- int const_name_len;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &const_name, &const_name_len) == FAILURE) {
- return;
- }
- if (!zend_get_constant_ex(const_name, const_name_len, return_value, NULL, ZEND_FETCH_CLASS_SILENT TSRMLS_CC)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't find constant %s", const_name);
- RETURN_NULL();
- }
- }
- /* }}} */
- #ifdef HAVE_INET_NTOP
- /* {{{ proto string inet_ntop(string in_addr)
- Converts a packed inet address to a human readable IP address string */
- PHP_NAMED_FUNCTION(php_inet_ntop)
- {
- char *address;
- int address_len, af = AF_INET;
- char buffer[40];
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &address, &address_len) == FAILURE) {
- RETURN_FALSE;
- }
- #ifdef HAVE_IPV6
- if (address_len == 16) {
- af = AF_INET6;
- } else
- #endif
- if (address_len != 4) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid in_addr value");
- RETURN_FALSE;
- }
- if (!inet_ntop(af, address, buffer, sizeof(buffer))) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "An unknown error occurred");
- RETURN_FALSE;
- }
- RETURN_STRING(buffer, 1);
- }
- /* }}} */
- #endif /* HAVE_INET_NTOP */
- #ifdef HAVE_INET_PTON
- /* {{{ proto string inet_pton(string ip_address)
- Converts a human readable IP address to a packed binary string */
- PHP_NAMED_FUNCTION(php_inet_pton)
- {
- int ret, af = AF_INET;
- char *address;
- int address_len;
- char buffer[17];
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &address, &address_len) == FAILURE) {
- RETURN_FALSE;
- }
- memset(buffer, 0, sizeof(buffer));
- #ifdef HAVE_IPV6
- if (strchr(address, ':')) {
- af = AF_INET6;
- } else
- #endif
- if (!strchr(address, '.')) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unrecognized address %s", address);
- RETURN_FALSE;
- }
- ret = inet_pton(af, address, buffer);
- if (ret <= 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unrecognized address %s", address);
- RETURN_FALSE;
- }
- RETURN_STRINGL(buffer, af == AF_INET ? 4 : 16, 1);
- }
- /* }}} */
- #endif /* HAVE_INET_PTON */
- /* {{{ proto int ip2long(string ip_address)
- Converts a string containing an (IPv4) Internet Protocol dotted address into a proper address */
- PHP_FUNCTION(ip2long)
- {
- char *addr;
- int addr_len;
- #ifdef HAVE_INET_PTON
- struct in_addr ip;
- #else
- unsigned long int ip;
- #endif
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &addr, &addr_len) == FAILURE) {
- return;
- }
- #ifdef HAVE_INET_PTON
- if (addr_len == 0 || inet_pton(AF_INET, addr, &ip) != 1) {
- RETURN_FALSE;
- }
- RETURN_LONG(ntohl(ip.s_addr));
- #else
- if (addr_len == 0 || (ip = inet_addr(addr)) == INADDR_NONE) {
- /* The only special case when we should return -1 ourselves,
- * because inet_addr() considers it wrong. We return 0xFFFFFFFF and
- * not -1 or ~0 because of 32/64bit issues. */
- if (addr_len == sizeof("255.255.255.255") - 1 &&
- !memcmp(addr, "255.255.255.255", sizeof("255.255.255.255") - 1)
- ) {
- RETURN_LONG(0xFFFFFFFF);
- }
- RETURN_FALSE;
- }
- RETURN_LONG(ntohl(ip));
- #endif
- }
- /* }}} */
- /* {{{ proto string long2ip(int proper_address)
- Converts an (IPv4) Internet network address into a string in Internet standard dotted format */
- PHP_FUNCTION(long2ip)
- {
- /* "It's a long but it's not, PHP ints are signed */
- char *ip;
- int ip_len;
- unsigned long n;
- struct in_addr myaddr;
- #ifdef HAVE_INET_PTON
- char str[40];
- #endif
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &ip, &ip_len) == FAILURE) {
- return;
- }
- n = strtoul(ip, NULL, 0);
- myaddr.s_addr = htonl(n);
- #ifdef HAVE_INET_PTON
- if (inet_ntop(AF_INET, &myaddr, str, sizeof(str))) {
- RETURN_STRING(str, 1);
- } else {
- RETURN_FALSE;
- }
- #else
- RETURN_STRING(inet_ntoa(myaddr), 1);
- #endif
- }
- /* }}} */
- /********************
- * System Functions *
- ********************/
- /* {{{ proto string getenv(string varname[, bool local_only])
- Get the value of an environment variable */
- PHP_FUNCTION(getenv)
- {
- char *ptr, *str;
- int str_len;
- zend_bool local_only = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &str, &str_len, &local_only) == FAILURE) {
- RETURN_FALSE;
- }
- if (!local_only) {
- /* SAPI method returns an emalloc()'d string */
- ptr = sapi_getenv(str, str_len TSRMLS_CC);
- if (ptr) {
- RETURN_STRING(ptr, 0);
- }
- }
- #ifdef PHP_WIN32
- {
- char dummybuf;
- int size;
- SetLastError(0);
- /*If the given bugger is not large enough to hold the data, the return value is
- the buffer size, in characters, required to hold the string and its terminating
- null character. We use this return value to alloc the final buffer. */
- size = GetEnvironmentVariableA(str, &dummybuf, 0);
- if (GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
- /* The environment variable doesn't exist. */
- RETURN_FALSE;
- }
- if (size == 0) {
- /* env exists, but it is empty */
- RETURN_EMPTY_STRING();
- }
- ptr = emalloc(size);
- size = GetEnvironmentVariableA(str, ptr, size);
- if (size == 0) {
- /* has been removed between the two calls */
- efree(ptr);
- RETURN_EMPTY_STRING();
- } else {
- RETURN_STRING(ptr, 0);
- }
- }
- #else
- /* system method returns a const */
- ptr = getenv(str);
- if (ptr) {
- RETURN_STRING(ptr, 1);
- }
- #endif
- RETURN_FALSE;
- }
- /* }}} */
- #ifdef HAVE_PUTENV
- /* {{{ proto bool putenv(string setting)
- Set the value of an environment variable */
- PHP_FUNCTION(putenv)
- {
- char *setting;
- int setting_len;
- char *p, **env;
- putenv_entry pe;
- #ifdef PHP_WIN32
- char *value = NULL;
- int equals = 0;
- int error_code;
- #endif
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &setting, &setting_len) == FAILURE) {
- return;
- }
- if(setting_len == 0 || setting[0] == '=') {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter syntax");
- RETURN_FALSE;
- }
- pe.putenv_string = estrndup(setting, setting_len);
- pe.key = estrndup(setting, setting_len);
- if ((p = strchr(pe.key, '='))) { /* nullify the '=' if there is one */
- *p = '\0';
- #ifdef PHP_WIN32
- equals = 1;
- #endif
- }
- pe.key_len = strlen(pe.key);
- #ifdef PHP_WIN32
- if (equals) {
- if (pe.key_len < setting_len - 1) {
- value = p + 1;
- } else {
- /* empty string*/
- value = p;
- }
- }
- #endif
- zend_hash_del(&BG(putenv_ht), pe.key, pe.key_len+1);
- /* find previous value */
- pe.previous_value = NULL;
- for (env = environ; env != NULL && *env != NULL; env++) {
- if (!strncmp(*env, pe.key, pe.key_len) && (*env)[pe.key_len] == '=') { /* found it */
- #if defined(PHP_WIN32)
- /* must copy previous value because MSVCRT's putenv can free the string without notice */
- pe.previous_value = estrdup(*env);
- #else
- pe.previous_value = *env;
- #endif
- break;
- }
- }
- #if HAVE_UNSETENV
- if (!p) { /* no '=' means we want to unset it */
- unsetenv(pe.putenv_string);
- }
- if (!p || putenv(pe.putenv_string) == 0) { /* success */
- #else
- # ifndef PHP_WIN32
- if (putenv(pe.putenv_string) == 0) { /* success */
- # else
- error_code = SetEnvironmentVariable(pe.key, value);
- if (error_code != 0
- # ifndef ZTS
- /* We need both SetEnvironmentVariable and _putenv here as some
- dependency lib could use either way to read the environment.
- Obviously the CRT version will be useful more often. But
- generally, doing both brings us on the safe track at least
- in NTS build. */
- && _putenv_s(pe.key, value ? value : "") == 0
- # endif
- ) { /* success */
- # endif
- #endif
- zend_hash_add(&BG(putenv_ht), pe.key, pe.key_len + 1, (void **) &pe, sizeof(putenv_entry), NULL);
- #ifdef HAVE_TZSET
- if (!strncmp(pe.key, "TZ", pe.key_len)) {
- tzset();
- }
- #endif
- RETURN_TRUE;
- } else {
- efree(pe.putenv_string);
- efree(pe.key);
- RETURN_FALSE;
- }
- }
- /* }}} */
- #endif
- /* {{{ free_argv()
- Free the memory allocated to an argv array. */
- static void free_argv(char **argv, int argc)
- {
- int i;
- if (argv) {
- for (i = 0; i < argc; i++) {
- if (argv[i]) {
- efree(argv[i]);
- }
- }
- efree(argv);
- }
- }
- /* }}} */
- /* {{{ free_longopts()
- Free the memory allocated to an longopt array. */
- static void free_longopts(opt_struct *longopts)
- {
- opt_struct *p;
- if (longopts) {
- for (p = longopts; p && p->opt_char != '-'; p++) {
- if (p->opt_name != NULL) {
- efree((char *)(p->opt_name));
- }
- }
- }
- }
- /* }}} */
- /* {{{ parse_opts()
- Convert the typical getopt input characters to the php_getopt struct array */
- static int parse_opts(char * opts, opt_struct ** result)
- {
- opt_struct * paras = NULL;
- unsigned int i, count = 0;
- for (i = 0; i < strlen(opts); i++) {
- if ((opts[i] >= 48 && opts[i] <= 57) ||
- (opts[i] >= 65 && opts[i] <= 90) ||
- (opts[i] >= 97 && opts[i] <= 122)
- ) {
- count++;
- }
- }
- paras = safe_emalloc(sizeof(opt_struct), count, 0);
- memset(paras, 0, sizeof(opt_struct) * count);
- *result = paras;
- while ( (*opts >= 48 && *opts <= 57) || /* 0 - 9 */
- (*opts >= 65 && *opts <= 90) || /* A - Z */
- (*opts >= 97 && *opts <= 122) /* a - z */
- ) {
- paras->opt_char = *opts;
- paras->need_param = (*(++opts) == ':') ? 1 : 0;
- paras->opt_name = NULL;
- if (paras->need_param == 1) {
- opts++;
- if (*opts == ':') {
- paras->need_param++;
- opts++;
- }
- }
- paras++;
- }
- return count;
- }
- /* }}} */
- /* {{{ proto array getopt(string options [, array longopts])
- Get options from the command line argument list */
- PHP_FUNCTION(getopt)
- {
- char *options = NULL, **argv = NULL;
- char opt[2] = { '\0' };
- char *optname;
- int argc = 0, options_len = 0, len, o;
- char *php_optarg = NULL;
- int php_optind = 1;
- zval *val, **args = NULL, *p_longopts = NULL;
- int optname_len = 0;
- opt_struct *opts, *orig_opts;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|a", &options, &options_len, &p_longopts) == FAILURE) {
- RETURN_FALSE;
- }
- /* Get argv from the global symbol table. We calculate argc ourselves
- * in order to be on the safe side, even though it is also available
- * from the symbol table. */
- if ((PG(http_globals)[TRACK_VARS_SERVER] || zend_is_auto_global(ZEND_STRL("_SERVER") TSRMLS_CC)) &&
- (zend_hash_find(Z_ARRVAL_P((PG(http_globals))[TRACK_VARS_SERVER]), "argv", sizeof("argv"), (void **) &args) != FAILURE ||
- zend_hash_find(&EG(symbol_table), "argv", sizeof("argv"), (void **) &args) != FAILURE) && Z_TYPE_PP(args) == IS_ARRAY
- ) {
- int pos = 0;
- zval **entry;
- argc = zend_hash_num_elements(Z_ARRVAL_PP(args));
- /* Attempt to allocate enough memory to hold all of the arguments
- * and a trailing NULL */
- argv = (char **) safe_emalloc(sizeof(char *), (argc + 1), 0);
- /* Reset the array indexes. */
- zend_hash_internal_pointer_reset(Z_ARRVAL_PP(args));
- /* Iterate over the hash to construct the argv array. */
- while (zend_hash_get_current_data(Z_ARRVAL_PP(args), (void **)&entry) == SUCCESS) {
- zval arg, *arg_ptr = *entry;
- if (Z_TYPE_PP(entry) != IS_STRING) {
- arg = **entry;
- zval_copy_ctor(&arg);
- convert_to_string(&arg);
- arg_ptr = &arg;
- }
- argv[pos++] = estrdup(Z_STRVAL_P(arg_ptr));
- if (arg_ptr != *entry) {
- zval_dtor(&arg);
- }
- zend_hash_move_forward(Z_ARRVAL_PP(args));
- }
- /* The C Standard requires argv[argc] to be NULL - this might
- * keep some getopt implementations happy. */
- argv[argc] = NULL;
- } else {
- /* Return false if we can't find argv. */
- RETURN_FALSE;
- }
- len = parse_opts(options, &opts);
- if (p_longopts) {
- int count;
- zval **entry;
- count = zend_hash_num_elements(Z_ARRVAL_P(p_longopts));
- /* the first <len> slots are filled by the one short ops
- * we now extend our array and jump to the new added structs */
- opts = (opt_struct *) erealloc(opts, sizeof(opt_struct) * (len + count + 1));
- orig_opts = opts;
- opts += len;
- memset(opts, 0, count * sizeof(opt_struct));
- /* Reset the array indexes. */
- zend_hash_internal_pointer_reset(Z_ARRVAL_P(p_longopts));
- /* Iterate over the hash to construct the argv array. */
- while (zend_hash_get_current_data(Z_ARRVAL_P(p_longopts), (void **)&entry) == SUCCESS) {
- zval arg, *arg_ptr = *entry;
- if (Z_TYPE_PP(entry) != IS_STRING) {
- arg = **entry;
- zval_copy_ctor(&arg);
- convert_to_string(&arg);
- arg_ptr = &arg;
- }
- opts->need_param = 0;
- opts->opt_name = estrdup(Z_STRVAL_P(arg_ptr));
- len = strlen(opts->opt_name);
- if ((len > 0) && (opts->opt_name[len - 1] == ':')) {
- opts->need_param++;
- opts->opt_name[len - 1] = '\0';
- if ((len > 1) && (opts->opt_name[len - 2] == ':')) {
- opts->need_param++;
- opts->opt_name[len - 2] = '\0';
- }
- }
- opts->opt_char = 0;
- opts++;
- if (arg_ptr != *entry) {
- zval_dtor(&arg);
- }
- zend_hash_move_forward(Z_ARRVAL_P(p_longopts));
- }
- } else {
- opts = (opt_struct*) erealloc(opts, sizeof(opt_struct) * (len + 1));
- orig_opts = opts;
- opts += len;
- }
- /* php_getopt want to identify the last param */
- opts->opt_char = '-';
- opts->need_param = 0;
- opts->opt_name = NULL;
- /* Initialize the return value as an array. */
- array_init(return_value);
- /* after our pointer arithmetic jump back to the first element */
- opts = orig_opts;
- while ((o = php_getopt(argc, argv, opts, &php_optarg, &php_optind, 0, 1)) != -1) {
- /* Skip unknown arguments. */
- if (o == '?') {
- continue;
- }
- /* Prepare the option character and the argument string. */
- if (o == 0) {
- optname = opts[php_optidx].opt_name;
- } else {
- if (o == 1) {
- o = '-';
- }
- opt[0] = o;
- optname = opt;
- }
- MAKE_STD_ZVAL(val);
- if (php_optarg != NULL) {
- /* keep the arg as binary, since the encoding is not known */
- ZVAL_STRING(val, php_optarg, 1);
- } else {
- ZVAL_FALSE(val);
- }
- /* Add this option / argument pair to the result hash. */
- optname_len = strlen(optname);
- if (!(optname_len > 1 && optname[0] == '0') && is_numeric_string(optname, optname_len, NULL, NULL, 0) == IS_LONG) {
- /* numeric string */
- int optname_int = atoi(optname);
- if (zend_hash_index_find(HASH_OF(return_value), optname_int, (void **)&args) != FAILURE) {
- if (Z_TYPE_PP(args) != IS_ARRAY) {
- convert_to_array_ex(args);
- }
- zend_hash_next_index_insert(HASH_OF(*args), (void *)&val, sizeof(zval *), NULL);
- } else {
- zend_hash_index_update(HASH_OF(return_value), optname_int, &val, sizeof(zval *), NULL);
- }
- } else {
- /* other strings */
- if (zend_hash_find(HASH_OF(return_value), optname, strlen(optname)+1, (void **)&args) != FAILURE) {
- if (Z_TYPE_PP(args) != IS_ARRAY) {
- convert_to_array_ex(args);
- }
- zend_hash_next_index_insert(HASH_OF(*args), (void *)&val, sizeof(zval *), NULL);
- } else {
- zend_hash_add(HASH_OF(return_value), optname, strlen(optname)+1, (void *)&val, sizeof(zval *), NULL);
- }
- }
- php_optarg = NULL;
- }
- free_longopts(orig_opts);
- efree(orig_opts);
- free_argv(argv, argc);
- }
- /* }}} */
- /* {{{ proto void flush(void)
- Flush the output buffer */
- PHP_FUNCTION(flush)
- {
- sapi_flush(TSRMLS_C);
- }
- /* }}} */
- /* {{{ proto void sleep(int seconds)
- Delay for a given number of seconds */
- PHP_FUNCTION(sleep)
- {
- long num;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &num) == FAILURE) {
- RETURN_FALSE;
- }
- if (num < 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of seconds must be greater than or equal to 0");
- RETURN_FALSE;
- }
- #ifdef PHP_SLEEP_NON_VOID
- RETURN_LONG(php_sleep(num));
- #else
- php_sleep(num);
- #endif
- }
- /* }}} */
- /* {{{ proto void usleep(int micro_seconds)
- Delay for a given number of micro seconds */
- PHP_FUNCTION(usleep)
- {
- #if HAVE_USLEEP
- long num;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &num) == FAILURE) {
- return;
- }
- if (num < 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of microseconds must be greater than or equal to 0");
- RETURN_FALSE;
- }
- usleep(num);
- #endif
- }
- /* }}} */
- #if HAVE_NANOSLEEP
- /* {{{ proto mixed time_nanosleep(long seconds, long nanoseconds)
- Delay for a number of seconds and nano seconds */
- PHP_FUNCTION(time_nanosleep)
- {
- long tv_sec, tv_nsec;
- struct timespec php_req, php_rem;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &tv_sec, &tv_nsec) == FAILURE) {
- return;
- }
- if (tv_sec < 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "The seconds value must be greater than 0");
- RETURN_FALSE;
- }
- if (tv_nsec < 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "The nanoseconds value must be greater than 0");
- RETURN_FALSE;
- }
- php_req.tv_sec = (time_t) tv_sec;
- php_req.tv_nsec = tv_nsec;
- if (!nanosleep(&php_req, &php_rem)) {
- RETURN_TRUE;
- } else if (errno == EINTR) {
- array_init(return_value);
- add_assoc_long_ex(return_value, "seconds", sizeof("seconds"), php_rem.tv_sec);
- add_assoc_long_ex(return_value, "nanoseconds", sizeof("nanoseconds"), php_rem.tv_nsec);
- return;
- } else if (errno == EINVAL) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "nanoseconds was not in the range 0 to 999 999 999 or seconds was negative");
- }
- RETURN_FALSE;
- }
- /* }}} */
- /* {{{ proto mixed time_sleep_until(float timestamp)
- Make the script sleep until the specified time */
- PHP_FUNCTION(time_sleep_until)
- {
- double d_ts, c_ts;
- struct timeval tm;
- struct timespec php_req, php_rem;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &d_ts) == FAILURE) {
- return;
- }
- if (gettimeofday((struct timeval *) &tm, NULL) != 0) {
- RETURN_FALSE;
- }
- c_ts = (double)(d_ts - tm.tv_sec - tm.tv_usec / 1000000.00);
- if (c_ts < 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sleep until to time is less than current time");
- RETURN_FALSE;
- }
- php_req.tv_sec = (time_t) c_ts;
- if (php_req.tv_sec > c_ts) { /* rounding up occurred */
- php_req.tv_sec--;
- }
- /* 1sec = 1000000000 nanoseconds */
- php_req.tv_nsec = (long) ((c_ts - php_req.tv_sec) * 1000000000.00);
- while (nanosleep(&php_req, &php_rem)) {
- if (errno == EINTR) {
- php_req.tv_sec = php_rem.tv_sec;
- php_req.tv_nsec = php_rem.tv_nsec;
- } else {
- RETURN_FALSE;
- }
- }
- RETURN_TRUE;
- }
- /* }}} */
- #endif
- /* {{{ proto string get_current_user(void)
- Get the name of the owner of the current PHP script */
- PHP_FUNCTION(get_current_user)
- {
- if (zend_parse_parameters_none() == FAILURE) {
- return;
- }
- RETURN_STRING(php_get_current_user(TSRMLS_C), 1);
- }
- /* }}} */
- /* {{{ add_config_entry_cb
- */
- static int add_config_entry_cb(zval *entry TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key)
- {
- zval *retval = (zval *)va_arg(args, zval*);
- zval *tmp;
- if (Z_TYPE_P(entry) == IS_STRING) {
- if (hash_key->nKeyLength > 0) {
- add_assoc_stringl_ex(retval, hash_key->arKey, hash_key->nKeyLength, Z_STRVAL_P(entry), Z_STRLEN_P(entry), 1);
- } else {
- add_index_stringl(retval, hash_key->h, Z_STRVAL_P(entry), Z_STRLEN_P(entry), 1);
- }
- } else if (Z_TYPE_P(entry) == IS_ARRAY) {
- MAKE_STD_ZVAL(tmp);
- array_init(tmp);
- zend_hash_apply_with_arguments(Z_ARRVAL_P(entry) TSRMLS_CC, (apply_func_args_t) add_config_entry_cb, 1, tmp);
- add_assoc_zval_ex(retval, hash_key->arKey, hash_key->nKeyLength, tmp);
- }
- return 0;
- }
- /* }}} */
- /* {{{ proto mixed get_cfg_var(string option_name)
- Get the value of a PHP configuration option */
- PHP_FUNCTION(get_cfg_var)
- {
- char *varname;
- int varname_len;
- zval *retval;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &varname, &varname_len) == FAILURE) {
- return;
- }
- retval = cfg_get_entry(varname, varname_len + 1);
- if (retval) {
- if (Z_TYPE_P(retval) == IS_ARRAY) {
- array_init(return_value);
- zend_hash_apply_with_arguments(Z_ARRVAL_P(retval) TSRMLS_CC, (apply_func_args_t) add_config_entry_cb, 1, return_value);
- return;
- } else {
- RETURN_STRING(Z_STRVAL_P(retval), 1);
- }
- } else {
- RETURN_FALSE;
- }
- }
- /* }}} */
- /* {{{ proto bool set_magic_quotes_runtime(int new_setting)
- magic_quotes_runtime is not supported anymore */
- PHP_FUNCTION(set_magic_quotes_runtime)
- {
- zend_bool new_setting;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &new_setting) == FAILURE) {
- return;
- }
- if (new_setting) {
- php_error_docref(NULL TSRMLS_CC, E_CORE_ERROR, "magic_quotes_runtime is not supported anymore");
- }
- RETURN_FALSE;
- }
- /* }}} */
- /* {{{ proto int get_magic_quotes_runtime(void)
- Get the current active configuration setting of magic_quotes_runtime */
- PHP_FUNCTION(get_magic_quotes_runtime)
- {
- if (zend_parse_parameters_none() == FAILURE) {
- return;
- }
- RETURN_FALSE;
- }
- /* }}} */
- /* {{{ proto int get_magic_quotes_gpc(void)
- Get the current active configuration setting of magic_quotes_gpc */
- PHP_FUNCTION(get_magic_quotes_gpc)
- {
- if (zend_parse_parameters_none() == FAILURE) {
- return;
- }
- RETURN_FALSE;
- }
- /* }}} */
- /*
- 1st arg = error message
- 2nd arg = error option
- 3rd arg = optional parameters (email address or tcp address)
- 4th arg = used for additional headers if email
- error options:
- 0 = send to php_error_log (uses syslog or file depending on ini setting)
- 1 = send via email to 3rd parameter 4th option = additional headers
- 2 = send via tcp/ip to 3rd parameter (name or ip:port)
- 3 = save to file in 3rd parameter
- 4 = send to SAPI logger directly
- */
- /* {{{ proto bool error_log(string message [, int message_type [, string destination [, string extra_headers]]])
- Send an error message somewhere */
- PHP_FUNCTION(error_log)
- {
- char *message, *opt = NULL, *headers = NULL;
- int message_len, opt_len = 0, headers_len = 0;
- int opt_err = 0, argc = ZEND_NUM_ARGS();
- long erropt = 0;
- if (zend_parse_parameters(argc TSRMLS_CC, "s|lps", &message, &message_len, &erropt, &opt, &opt_len, &headers, &headers_len) == FAILURE) {
- return;
- }
- if (argc > 1) {
- opt_err = erropt;
- }
- if (_php_error_log_ex(opt_err, message, message_len, opt, headers TSRMLS_CC) == FAILURE) {
- RETURN_FALSE;
- }
- RETURN_TRUE;
- }
- /* }}} */
- /* For BC (not binary-safe!) */
- PHPAPI int _php_error_log(int opt_err, char *message, char *opt, char *headers TSRMLS_DC) /* {{{ */
- {
- return _php_error_log_ex(opt_err, message, (opt_err == 3) ? strlen(message) : 0, opt, headers TSRMLS_CC);
- }
- /* }}} */
- PHPAPI int _php_error_log_ex(int opt_err, char *message, int message_len, char *opt, char *headers TSRMLS_DC) /* {{{ */
- {
- php_stream *stream = NULL;
- switch (opt_err)
- {
- case 1: /*send an email */
- if (!php_mail(opt, "PHP error_log message", message, headers, NULL TSRMLS_CC)) {
- return FAILURE;
- }
- break;
- case 2: /*send to an address */
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "TCP/IP option not available!");
- return FAILURE;
- break;
- case 3: /*save to a file */
- stream = php_stream_open_wrapper(opt, "a", IGNORE_URL_WIN | REPORT_ERRORS, NULL);
- if (!stream) {
- return FAILURE;
- }
- php_stream_write(stream, message, message_len);
- php_stream_close(stream);
- break;
- case 4: /* send to SAPI */
- if (sapi_module.log_message) {
- sapi_module.log_message(message TSRMLS_CC);
- } else {
- return FAILURE;
- }
- break;
- default:
- php_log_err(message TSRMLS_CC);
- break;
- }
- return SUCCESS;
- }
- /* }}} */
- /* {{{ proto array error_get_last()
- Get the last occurred error as associative array. Returns NULL if there hasn't been an error yet. */
- PHP_FUNCTION(error_get_last)
- {
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
- return;
- }
- if (PG(last_error_message)) {
- array_init(return_value);
- add_assoc_long_ex(return_value, "type", sizeof("type"), PG(last_error_type));
- add_assoc_string_ex(return_value, "message", sizeof("message"), PG(last_error_message), 1);
- add_assoc_string_ex(return_value, "file", sizeof("file"), PG(last_error_file)?PG(last_error_file):"-", 1 );
- add_assoc_long_ex(return_value, "line", sizeof("line"), PG(last_error_lineno));
- }
- }
- /* }}} */
- /* {{{ proto mixed call_user_func(mixed function_name [, mixed parmeter] [, mixed ...])
- Call a user function which is the first parameter */
- PHP_FUNCTION(call_user_func)
- {
- zval *retval_ptr = NULL;
- zend_fcall_info fci;
- zend_fcall_info_cache fci_cache;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f*", &fci, &fci_cache, &fci.params, &fci.param_count) == FAILURE) {
- return;
- }
- fci.retval_ptr_ptr = &retval_ptr;
- if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && fci.retval_ptr_ptr && *fci.retval_ptr_ptr) {
- COPY_PZVAL_TO_ZVAL(*return_value, *fci.retval_ptr_ptr);
- }
- if (fci.params) {
- efree(fci.params);
- }
- }
- /* }}} */
- /* {{{ proto mixed call_user_func_array(string function_name, array parameters)
- Call a user function which is the first parameter with the arguments contained in array */
- PHP_FUNCTION(call_user_func_array)
- {
- zval *params, *retval_ptr = NULL;
- zend_fcall_info fci;
- zend_fcall_info_cache fci_cache;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "fa/", &fci, &fci_cache, ¶ms) == FAILURE) {
- return;
- }
- zend_fcall_info_args(&fci, params TSRMLS_CC);
- fci.retval_ptr_ptr = &retval_ptr;
- if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && fci.retval_ptr_ptr && *fci.retval_ptr_ptr) {
- COPY_PZVAL_TO_ZVAL(*return_value, *fci.retval_ptr_ptr);
- }
- zend_fcall_info_args_clear(&fci, 1);
- }
- /* }}} */
- /* {{{ proto mixed call_user_method(string method_name, mixed object [, mixed parameter] [, mixed ...])
- Call a user method on a specific object or class */
- PHP_FUNCTION(call_user_method)
- {
- zval ***params = NULL;
- int n_params = 0;
- zval *retval_ptr;
- zval *callback, *object;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/z*", &callback, &object, ¶ms, &n_params) == FAILURE) {
- return;
- }
- if (Z_TYPE_P(object) != IS_OBJECT &&
- Z_TYPE_P(object) != IS_STRING
- ) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Second argument is not an object or class name");
- if (params) {
- efree(params);
- }
- RETURN_FALSE;
- }
- convert_to_string(callback);
- if (call_user_function_ex(EG(function_table), &object, callback, &retval_ptr, n_params, params, 0, NULL TSRMLS_CC) == SUCCESS) {
- if (retval_ptr) {
- COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr);
- }
- } else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s()", Z_STRVAL_P(callback));
- }
- if (n_params) {
- efree(params);
- }
- }
- /* }}} */
- /* {{{ proto mixed call_user_method_array(string method_name, mixed object, array params)
- Call a user method on a specific object or class using a parameter array */
- PHP_FUNCTION(call_user_method_array)
- {
- zval *params, ***method_args = NULL, *retval_ptr;
- zval *callback, *object;
- HashTable *params_ar;
- int num_elems, element = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/zA/", &callback, &object, ¶ms) == FAILURE) {
- return;
- }
- if (Z_TYPE_P(object) != IS_OBJECT &&
- Z_TYPE_P(object) != IS_STRING
- ) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Second argument is not an object or class name");
- RETURN_FALSE;
- }
- convert_to_string(callback);
- params_ar = HASH_OF(params);
- num_elems = zend_hash_num_elements(params_ar);
- method_args = (zval ***) safe_emalloc(sizeof(zval **), num_elems, 0);
- for (zend_hash_internal_pointer_reset(params_ar);
- zend_hash_get_current_data(params_ar, (void **) &(method_args[element])) == SUCCESS;
- zend_hash_move_forward(params_ar)
- ) {
- element++;
- }
- if (call_user_function_ex(EG(function_table), &object, callback, &retval_ptr, num_elems, method_args, 0, NULL TSRMLS_CC) == SUCCESS) {
- if (retval_ptr) {
- COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr);
- }
- } else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s()", Z_STRVAL_P(callback));
- }
- efree(method_args);
- }
- /* }}} */
- /* {{{ proto mixed forward_static_call(mixed function_name [, mixed parmeter] [, mixed ...]) U
- Call a user function which is the first parameter */
- PHP_FUNCTION(forward_static_call)
- {
- zval *retval_ptr = NULL;
- zend_fcall_info fci;
- zend_fcall_info_cache fci_cache;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f*", &fci, &fci_cache, &fci.params, &fci.param_count) == FAILURE) {
- return;
- }
- if (!EG(active_op_array)->scope) {
- zend_error(E_ERROR, "Cannot call forward_static_call() when no class scope is active");
- }
- fci.retval_ptr_ptr = &retval_ptr;
- if (EG(called_scope) &&
- instanceof_function(EG(called_scope), fci_cache.calling_scope TSRMLS_CC)) {
- fci_cache.called_scope = EG(called_scope);
- }
- if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && fci.retval_ptr_ptr && *fci.retval_ptr_ptr) {
- COPY_PZVAL_TO_ZVAL(*return_value, *fci.retval_ptr_ptr);
- }
- if (fci.params) {
- efree(fci.params);
- }
- }
- /* }}} */
- /* {{{ proto mixed call_user_func_array(string function_name, array parameters) U
- Call a user function which is the first parameter with the arguments contained in array */
- PHP_FUNCTION(forward_static_call_array)
- {
- zval *params, *retval_ptr = NULL;
- zend_fcall_info fci;
- zend_fcall_info_cache fci_cache;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "fa/", &fci, &fci_cache, ¶ms) == FAILURE) {
- return;
- }
- zend_fcall_info_args(&fci, params TSRMLS_CC);
- fci.retval_ptr_ptr = &retval_ptr;
- if (EG(called_scope) &&
- instanceof_function(EG(called_scope), fci_cache.calling_scope TSRMLS_CC)) {
- fci_cache.called_scope = EG(called_scope);
- }
- if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && fci.retval_ptr_ptr && *fci.retval_ptr_ptr) {
- COPY_PZVAL_TO_ZVAL(*return_value, *fci.retval_ptr_ptr);
- }
- zend_fcall_info_args_clear(&fci, 1);
- }
- /* }}} */
- void user_shutdown_function_dtor(php_shutdown_function_entry *shutdown_function_entry) /* {{{ */
- {
- int i;
- for (i = 0; i < shutdown_function_entry->arg_count; i++) {
- zval_ptr_dtor(&shutdown_function_entry->arguments[i]);
- }
- efree(shutdown_function_entry->arguments);
- }
- /* }}} */
- void user_tick_function_dtor(user_tick_function_entry *tick_function_entry) /* {{{ */
- {
- int i;
- for (i = 0; i < tick_function_entry->arg_count; i++) {
- zval_ptr_dtor(&tick_function_entry->arguments[i]);
- }
- efree(tick_function_entry->arguments);
- }
- /* }}} */
- static int user_shutdown_function_call(php_shutdown_function_entry *shutdown_function_entry TSRMLS_DC) /* {{{ */
- {
- zval retval;
- char *function_name;
- if (!zend_is_callable(shutdown_function_entry->arguments[0], 0, &function_name TSRMLS_CC)) {
- php_error(E_WARNING, "(Registered shutdown functions) Unable to call %s() - function does not exist", function_name);
- if (function_name) {
- efree(function_name);
- }
- return 0;
- }
- if (function_name) {
- efree(function_name);
- }
- if (call_user_function(EG(function_table), NULL,
- shutdown_function_entry->arguments[0],
- &retval,
- shutdown_function_entry->arg_count - 1,
- shutdown_function_entry->arguments + 1
- TSRMLS_CC ) == SUCCESS)
- {
- zval_dtor(&retval);
- }
- return 0;
- }
- /* }}} */
- static void user_tick_function_call(user_tick_function_entry *tick_fe TSRMLS_DC) /* {{{ */
- {
- zval retval;
- zval *function = tick_fe->arguments[0];
- /* Prevent reentrant calls to the same user ticks function */
- if (! tick_fe->calling) {
- tick_fe->calling = 1;
- if (call_user_function( EG(function_table), NULL,
- function,
- &retval,
- tick_fe->arg_count - 1,
- tick_fe->arguments + 1
- TSRMLS_CC) == SUCCESS) {
- zval_dtor(&retval);
- } else {
- zval **obj, **method;
- if (Z_TYPE_P(function) == IS_STRING) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s() - function does not exist", Z_STRVAL_P(function));
- } else if ( Z_TYPE_P(function) == IS_ARRAY
- && zend_hash_index_find(Z_ARRVAL_P(function), 0, (void **) &obj) == SUCCESS
- && zend_hash_index_find(Z_ARRVAL_P(function), 1, (void **) &method) == SUCCESS
- && Z_TYPE_PP(obj) == IS_OBJECT
- && Z_TYPE_PP(method) == IS_STRING) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s::%s() - function does not exist", Z_OBJCE_PP(obj)->name, Z_STRVAL_PP(method));
- } else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call tick function");
- }
- }
- tick_fe->calling = 0;
- }
- }
- /* }}} */
- static void run_user_tick_functions(int tick_count) /* {{{ */
- {
- TSRMLS_FETCH();
- zend_llist_apply(BG(user_tick_functions), (llist_apply_func_t) user_tick_function_call TSRMLS_CC);
- }
- /* }}} */
- static int user_tick_function_compare(user_tick_function_entry * tick_fe1, user_tick_function_entry * tick_fe2) /* {{{ */
- {
- zval *func1 = tick_fe1->arguments[0];
- zval *func2 = tick_fe2->arguments[0];
- int ret;
- TSRMLS_FETCH();
- if (Z_TYPE_P(func1) == IS_STRING && Z_TYPE_P(func2) == IS_STRING) {
- ret = (zend_binary_zval_strcmp(func1, func2) == 0);
- } else if (Z_TYPE_P(func1) == IS_ARRAY && Z_TYPE_P(func2) == IS_ARRAY) {
- zval result;
- zend_compare_arrays(&result, func1, func2 TSRMLS_CC);
- ret = (Z_LVAL(result) == 0);
- } else if (Z_TYPE_P(func1) == IS_OBJECT && Z_TYPE_P(func2) == IS_OBJECT) {
- zval result;
- zend_compare_objects(&result, func1, func2 TSRMLS_CC);
- ret = (Z_LVAL(result) == 0);
- } else {
- ret = 0;
- }
- if (ret && tick_fe1->calling) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to delete tick function executed at the moment");
- return 0;
- }
- return ret;
- }
- /* }}} */
- PHPAPI void php_call_shutdown_functions(TSRMLS_D) /* {{{ */
- {
- if (BG(user_shutdown_function_names)) {
- zend_try {
- zend_hash_apply(BG(user_shutdown_function_names), (apply_func_t) user_shutdown_function_call TSRMLS_CC);
- }
- zend_end_try();
- php_free_shutdown_functions(TSRMLS_C);
- }
- }
- /* }}} */
- PHPAPI void php_free_shutdown_functions(TSRMLS_D) /* {{{ */
- {
- if (BG(user_shutdown_function_names))
- zend_try {
- zend_hash_destroy(BG(user_shutdown_function_names));
- FREE_HASHTABLE(BG(user_shutdown_function_names));
- BG(user_shutdown_function_names) = NULL;
- } zend_catch {
- /* maybe shutdown method call exit, we just ignore it */
- FREE_HASHTABLE(BG(user_shutdown_function_names));
- BG(user_shutdown_function_names) = NULL;
- } zend_end_try();
- }
- /* }}} */
- /* {{{ proto void register_shutdown_function(callback function) U
- Register a user-level function to be called on request termination */
- PHP_FUNCTION(register_shutdown_function)
- {
- php_shutdown_function_entry shutdown_function_entry;
- char *callback_name = NULL;
- int i;
- shutdown_function_entry.arg_count = ZEND_NUM_ARGS();
- if (shutdown_function_entry.arg_count < 1) {
- WRONG_PARAM_COUNT;
- }
- shutdown_function_entry.arguments = (zval **) safe_emalloc(sizeof(zval *), shutdown_function_entry.arg_count, 0);
- if (zend_get_parameters_array(ht, shutdown_function_entry.arg_count, shutdown_function_entry.arguments) == FAILURE) {
- efree(shutdown_function_entry.arguments);
- RETURN_FALSE;
- }
- /* Prevent entering of anything but valid callback (syntax check only!) */
- if (!zend_is_callable(shutdown_function_entry.arguments[0], 0, &callback_name TSRMLS_CC)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid shutdown callback '%s' passed", callback_name);
- efree(shutdown_function_entry.arguments);
- RETVAL_FALSE;
- } else {
- if (!BG(user_shutdown_function_names)) {
- ALLOC_HASHTABLE(BG(user_shutdown_function_names));
- zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *)) user_shutdown_function_dtor, 0);
- }
- for (i = 0; i < shutdown_function_entry.arg_count; i++) {
- Z_ADDREF_P(shutdown_function_entry.arguments[i]);
- }
- zend_hash_next_index_insert(BG(user_shutdown_function_names), &shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL);
- }
- if (callback_name) {
- efree(callback_name);
- }
- }
- /* }}} */
- PHPAPI zend_bool register_user_shutdown_function(char *function_name, size_t function_len, php_shutdown_function_entry *shutdown_function_entry TSRMLS_DC) /* {{{ */
- {
- if (!BG(user_shutdown_function_names)) {
- ALLOC_HASHTABLE(BG(user_shutdown_function_names));
- zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *)) user_shutdown_function_dtor, 0);
- }
- return zend_hash_update(BG(user_shutdown_function_names), function_name, function_len, shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL) != FAILURE;
- }
- /* }}} */
- PHPAPI zend_bool remove_user_shutdown_function(char *function_name, size_t function_len TSRMLS_DC) /* {{{ */
- {
- if (BG(user_shutdown_function_names)) {
- return zend_hash_del_key_or_index(BG(user_shutdown_function_names), function_name, function_len, 0, HASH_DEL_KEY) != FAILURE;
- }
- return 0;
- }
- /* }}} */
- PHPAPI zend_bool append_user_shutdown_function(php_shutdown_function_entry shutdown_function_entry TSRMLS_DC) /* {{{ */
- {
- if (!BG(user_shutdown_function_names)) {
- ALLOC_HASHTABLE(BG(user_shutdown_function_names));
- zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *)) user_shutdown_function_dtor, 0);
- }
- return zend_hash_next_index_insert(BG(user_shutdown_function_names), &shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL) != FAILURE;
- }
- /* }}} */
- ZEND_API void php_get_highlight_struct(zend_syntax_highlighter_ini *syntax_highlighter_ini) /* {{{ */
- {
- syntax_highlighter_ini->highlight_comment = INI_STR("highlight.comment");
- syntax_highlighter_ini->highlight_default = INI_STR("highlight.default");
- syntax_highlighter_ini->highlight_html = INI_STR("highlight.html");
- syntax_highlighter_ini->highlight_keyword = INI_STR("highlight.keyword");
- syntax_highlighter_ini->highlight_string = INI_STR("highlight.string");
- }
- /* }}} */
- /* {{{ proto bool highlight_file(string file_name [, bool return] )
- Syntax highlight a source file */
- PHP_FUNCTION(highlight_file)
- {
- char *filename;
- int filename_len, ret;
- zend_syntax_highlighter_ini syntax_highlighter_ini;
- zend_bool i = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|b", &filename, &filename_len, &i) == FAILURE) {
- RETURN_FALSE;
- }
- if (php_check_open_basedir(filename TSRMLS_CC)) {
- RETURN_FALSE;
- }
- if (i) {
- php_output_start_default(TSRMLS_C);
- }
- php_get_highlight_struct(&syntax_highlighter_ini);
- ret = highlight_file(filename, &syntax_highlighter_ini TSRMLS_CC);
- if (ret == FAILURE) {
- if (i) {
- php_output_end(TSRMLS_C);
- }
- RETURN_FALSE;
- }
- if (i) {
- php_output_get_contents(return_value TSRMLS_CC);
- php_output_discard(TSRMLS_C);
- } else {
- RETURN_TRUE;
- }
- }
- /* }}} */
- /* {{{ proto string php_strip_whitespace(string file_name)
- Return source with stripped comments and whitespace */
- PHP_FUNCTION(php_strip_whitespace)
- {
- char *filename;
- int filename_len;
- zend_lex_state original_lex_state;
- zend_file_handle file_handle = {0};
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &filename, &filename_len) == FAILURE) {
- RETURN_FALSE;
- }
- php_output_start_default(TSRMLS_C);
- file_handle.type = ZEND_HANDLE_FILENAME;
- file_handle.filename = filename;
- file_handle.free_filename = 0;
- file_handle.opened_path = NULL;
- zend_save_lexical_state(&original_lex_state TSRMLS_CC);
- if (open_file_for_scanning(&file_handle TSRMLS_CC) == FAILURE) {
- zend_restore_lexical_state(&original_lex_state TSRMLS_CC);
- php_output_end(TSRMLS_C);
- RETURN_EMPTY_STRING();
- }
- zend_strip(TSRMLS_C);
- zend_destroy_file_handle(&file_handle TSRMLS_CC);
- zend_restore_lexical_state(&original_lex_state TSRMLS_CC);
- php_output_get_contents(return_value TSRMLS_CC);
- php_output_discard(TSRMLS_C);
- }
- /* }}} */
- /* {{{ proto bool highlight_string(string string [, bool return] )
- Syntax highlight a string or optionally return it */
- PHP_FUNCTION(highlight_string)
- {
- zval **expr;
- zend_syntax_highlighter_ini syntax_highlighter_ini;
- char *hicompiled_string_description;
- zend_bool i = 0;
- int old_error_reporting = EG(error_reporting);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|b", &expr, &i) == FAILURE) {
- RETURN_FALSE;
- }
- convert_to_string_ex(expr);
- if (i) {
- php_output_start_default(TSRMLS_C);
- }
- EG(error_reporting) = E_ERROR;
- php_get_highlight_struct(&syntax_highlighter_ini);
- hicompiled_string_description = zend_make_compiled_string_description("highlighted code" TSRMLS_CC);
- if (highlight_string(*expr, &syntax_highlighter_ini, hicompiled_string_description TSRMLS_CC) == FAILURE) {
- efree(hicompiled_string_description);
- EG(error_reporting) = old_error_reporting;
- if (i) {
- php_output_end(TSRMLS_C);
- }
- RETURN_FALSE;
- }
- efree(hicompiled_string_description);
- EG(error_reporting) = old_error_reporting;
- if (i) {
- php_output_get_contents(return_value TSRMLS_CC);
- php_output_discard(TSRMLS_C);
- } else {
- RETURN_TRUE;
- }
- }
- /* }}} */
- /* {{{ proto string ini_get(string varname)
- Get a configuration option */
- PHP_FUNCTION(ini_get)
- {
- char *varname, *str;
- int varname_len;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &varname, &varname_len) == FAILURE) {
- return;
- }
- str = zend_ini_string(varname, varname_len + 1, 0);
- if (!str) {
- RETURN_FALSE;
- }
- RETURN_STRING(str, 1);
- }
- /* }}} */
- static int php_ini_get_option(zend_ini_entry *ini_entry TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */
- {
- zval *ini_array = va_arg(args, zval *);
- int module_number = va_arg(args, int);
- int details = va_arg(args, int);
- zval *option;
- if (module_number != 0 && ini_entry->module_number != module_number) {
- return 0;
- }
- if (hash_key->nKeyLength == 0 ||
- hash_key->arKey[0] != 0
- ) {
- if (details) {
- MAKE_STD_ZVAL(option);
- array_init(option);
- if (ini_entry->orig_value) {
- add_assoc_stringl(option, "global_value", ini_entry->orig_value, ini_entry->orig_value_length, 1);
- } else if (ini_entry->value) {
- add_assoc_stringl(option, "global_value", ini_entry->value, ini_entry->value_length, 1);
- } else {
- add_assoc_null(option, "global_value");
- }
- if (ini_entry->value) {
- add_assoc_stringl(option, "local_value", ini_entry->value, ini_entry->value_length, 1);
- } else {
- add_assoc_null(option, "local_value");
- }
- add_assoc_long(option, "access", ini_entry->modifiable);
- add_assoc_zval_ex(ini_array, ini_entry->name, ini_entry->name_length, option);
- } else {
- if (ini_entry->value) {
- add_assoc_stringl(ini_array, ini_entry->name, ini_entry->value, ini_entry->value_length, 1);
- } else {
- add_assoc_null(ini_array, ini_entry->name);
- }
- }
- }
- return 0;
- }
- /* }}} */
- /* {{{ proto array ini_get_all([string extension[, bool details = true]])
- Get all configuration options */
- PHP_FUNCTION(ini_get_all)
- {
- char *extname = NULL;
- int extname_len = 0, extnumber = 0;
- zend_module_entry *module;
- zend_bool details = 1;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!b", &extname, &extname_len, &details) == FAILURE) {
- return;
- }
- zend_ini_sort_entries(TSRMLS_C);
- if (extname) {
- if (zend_hash_find(&module_registry, extname, extname_len+1, (void **) &module) == FAILURE) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find extension '%s'", extname);
- RETURN_FALSE;
- }
- extnumber = module->module_number;
- }
- array_init(return_value);
- zend_hash_apply_with_arguments(EG(ini_directives) TSRMLS_CC, (apply_func_args_t) php_ini_get_option, 2, return_value, extnumber, details);
- }
- /* }}} */
- static int php_ini_check_path(char *option_name, int option_len, char *new_option_name, int new_option_len) /* {{{ */
- {
- if (option_len != (new_option_len - 1)) {
- return 0;
- }
- return !strncmp(option_name, new_option_name, option_len);
- }
- /* }}} */
- /* {{{ proto string ini_set(string varname, string newvalue)
- Set a configuration option, returns false on error and the old value of the configuration option on success */
- PHP_FUNCTION(ini_set)
- {
- char *varname, *new_value;
- int varname_len, new_value_len;
- char *old_value;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &varname, &varname_len, &new_value, &new_value_len) == FAILURE) {
- return;
- }
- old_value = zend_ini_string(varname, varname_len + 1, 0);
- /* copy to return here, because alter might free it! */
- if (old_value) {
- RETVAL_STRING(old_value, 1);
- } else {
- RETVAL_FALSE;
- }
- #define _CHECK_PATH(var, var_len, ini) php_ini_check_path(var, var_len, ini, sizeof(ini))
- /* open basedir check */
- if (PG(open_basedir)) {
- if (_CHECK_PATH(varname, varname_len, "error_log") ||
- _CHECK_PATH(varname, varname_len, "java.class.path") ||
- _CHECK_PATH(varname, varname_len, "java.home") ||
- _CHECK_PATH(varname, varname_len, "mail.log") ||
- _CHECK_PATH(varname, varname_len, "java.library.path") ||
- _CHECK_PATH(varname, varname_len, "vpopmail.directory")) {
- if (php_check_open_basedir(new_value TSRMLS_CC)) {
- zval_dtor(return_value);
- RETURN_FALSE;
- }
- }
- }
- if (zend_alter_ini_entry_ex(varname, varname_len + 1, new_value, new_value_len, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC) == FAILURE) {
- zval_dtor(return_value);
- RETURN_FALSE;
- }
- }
- /* }}} */
- /* {{{ proto void ini_restore(string varname)
- Restore the value of a configuration option specified by varname */
- PHP_FUNCTION(ini_restore)
- {
- char *varname;
- int varname_len;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &varname, &varname_len) == FAILURE) {
- return;
- }
- zend_restore_ini_entry(varname, varname_len+1, PHP_INI_STAGE_RUNTIME);
- }
- /* }}} */
- /* {{{ proto string set_include_path(string new_include_path)
- Sets the include_path configuration option */
- PHP_FUNCTION(set_include_path)
- {
- char *new_value;
- int new_value_len;
- char *old_value;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &new_value, &new_value_len) == FAILURE) {
- return;
- }
- old_value = zend_ini_string("include_path", sizeof("include_path"), 0);
- /* copy to return here, because alter might free it! */
- if (old_value) {
- RETVAL_STRING(old_value, 1);
- } else {
- RETVAL_FALSE;
- }
- if (zend_alter_ini_entry_ex("include_path", sizeof("include_path"), new_value, new_value_len, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC) == FAILURE) {
- zval_dtor(return_value);
- RETURN_FALSE;
- }
- }
- /* }}} */
- /* {{{ proto string get_include_path()
- Get the current include_path configuration option */
- PHP_FUNCTION(get_include_path)
- {
- char *str;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
- return;
- }
- str = zend_ini_string("include_path", sizeof("include_path"), 0);
- if (str == NULL) {
- RETURN_FALSE;
- }
- RETURN_STRING(str, 1);
- }
- /* }}} */
- /* {{{ proto void restore_include_path()
- Restore the value of the include_path configuration option */
- PHP_FUNCTION(restore_include_path)
- {
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
- return;
- }
- zend_restore_ini_entry("include_path", sizeof("include_path"), PHP_INI_STAGE_RUNTIME);
- }
- /* }}} */
- /* {{{ proto mixed print_r(mixed var [, bool return])
- Prints out or returns information about the specified variable */
- PHP_FUNCTION(print_r)
- {
- zval *var;
- zend_bool do_return = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|b", &var, &do_return) == FAILURE) {
- RETURN_FALSE;
- }
- if (do_return) {
- php_output_start_default(TSRMLS_C);
- }
- zend_print_zval_r(var, 0 TSRMLS_CC);
- if (do_return) {
- php_output_get_contents(return_value TSRMLS_CC);
- php_output_discard(TSRMLS_C);
- } else {
- RETURN_TRUE;
- }
- }
- /* }}} */
- /* {{{ proto int connection_aborted(void)
- Returns true if client disconnected */
- PHP_FUNCTION(connection_aborted)
- {
- RETURN_LONG(PG(connection_status) & PHP_CONNECTION_ABORTED);
- }
- /* }}} */
- /* {{{ proto int connection_status(void)
- Returns the connection status bitfield */
- PHP_FUNCTION(connection_status)
- {
- RETURN_LONG(PG(connection_status));
- }
- /* }}} */
- /* {{{ proto int ignore_user_abort([string value])
- Set whether we want to ignore a user abort event or not */
- PHP_FUNCTION(ignore_user_abort)
- {
- char *arg = NULL;
- int arg_len = 0;
- int old_setting;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &arg, &arg_len) == FAILURE) {
- return;
- }
- old_setting = PG(ignore_user_abort);
- if (arg) {
- zend_alter_ini_entry_ex("ignore_user_abort", sizeof("ignore_user_abort"), arg, arg_len, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
- }
- RETURN_LONG(old_setting);
- }
- /* }}} */
- #if HAVE_GETSERVBYNAME
- /* {{{ proto int getservbyname(string service, string protocol)
- Returns port associated with service. Protocol must be "tcp" or "udp" */
- PHP_FUNCTION(getservbyname)
- {
- char *name, *proto;
- int name_len, proto_len;
- struct servent *serv;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &name, &name_len, &proto, &proto_len) == FAILURE) {
- return;
- }
- /* empty string behaves like NULL on windows implementation of
- getservbyname. Let be portable instead. */
- #ifdef PHP_WIN32
- if (proto_len == 0) {
- RETURN_FALSE;
- }
- #endif
- serv = getservbyname(name, proto);
- if (serv == NULL) {
- RETURN_FALSE;
- }
- RETURN_LONG(ntohs(serv->s_port));
- }
- /* }}} */
- #endif
- #if HAVE_GETSERVBYPORT
- /* {{{ proto string getservbyport(int port, string protocol)
- Returns service name associated with port. Protocol must be "tcp" or "udp" */
- PHP_FUNCTION(getservbyport)
- {
- char *proto;
- int proto_len;
- long port;
- struct servent *serv;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &port, &proto, &proto_len) == FAILURE) {
- return;
- }
- serv = getservbyport(htons((unsigned short) port), proto);
- if (serv == NULL) {
- RETURN_FALSE;
- }
- RETURN_STRING(serv->s_name, 1);
- }
- /* }}} */
- #endif
- #if HAVE_GETPROTOBYNAME
- /* {{{ proto int getprotobyname(string name)
- Returns protocol number associated with name as per /etc/protocols */
- PHP_FUNCTION(getprotobyname)
- {
- char *name;
- int name_len;
- struct protoent *ent;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) {
- return;
- }
- ent = getprotobyname(name);
- if (ent == NULL) {
- RETURN_FALSE;
- }
- RETURN_LONG(ent->p_proto);
- }
- /* }}} */
- #endif
- #if HAVE_GETPROTOBYNUMBER
- /* {{{ proto string getprotobynumber(int proto)
- Returns protocol name associated with protocol number proto */
- PHP_FUNCTION(getprotobynumber)
- {
- long proto;
- struct protoent *ent;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &proto) == FAILURE) {
- return;
- }
- ent = getprotobynumber(proto);
- if (ent == NULL) {
- RETURN_FALSE;
- }
- RETURN_STRING(ent->p_name, 1);
- }
- /* }}} */
- #endif
- /* {{{ proto bool register_tick_function(string function_name [, mixed arg [, mixed ... ]])
- Registers a tick callback function */
- PHP_FUNCTION(register_tick_function)
- {
- user_tick_function_entry tick_fe;
- int i;
- char *function_name = NULL;
- tick_fe.calling = 0;
- tick_fe.arg_count = ZEND_NUM_ARGS();
- if (tick_fe.arg_count < 1) {
- WRONG_PARAM_COUNT;
- }
- tick_fe.arguments = (zval **) safe_emalloc(sizeof(zval *), tick_fe.arg_count, 0);
- if (zend_get_parameters_array(ht, tick_fe.arg_count, tick_fe.arguments) == FAILURE) {
- efree(tick_fe.arguments);
- RETURN_FALSE;
- }
- if (!zend_is_callable(tick_fe.arguments[0], 0, &function_name TSRMLS_CC)) {
- efree(tick_fe.arguments);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid tick callback '%s' passed", function_name);
- efree(function_name);
- RETURN_FALSE;
- } else if (function_name) {
- efree(function_name);
- }
- if (Z_TYPE_P(tick_fe.arguments[0]) != IS_ARRAY && Z_TYPE_P(tick_fe.arguments[0]) != IS_OBJECT) {
- convert_to_string_ex(&tick_fe.arguments[0]);
- }
- if (!BG(user_tick_functions)) {
- BG(user_tick_functions) = (zend_llist *) emalloc(sizeof(zend_llist));
- zend_llist_init(BG(user_tick_functions),
- sizeof(user_tick_function_entry),
- (llist_dtor_func_t) user_tick_function_dtor, 0);
- php_add_tick_function(run_user_tick_functions);
- }
- for (i = 0; i < tick_fe.arg_count; i++) {
- Z_ADDREF_P(tick_fe.arguments[i]);
- }
- zend_llist_add_element(BG(user_tick_functions), &tick_fe);
- RETURN_TRUE;
- }
- /* }}} */
- /* {{{ proto void unregister_tick_function(string function_name)
- Unregisters a tick callback function */
- PHP_FUNCTION(unregister_tick_function)
- {
- zval *function;
- user_tick_function_entry tick_fe;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/", &function) == FAILURE) {
- return;
- }
- if (!BG(user_tick_functions)) {
- return;
- }
- if (Z_TYPE_P(function) != IS_ARRAY && Z_TYPE_P(function) != IS_OBJECT) {
- convert_to_string(function);
- }
- tick_fe.arguments = (zval **) emalloc(sizeof(zval *));
- tick_fe.arguments[0] = function;
- tick_fe.arg_count = 1;
- zend_llist_del_element(BG(user_tick_functions), &tick_fe, (int (*)(void *, void *)) user_tick_function_compare);
- efree(tick_fe.arguments);
- }
- /* }}} */
- /* {{{ proto bool is_uploaded_file(string path)
- Check if file was created by rfc1867 upload */
- PHP_FUNCTION(is_uploaded_file)
- {
- char *path;
- int path_len;
- if (!SG(rfc1867_uploaded_files)) {
- RETURN_FALSE;
- }
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &path, &path_len) == FAILURE) {
- return;
- }
- if (zend_hash_exists(SG(rfc1867_uploaded_files), path, path_len + 1)) {
- RETURN_TRUE;
- } else {
- RETURN_FALSE;
- }
- }
- /* }}} */
- /* {{{ proto bool move_uploaded_file(string path, string new_path)
- Move a file if and only if it was created by an upload */
- PHP_FUNCTION(move_uploaded_file)
- {
- char *path, *new_path;
- int path_len, new_path_len;
- zend_bool successful = 0;
- #ifndef PHP_WIN32
- int oldmask; int ret;
- #endif
- if (!SG(rfc1867_uploaded_files)) {
- RETURN_FALSE;
- }
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sp", &path, &path_len, &new_path, &new_path_len) == FAILURE) {
- return;
- }
- if (!zend_hash_exists(SG(rfc1867_uploaded_files), path, path_len + 1)) {
- RETURN_FALSE;
- }
- if (php_check_open_basedir(new_path TSRMLS_CC)) {
- RETURN_FALSE;
- }
- if (VCWD_RENAME(path, new_path) == 0) {
- successful = 1;
- #ifndef PHP_WIN32
- oldmask = umask(077);
- umask(oldmask);
- ret = VCWD_CHMOD(new_path, 0666 & ~oldmask);
- if (ret == -1) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno));
- }
- #endif
- } else if (php_copy_file_ex(path, new_path, STREAM_DISABLE_OPEN_BASEDIR TSRMLS_CC) == SUCCESS) {
- VCWD_UNLINK(path);
- successful = 1;
- }
- if (successful) {
- zend_hash_del(SG(rfc1867_uploaded_files), path, path_len + 1);
- } else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to move '%s' to '%s'", path, new_path);
- }
- RETURN_BOOL(successful);
- }
- /* }}} */
- /* {{{ php_simple_ini_parser_cb
- */
- static void php_simple_ini_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callback_type, zval *arr TSRMLS_DC)
- {
- zval *element;
- switch (callback_type) {
- case ZEND_INI_PARSER_ENTRY:
- if (!arg2) {
- /* bare string - nothing to do */
- break;
- }
- ALLOC_ZVAL(element);
- MAKE_COPY_ZVAL(&arg2, element);
- zend_symtable_update(Z_ARRVAL_P(arr), Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) + 1, &element, sizeof(zval *), NULL);
- break;
- case ZEND_INI_PARSER_POP_ENTRY:
- {
- zval *hash, **find_hash;
- if (!arg2) {
- /* bare string - nothing to do */
- break;
- }
- if (!(Z_STRLEN_P(arg1) > 1 && Z_STRVAL_P(arg1)[0] == '0') && is_numeric_string(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1), NULL, NULL, 0) == IS_LONG) {
- ulong key = (ulong) zend_atol(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1));
- if (zend_hash_index_find(Z_ARRVAL_P(arr), key, (void **) &find_hash) == FAILURE) {
- ALLOC_ZVAL(hash);
- INIT_PZVAL(hash);
- array_init(hash);
- zend_hash_index_update(Z_ARRVAL_P(arr), key, &hash, sizeof(zval *), NULL);
- } else {
- hash = *find_hash;
- }
- } else {
- if (zend_hash_find(Z_ARRVAL_P(arr), Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) + 1, (void **) &find_hash) == FAILURE) {
- ALLOC_ZVAL(hash);
- INIT_PZVAL(hash);
- array_init(hash);
- zend_hash_update(Z_ARRVAL_P(arr), Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) + 1, &hash, sizeof(zval *), NULL);
- } else {
- hash = *find_hash;
- }
- }
- if (Z_TYPE_P(hash) != IS_ARRAY) {
- zval_dtor(hash);
- INIT_PZVAL(hash);
- array_init(hash);
- }
- ALLOC_ZVAL(element);
- MAKE_COPY_ZVAL(&arg2, element);
- if (!arg3 || (Z_TYPE_P(arg3) == IS_STRING && Z_STRLEN_P(arg3) == 0)) {
- add_next_index_zval(hash, element);
- } else {
- array_set_zval_key(Z_ARRVAL_P(hash), arg3, element);
- zval_ptr_dtor(&element);
- }
- }
- break;
- case ZEND_INI_PARSER_SECTION:
- break;
- }
- }
- /* }}} */
- /* {{{ php_ini_parser_cb_with_sections
- */
- static void php_ini_parser_cb_with_sections(zval *arg1, zval *arg2, zval *arg3, int callback_type, zval *arr TSRMLS_DC)
- {
- if (callback_type == ZEND_INI_PARSER_SECTION) {
- MAKE_STD_ZVAL(BG(active_ini_file_section));
- array_init(BG(active_ini_file_section));
- zend_symtable_update(Z_ARRVAL_P(arr), Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) + 1, &BG(active_ini_file_section), sizeof(zval *), NULL);
- } else if (arg2) {
- zval *active_arr;
- if (BG(active_ini_file_section)) {
- active_arr = BG(active_ini_file_section);
- } else {
- active_arr = arr;
- }
- php_simple_ini_parser_cb(arg1, arg2, arg3, callback_type, active_arr TSRMLS_CC);
- }
- }
- /* }}} */
- /* {{{ proto array parse_ini_file(string filename [, bool process_sections [, int scanner_mode]])
- Parse configuration file */
- PHP_FUNCTION(parse_ini_file)
- {
- char *filename = NULL;
- int filename_len = 0;
- zend_bool process_sections = 0;
- long scanner_mode = ZEND_INI_SCANNER_NORMAL;
- zend_file_handle fh;
- zend_ini_parser_cb_t ini_parser_cb;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|bl", &filename, &filename_len, &process_sections, &scanner_mode) == FAILURE) {
- RETURN_FALSE;
- }
- if (filename_len == 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Filename cannot be empty!");
- RETURN_FALSE;
- }
- /* Set callback function */
- if (process_sections) {
- BG(active_ini_file_section) = NULL;
- ini_parser_cb = (zend_ini_parser_cb_t) php_ini_parser_cb_with_sections;
- } else {
- ini_parser_cb = (zend_ini_parser_cb_t) php_simple_ini_parser_cb;
- }
- /* Setup filehandle */
- memset(&fh, 0, sizeof(fh));
- fh.filename = filename;
- fh.type = ZEND_HANDLE_FILENAME;
- array_init(return_value);
- if (zend_parse_ini_file(&fh, 0, scanner_mode, ini_parser_cb, return_value TSRMLS_CC) == FAILURE) {
- zend_hash_destroy(Z_ARRVAL_P(return_value));
- efree(Z_ARRVAL_P(return_value));
- RETURN_FALSE;
- }
- }
- /* }}} */
- /* {{{ proto array parse_ini_string(string ini_string [, bool process_sections [, int scanner_mode]])
- Parse configuration string */
- PHP_FUNCTION(parse_ini_string)
- {
- char *string = NULL, *str = NULL;
- int str_len = 0;
- zend_bool process_sections = 0;
- long scanner_mode = ZEND_INI_SCANNER_NORMAL;
- zend_ini_parser_cb_t ini_parser_cb;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|bl", &str, &str_len, &process_sections, &scanner_mode) == FAILURE) {
- RETURN_FALSE;
- }
- if (INT_MAX - str_len < ZEND_MMAP_AHEAD) {
- RETVAL_FALSE;
- }
- /* Set callback function */
- if (process_sections) {
- BG(active_ini_file_section) = NULL;
- ini_parser_cb = (zend_ini_parser_cb_t) php_ini_parser_cb_with_sections;
- } else {
- ini_parser_cb = (zend_ini_parser_cb_t) php_simple_ini_parser_cb;
- }
- /* Setup string */
- string = (char *) emalloc(str_len + ZEND_MMAP_AHEAD);
- memcpy(string, str, str_len);
- memset(string + str_len, 0, ZEND_MMAP_AHEAD);
- array_init(return_value);
- if (zend_parse_ini_string(string, 0, scanner_mode, ini_parser_cb, return_value TSRMLS_CC) == FAILURE) {
- zend_hash_destroy(Z_ARRVAL_P(return_value));
- efree(Z_ARRVAL_P(return_value));
- RETVAL_FALSE;
- }
- efree(string);
- }
- /* }}} */
- #if ZEND_DEBUG
- /* This function returns an array of ALL valid ini options with values and
- * is not the same as ini_get_all() which returns only registered ini options. Only useful for devs to debug php.ini scanner/parser! */
- PHP_FUNCTION(config_get_hash) /* {{{ */
- {
- HashTable *hash = php_ini_get_configuration_hash();
- array_init(return_value);
- zend_hash_apply_with_arguments(hash TSRMLS_CC, (apply_func_args_t) add_config_entry_cb, 1, return_value);
- }
- /* }}} */
- #endif
- #ifdef HAVE_GETLOADAVG
- /* {{{ proto array sys_getloadavg()
- */
- PHP_FUNCTION(sys_getloadavg)
- {
- double load[3];
- if (zend_parse_parameters_none() == FAILURE) {
- return;
- }
- if (getloadavg(load, 3) == -1) {
- RETURN_FALSE;
- } else {
- array_init(return_value);
- add_index_double(return_value, 0, load[0]);
- add_index_double(return_value, 1, load[1]);
- add_index_double(return_value, 2, load[2]);
- }
- }
- /* }}} */
- #endif
- /*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: fdm=marker
- * vim: noet sw=4 ts=4
- */
|