Re: [PHP-DEV][RFC][VOTE] Group Use Declarations
I like use Foo\Bar\(Baz, Qux); Appreciate your time. Netroby 2015-02-12 17:55 GMT+08:00 Ivan Enderlin @ Hoa : > Hi Marcio, > > Thanks for the RFC! > We discussed a little bit with the Hoa [1]'s and fruux [2]'s community and > we have a question. Why not pretending we have an array of symbols, > something like: > > use Foo\Bar\[Baz, Qux]; > > instead of > > use Foo\Bar\{Baz, Qux}; > > This is a list vs. block debate. While I personally would go for `{` and > `}`, here we declare a list, so we guess the array syntax would be more > tailored. > > Thoughts? > > > [1] http://hoa-project.net/ > [2] https://fruux.com/ and http://sabre.io/ > > On 11/02/15 21:50, Marcio Almada wrote: >> >> Hi internals! >> >> Since no new discussion topics appeared, the voting on the Group Use >> Declarations RFC for PHP7 is now open: >> >> RFC: https://wiki.php.net/rfc/group_use_declarations#votes >> Patch: https://github.com/php/php-src/pull/1005 >> >> As requested I've split the vote into two slightly different syntax >> choices, so be sure to pick the right choice if you are going to vote yes. >> The voting will close in exactly 14 days counting from now. >> >> PS: Aknowledgements to Daniel Ackroyd for reviewing this RFC. >> >> Márcio Almada >> https://github.com/marcioAlmada >> > > -- > Ivan Enderlin > Developer of Hoa > http://hoa-project.net/ > > PhD. computer scientist > Hacker > http://mnt.io/ > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV][RFC][VOTE] Group Use Declarations
For Human type experience, {} is harder than () to type, see your keyboard, can you easier type {} or easier type () I hate {} If you like to use {} as the group symbols, i would not like it. It hurts my fingers. Appreciate your time. Netroby 2015-02-12 17:55 GMT+08:00 Ivan Enderlin @ Hoa : > Hi Marcio, > > Thanks for the RFC! > We discussed a little bit with the Hoa [1]'s and fruux [2]'s community and > we have a question. Why not pretending we have an array of symbols, > something like: > > use Foo\Bar\[Baz, Qux]; > > instead of > > use Foo\Bar\{Baz, Qux}; > > This is a list vs. block debate. While I personally would go for `{` and > `}`, here we declare a list, so we guess the array syntax would be more > tailored. > > Thoughts? > > > [1] http://hoa-project.net/ > [2] https://fruux.com/ and http://sabre.io/ > > On 11/02/15 21:50, Marcio Almada wrote: >> >> Hi internals! >> >> Since no new discussion topics appeared, the voting on the Group Use >> Declarations RFC for PHP7 is now open: >> >> RFC: https://wiki.php.net/rfc/group_use_declarations#votes >> Patch: https://github.com/php/php-src/pull/1005 >> >> As requested I've split the vote into two slightly different syntax >> choices, so be sure to pick the right choice if you are going to vote yes. >> The voting will close in exactly 14 days counting from now. >> >> PS: Aknowledgements to Daniel Ackroyd for reviewing this RFC. >> >> Márcio Almada >> https://github.com/marcioAlmada >> > > -- > Ivan Enderlin > Developer of Hoa > http://hoa-project.net/ > > PhD. computer scientist > Hacker > http://mnt.io/ > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [VOTE] Big Integer Support
The time range is Chinese lunar new year. I am not sure @laruence and @reeze be on holidays or not. The vote time range can be extended ? I have no the ability to vote. but i guess this RFC is very well for PHP programmers. Appreciate your time. Netroby -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [VOTE] Big Integer Support
I do not know their plan. but in china, we will happy in our holiday till 2015.03.05 (The last important holiday The Lantern Festival ) then we will back to work. This is traditional chinese holidays. Learn mandarin should be fun, welcome you guys come to china . It's now our very important holidays, every where we should be happy than normal days. But if you hurry and care about the votes. you would not be waiting for so long time. that's not very important. Appreciate your time. -------- Netroby 2015-02-15 12:04 GMT+08:00 Andrea Faulds : > Hi Netroby, > >> On 15 Feb 2015, at 04:00, Netroby wrote: >> >> The time range is Chinese lunar new year. > > Oh! My bad, I was unaware of that. (I really should’ve noticed that, given I > am learning Mandarin.) > > When do festivities etc. end? What would be a good time to extend it to? > > Thanks! > > -- > Andrea Faulds > http://ajf.me/ > > > > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] I quit.
I am not the core developer of PHP, but I am keeping watch the develop list for long times. Andrea Faulds, actively contributes the PHP core. but it's hard to implement your dream here. So sad I feel. Say no is easier, but do things is hard. the dissenting voices makes things harder and harder. Please do not just say no, no no. Please gave you advice. If you think not right. Please gave us a guide, a tips, a better solution. You just say no, and onto the contribute from who kind heart to help the community. Just uses less. You will push everyone out of the game. Andrea Faulds is one of the very good coder , even she is a beauty girl. Push her out now completely Now you guys feel better, the world got peace? I feel very sad, because the PHP lost a good contributor -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] I quit.
May be leave for a while can let she happier than before. Do not censure her -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [VOTE] Scalar Type Hints
We do not have Scalar type hints for years. we code in php for years without any type check. it's ok. not the primary things. Look at other dynamic programming language, they may not have the type check either. It is ok, and it is fine. Besides php, there be always other choice. If you really really need type check now. Take a look HHVM. I guest hacklang will match your need. If the PHP keep current states, my code will running till the earth dead. It works like a ancient rock. What ever , i just care my code work or not. Appreciate your time. Netroby 2015-02-16 15:30 GMT+08:00 Pascal MARTIN, AFUP : > > Le 05/02/2015 21:14, Andrea Faulds a écrit : >> >> Voting starts today (2015-02-05) and ends in two weeks’ time (2015-02-19). >> In addition to the vote on the main RFC, there is also a vote on the type >> aliases issue, and a vote to reserve the type names for future RFCs’ sake if >> this RFC fails. >> >> The RFC can be found here, and it contains a voting widget: >> https://wiki.php.net/rfc/scalar_type_hints >> > > Hi, > > Even if this RFC has been withdrawn, I'm posting this here, hoping it might > prove useful if someone ever tries to revive it. > > We've discussed this RFC quite a bit with other members of AFUP, and finally > ended on the +1 side. > > Basically, adding type-hinting for scalars goes towards a PHP that is a bit > more "strict" -- which seems like a good thing for us. But, at the same > time, the "weak" mode by default means users can choose to go that way at > their own pace and existing code will keep working, even if calling "strict" > libraries. > > The biggest concern we've had is the declare() syntax that feels a bit weird > at first. But that's not enough of a concern for us to be -1 on the RFC as a > whole. > > Thanks! > > -- > Pascal MARTIN, AFUP - French UG > http://php-internals.afup.org/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP JIT or AOT
I guess we can gave a try. PHP 7 is fine well enough. let's working hard to make it published. The talk about other things should be early . let's see PHP 7 released and see how it will change our world. Code it , ship it. Let's see the result. Appreciate your time. -------- Netroby 2015-02-16 15:32 GMT+08:00 Dmitry Stogov : > On Mon, Feb 16, 2015 at 10:16 AM, Joe Watkins wrote: > >> Morning, >> >> I'm not sure where this conversation started ... >> > > it's a fork from "Salar Type Hints"... > > >> >> > where in non-strict mode you still need >> > to generation runtime conversion logic. That runtime conversion logic >> > then requires the ability to hook into Zend's error handling >> > mechanism, vastly complicating the generated code (and the generating >> > code). >> >> Why do you need to generate conversion logic, why can't you call Zend API >> functions ? >> > > Even VM just calls a conversion function. > > Alternatively, possibly preferably, wouldn't a guard to tell if the >> function is being called in strict mode >> be a good idea here ? >> > > If we know what function is called in strict mode, we must already know > where it's called from, so we should also know the types of passed > arguments, then we may eliminate checks at all (independently on > strictness). If we don't know the types we will need to check them anyway. > > >> If the generated code is really complicated and that sucks away the >> performance >> then why not just avoid it, and only enter machine code when a function is >> called in strict mode ? >> >> I see the assembly generated by your JIT, but it doesn't really tell us >> much, it tells us a little, >> what would be really useful is seeing your research, with the >> understanding that it is just research. >> Please think about that again. >> > > Yeah, we will need to open it, even if it doesn't make gain for real life. > but lets make all the PHP7 related work first. > I would be glad, if later we'll combine our experience and work on JIT/AOT > together. > > Thanks. Dmitry. > > >> >> Cheers >> Joe >> >> On Mon, Feb 16, 2015 at 6:59 AM, Dmitry Stogov wrote: >> >>> On Mon, Feb 16, 2015 at 12:45 AM, Anthony Ferrara >>> wrote: >>> >>> > Dmitry, >>> > >>> > On Sun, Feb 15, 2015 at 1:43 PM, Dmitry Stogov wrote: >>> > > Hi Anthony, >>> > > >>> > > If you are working on JIT, you should understand that declare() >>> switch to >>> > > strict typing can't improve anything, because it works on caller side >>> > and in >>> > > each function you now will have to generate code for both weak and >>> strict >>> > > checks. >>> > >>> > Well, if you know the destination function at compile time, you don't >>> > need to generate generic code. you can generate a direct dispatch >>> > (asm-level function call). >>> >>> >>> Right, but in real life app you almost never know what function or method >>> you are really call. At function you also can't be sure that it always >>> called with proper arguments. This work well only for plain function >>> placed >>> into a single PHP file. >>> >>> >>> > In this case, strict lets you push type >>> > checks back to compile time, where in non-strict mode you still need >>> > to generation runtime conversion logic. That runtime conversion logic >>> > then requires the ability to hook into Zend's error handling >>> > mechanism, vastly complicating the generated code (and the generating >>> > code). >>> > >>> >>> For cases when you know the called function and all passed and expected >>> types, it's possible to use more efficient calling convention passing real >>> arguments in CPU registers. >>> >>> The type checks in PHP7 is quite cheap (2-3 CPU instructions). Strict or >>> weak check doesn't make any difference for "fast path" (the same 2-3 >>> instructions). The slow patch for weak checks is going to be a bit more >>> expensive. >>> >>> >>> > >>> > In fact, the research I have been doing is precisely around that >>> > (where I know for a fact that all remaining function calls are going >>> >
Re: [PHP-DEV] [RFC][PRE-VOTE] In Operator
Does the "in" support this kind of php code ? ```php https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in Appreciate your time. -------- Netroby 2015-03-16 10:50 GMT+08:00 Eli : > On 3/14/15 10:34 PM, Stanislav Malyshev wrote: > > Hi! > > I'd like to announce that I'll open the vote for the in operator later that > day. > You can find the RFC here: https://wiki.php.net/rfc/in_operator > > I think this operator is unnecessary - we already have perfectly good > function that does the same. > > > Hello Stas ... a quick question for you: I understand why you said you > don't feel it's necessary. (Of course, there are millions of features we > have that aren't necessary, *grin*) > > But I'd like to know from your POV: Does this harm anything? > > Because from my own POV: I see some great benefits of this feature, and my > first thoughts were 'oooh'. The reasons mostly fall around cognitive > dissonance. Two cases in particular: > > 1. > > I feel that this syntax being proposed, much better matches the way that we > think through a problem in the first place. You don't have to take a 'step > back' when coding to refactor your thought process into a function. So if > I'm thinking about a problem I'm thinking (and typing as I go:) > > If we have a zebra in our zoo ... then do X > > I can now with this syntax, write code that directly matches the cognitive > process: > > if ($zebra in $zoo) {} > > Currently, I can speak for myself, I almost always find myself doing a > 'backup' step in coding. Because in this situation my process becomes: > > if ($zebra ... Oh wait, can't do that, need to use in_array > > if (in_array( ... Oh wait, what's the order of parameters again? dang it, > hit php.net or find a recent use. > > if (in_array($zebra,$zoo)) {} ... *shew* > > In the end, yes, you can argue that this is a small thing. But I believe > that the simpler cognitive path that one follows with this new syntax will > bring some great benefit to coders. > > 2. > > Well it's really the same situation. But just that I'm very often dealing > with people 'new or newer to the language'. Professionally training them, > or Unofficial Training, mentoring, helping out ... seeing people at > conferences and talking with them, etc. > > And the newer people to the language often get tripped up on exactly these > kinds of things. Lowering that cognitive barrier to translating one's > thought, to code. I feel is going to be a benefit here. > > ... > > So back to my original question. I respect your opinion, so I'd like to > understand more. Is this just truly a case of "Eh, we have a function > already, this isn't necessary"? Or is there some actual harm you see > caused by it? > > Thanks Stas! > Eli > > -- > | Eli White | http://eliw.com/ | Twitter: EliW | -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Proposal to delay 7.0 timeline
Please do not delay. Any one remember PHP 6 ? Delay is bad smell. means the project will failure. PHP 7 already had much more features. That's fine . Just ship it . Appreciate your time. Netroby 2015-03-22 4:09 GMT+08:00 Benoit Schildknecht : > Le Sat, 21 Mar 2015 18:44:23 +0100, Pierre Joye a > écrit: > > >> On Mar 21, 2015 11:55 PM, "Zeev Suraski" wrote: >>> >>> >>> >>> >>> Sent from my mobile >>> >>> > On 21 במרץ 2015, at 18:05, Rasmus Lerdorf wrote: >>> > >>> >> On 03/21/2015 08:52 AM, François Laupretre wrote: >>> >> Now, after more calls from many of you to delay it, and as Zeev >>> >> himself >>> >> seemed to consider it as more acceptable, I am proposing again to >> >> delay 7.0 >>> >>> >> feature freeze to May, 15 (2 month delay, date where vote is >> >> starting). I >>> >>> >> won’t repeat all the arguments of my previous posts but, to summarize, >> >> it >>> >>> >> would allow to include important features, making it a ‘real’ major >> >> version. >>> >>> >> Releasing a major version is not just a question of BC break, we also >> >> need >>> >>> >> to think about what we put forward. So, we need features. We already >> >> have >>> >>> >> STH, but we can do more (I personally have at least 4 RFCs I didn’t >> >> have >>> >>> >> time for, including scalar pseudo-methods, which can be an important >>> >> feature). >>> > >>> > No, please, let's get what we have stabilized and out the door. There >>> > are always more things to do and we can delay things indefinitely. And >>> > I >>> > completely disagree that this isn't a 'real' major version. >>> >>> +1 >> >> >> Same. >> >>> Zeev > > > Same here, very bad idea > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] [Do not set if using PDO_MySQL ], Does this still can not set for PHP 5.6.7 ?
mysqlnd.fetch_data_copy long Enforce copying result sets from the internal result set buffers into PHP variables instead of using the default reference and copy-on-write logic. Please, see the memory management implementation notes for further details. Copying result sets instead of having PHP variables reference them allows releasing the memory occupied for the PHP variables earlier. Depending on the user API code, the actual database quries and the size of their result sets this may reduce the memory footprint of mysqlnd. Do not set if using PDO_MySQL. PDO_MySQL has not yet been updated to support the new fetch mode. Appreciate your time. Netroby -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] The most efficicient way to pick key,value from a large array
Now, we have a large array, contains user profile. [uid, username, password, email, qq, msn, skype, address, zipcode, telphone, mobile...] We need to pick information from this big array, and we know the key we want to pick. What's the efficient way ? Is there any function like $pending_pick_key1 = [uid, username]; array_pick($origin_array, $pending_pick_key1); //return array contains [uid, username] $pending_pick_key2 = [username, password]; array_pick($origin_array, $pending_pick_key2); //return array contains [username, password] we current using array_filter and pass function into it to do this job. But it's not fast as we test. Any other ideas beside array_filter? Or we have to implement an php extension to do this job ? Sorry for trouble you. need your help. Appreciate your time. -------- Netroby -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [RFC] Integrating Zend Optimizer+ into the PHP distribution
On 2013/1/29 16:38, Laruence wrote: On Tue, Jan 29, 2013 at 4:33 PM, Ivan Enderlin @ Hoa wrote: On 29/01/13 09:30, Zeev Suraski wrote: [snip] (My guess is that it will show WP being slower and with a more dramatic improvement.) By the way, I just realized the % gain wasn't all that self-explanatory - it's vs. APC, not vs. plain PHP. I improved the doc to reflect both gains vs. plain PHP and vs. APC. It's better now ;-). Thank you for the contribution. It's a great news! Can APC and Optimizer+ work in duo or share some features? If O+ became opensource, I think it can be done by lots contributors.. :) thanks -- Ivan Enderlin Developer of Hoa http://hoa-project.net/ PhD. student at DISC/Femto-ST (Vesontio) and INRIA (Cassis) http://disc.univ-fcomte.fr/ and http://www.inria.fr/ Member of HTML and WebApps Working Group of W3C http://w3.org/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php Good news, if Optimizer+ will be integrated to PHP, that's amazing improvement. I vote: Integrate Optimizer+ intoPHP5.5.0, allow up to 2 months delay why we could waiting ? because PHP 5.4 is stable for production environment. we could wait for more bit long time. the big improvement is better than fast release. we do not need release for release. no sense. why not take us some surprise. -- Appreciate your time. ---- Netroby
Re: [PHP-DEV] ZTS - why are you using it?
On 2013/1/29 17:03, Zeev Suraski wrote: I didn’t want to hijack the Optimizer+ thread so I’m creating a new one, based on the apparent level of interest in ZTS. This isn’t an RFC to remove ZTS by any stretch, but I **am** a bit confused about why people are still using ZTS. A bit of background. I started the ZTS project (based on initial work by Shane Caraveo more than a decade ago), and invested countless hours in pushing it all throughout PHP. So I really hold absolutely no grudge against it, quite the contrary… However, many years ago, I came to the conclusion that it was a bit of a lost cause trying to weed out all the thread safety issues from everywhere – and that a simpler, more elegant solution exists in the form of FastCGI. Which brings me to the subject of this mail – why are you using ZTS PHP instead of single threaded PHP? The reasons not to use it are few but fairly major – it’s significantly slower than the non-ZTS PHP, and it’s significantly less robust in the sense that a single bug somewhere can bring down an entire server (or at least a bunch of many different threads). What are your reasons to choose it over FastCGI? Zeev Old behavior not easily to be changed. let it as it be, all of us like to keep on old behavior as it was. should put banner on php.net, say: do not using ZTS, that's old way. -- Appreciate your time. Netroby -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Why PHP 7 yield from still single thread and blocking thread?
As the RFC said. https://wiki.php.net/rfc/generator-delegation The defining feature of Generator functions is their support for suspending execution for later resumption. This capability gives applications a mechanism to implement asynchronous and concurrent architectures even in a traditionally single-threaded language like PHP. With simple userland task scheduling systems interleaved generators become lightweight threads of execution for concurrent processing tasks. I wrote a small test. to see if it really concurrent processing any tasks. the result looks bad. Still single blocking thread. http://docs.hhvm.com/hack/async/introduction HHVM async described well . Appreciate your time. Netroby -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] How to foreach each function and execute functions of an object.
I am trying to modify yaf extension. i try to write code to foreach functions of an object and try to execute them. but i got segment fault. i have no idea where i was wrong. I want to implement ```php foreach ($funcName in $obj) { call_user_func([$obj, $funcName]); } ``` my code snippet was here ``` /** {{{ proto public Yaf_Application::bootstrap(void) */ PHP_METHOD(yaf_application, bootstrap) { zend_string *bootstrap_path; uint retval = 1; zend_class_entry *ce; yaf_application_t *self = getThis(); zval bootstrap; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &bootstrap, yaf_bootstrap_ce) == FAILURE) { if (!(ce = zend_hash_str_find_ptr(EG(class_table), YAF_DEFAULT_BOOTSTRAP_LOWER, sizeof(YAF_DEFAULT_BOOTSTRAP_LOWER) - 1))) { if (YAF_G(bootstrap)) { bootstrap_path = zend_string_copy(YAF_G(bootstrap)); } else { bootstrap_path = strpprintf(0, "%s%c%s.%s", ZSTR_VAL(YAF_G(directory)), DEFAULT_SLASH, YAF_DEFAULT_BOOTSTRAP, ZSTR_VAL(YAF_G(ext))); } if (!yaf_loader_import(bootstrap_path, 0)) { php_error_docref(NULL, E_WARNING, "Couldn't find bootstrap file %s", ZSTR_VAL(bootstrap_path)); retval = 0; } else if (UNEXPECTED((ce = zend_hash_str_find_ptr(EG(class_table), YAF_DEFAULT_BOOTSTRAP_LOWER, sizeof(YAF_DEFAULT_BOOTSTRAP_LOWER) - 1)) == NULL)) { php_error_docref(NULL, E_WARNING, "Couldn't find class %s in %s", YAF_DEFAULT_BOOTSTRAP, ZSTR_VAL(bootstrap_path)); retval = 0; } else if (UNEXPECTED(!instanceof_function(ce, yaf_bootstrap_ce))) { php_error_docref(NULL, E_WARNING, "Expect a %s instance, %s give", ZSTR_VAL(yaf_bootstrap_ce->name), ZSTR_VAL(ce->name)); retval = 0; } zend_string_release(bootstrap_path); } if (UNEXPECTED(!retval)) { RETURN_FALSE; } else { zend_string *func; yaf_dispatcher_t *dispatcher; object_init_ex(&bootstrap, ce); dispatcher = zend_read_property(yaf_application_ce, self, ZEND_STRL(YAF_APPLICATION_PROPERTY_NAME_DISPATCHER), 1, NULL); ZEND_HASH_FOREACH_STR_KEY(&(ce->function_table), func) { /* cann't use ZEND_STRL in strncasecmp, it cause a compile failed in VS2009 */ if (strncasecmp(ZSTR_VAL(func), YAF_BOOTSTRAP_INITFUNC_PREFIX, sizeof(YAF_BOOTSTRAP_INITFUNC_PREFIX) - 1)) { continue; } zend_call_method(&bootstrap, ce, NULL, ZSTR_VAL(func), ZSTR_LEN(func), NULL, 1, dispatcher, NULL); /** an uncaught exception threw in function call */ if (UNEXPECTED(EG(exception))) { zval_ptr_dtor(&bootstrap); RETURN_FALSE; } } ZEND_HASH_FOREACH_END(); zval_ptr_dtor(&bootstrap); } } else { // my code start here zend_string *func; yaf_dispatcher_t *dispatcher; zval *funcval; ce = Z_OBJCE_P(&bootstrap); dispatcher = zend_read_property(yaf_application_ce, self, ZEND_STRL(YAF_APPLICATION_PROPERTY_NAME_DISPATCHER), 1, NULL); ZEND_HASH_FOREACH_STR_KEY(&(ce->function_table), func) { /* cann't use ZEND_STRL in strncasecmp, it cause a compile failed in VS2009 */ if (strncasecmp(ZSTR_VAL(func), YAF_BOOTSTRAP_INITFUNC_PREFIX, sizeof(YAF_BOOTSTRAP_INITFUNC_PREFIX) - 1)) { continue; } ZVAL_STRING(funcval, &func); call_user_function(&(ce)->function_table, &bootstrap, funcval, NULL, 0, NULL); /** an uncaught exception threw in function call */ if (UNEXPECTED(EG(exception))) { zval_ptr_dtor(&bootstrap); RETURN_FALSE; } } ZEND_HASH_FOREACH_END(); zval_ptr_dtor(&bootstrap); } //my code end RETURN_ZVAL(self, 1, 0); } /* }}} */ ``` I put it on github https://gist.github.com/netroby/1fce94f023a9a45c28be0881e8429e48 And the gdb report like ``` gdb /usr/bin/php huzhifeng@devdocker ~ $ gdb /usr/bin/php GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/bin/php...(no debugging symbols found)...done. (gdb) source ./workspace/php-src/.gdbinit (gdb) run workspace/yaf-framework/public/cli.php Starting program: /usr/bin/php workspace/yaf-framework/public/cli.php [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x7fffee9010b5 in zim_yaf_application_bootstrap (execute_data=, return_value=0x73813260) at /home/huzhifeng/workspace/yaf/yaf_appl