Re: [PHP-DEV] Is this what Stefan Esser was referring to ...?
> It's a bit of an edge case. I don't think I ever really considered CSS > as being part of the PHP source code, but I suppose technically it is. > Like I previously stated. The phpSecInfo program does not only steal PHP code and uses PHP in it's name, it also steals the layout of phpinfo, including the PHP.net logo+link. This is actually no suprise. The marketing consortium aka. PHP Security Consortium does everything to look endorsed by PHP.net. They also stole the PHP.net favicon for phpsec.org And the only reason noone goes against this is because these people are friends of the members of the PHP group. Stefan Esser -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] PHP 4 Bug Summary Report
PHP 4 Bug Database summary - http://bugs.php.net Num Status Summary (623 total including feature requests) ===[Apache2 related]== 38670 Open Whole 4.4.x branch has problem with open_basedir option nested from Apache2 38915 Open mod_php: system() (and similar) don't cleanup opened handles of Apache ===[Arrays related]=== 31114 Assigned foreach modify array (works with PHP 5.1) 37451 Open array_multisort fails to trigger by val copy of data (works in PHP 5.1) 39764 Suspended array_key_exists inconsistent behavior ===[CGI related]== 38476 Open PATH_INFO, ORIG_PATH_INFO, and PHP_SELF not set in Lighttpd1.4.11/PHP4.4.3 ===[Class/Object related]= 39254 Open Refcount error with static variables and object references (PHP4 only) 39681 Open this assignment outside class breaks static function call (PHP4 only) ===[COM related]== 37899 Assigned [PATCH] php_char_to _OLECHAR copies junk bytes ===[Documentation problem] 29045 Suspended gzopen for URL 36663 Open unexpected difference between "zlib.output_compression" and "ob_gzhandler" 37009 Open I got wrong letter Å and å ! 37901 Verified Unable to find the wrapper "file" 39874 Open gztell returns incorrect file pointer number 39894 Open IniFilePath and PHPRC ===[EXIF related]= 39617 Assigned Erroneously uses the GPS version tag to determine byte order of GPS fields ===[FDF related]== 34811 Assigned fdf_get_value max size ===[Feature/Change Request]=== 3066 Open Parameter for dns functions to select different DNS 3799 Suspended default_charset brings small incompatibility 3830 Open Function to timeout/break off a function 5007 Analyzed enable no-resolve mode for here docs 5169 Open Missing recursive behavior 5311 Analyzed implement checkdnsrr() and getmxrr() on windows 5575 Open open_basedir to ~ 5601 Analyzed @function() should not turn of error reporting for critical errors 5748 Assigned use 'App Paths' registry key to specify path for supporting dlls 5804 Open parser error if any spaces follow indentifier in with here doc syntax 5883 Assigned --enable-trans-sid modification request 5954 Open Informix can't reliably figure if a text result column is NULL 5975 Open version of strip_tags() that specifies tags to strip (instead of tags to keep) 6118 Open Can not supress runtime warnings on foreach 6268 Open ternary op return only by value 6399 Open checkdate should be able to validate a time as well as a date (timestamp) 6427 Open func_get_arg() does not support references 6503 Open no support for multiple resultset query? 6512 Analyzed sort() Does not sort stings as expected 6574 Open SMTP functions via IMAP c-client library 6680 Open regexps (ereg*) ignores locale settings 6771 Assigned Import LIB files needed in Win32 distribution 6911 Open Problem with array_merge(_recursive) 6927 Suspended 6932 Open Filesize / File_exists and include_path 6993 Open uninstalling is a pain in the ass 7006 Open preg_replace ( string pattern, array replacement, string subject ); 7028 Analyzed xml=shared and wddx do not work together 7132 Assigned fsockopen doesn't report dns lookup failure 7398 Open Stored procedure error return values not passed through 7507 Open Better ODBC error reporting/fetching 7541 Open please consider also support HPUX shl_* 7553 Open RFC: Uplevel Block structure 7559 Open zend_hash_get_current_key_ex returning persistent strings 7578 Open next() and current() do not return referenceing arrays 7808 Open variable value triggerd by function 7923 Analyzed htmlentities doesn't work for ISO 8859-2 7930 Open List() constructor reference assignment 8100 Assigned extract(), extra feature 8108 Analyzed implement trans-sid as output handler 8295 Open absolute path in extension= directive in php.ini not recognized 8395 Open register_shutdown_function() error 8397 Open Multi-results sets are not suppported 8427 Analyzed Unwanted references 8428 Open continue doesn't pass thru a switch statement 8595 Open More effective parsing of list() (+other) 8640 Open enumeration type 8685 Open heredoc: remove column 1 closing identifier requirement 8809 Open Cookieless session with Header redirects 8827 Open PHP_AUTH_PW stores password when using External Authentica
[PHP-DEV] PHP 5 Bug Summary Report
PHP 5 Bug Database summary - http://bugs.php.net Num Status Summary (618 total including feature requests) ===[*Compile Issues]== 39372 Suspended Incompatibility in the PHP API. ===[*Configuration Issues] 37919 Open PHP doesn't read the configurations propertly ===[*Directory/Filesystem functions] 39351 Open require and include fails to open file in current directory 40141 Feedback open_basedir vs. tmpfile() ===[Apache2 related]== 32220 Assigned [PATCH] thread_resources for thread not getting freed when apache kills thread 38141 Suspended $_SERVER['SCRIPT_NAME'] set incorrectly with mod_rewrite 39330 Assigned apache2handler does not call shutdown actions before apache child die 39484 Open intermittent include failure under symlinked virtual hosts ===[Arrays related]=== 35163 Assigned Array elements can lose references. ===[Bzip2 Related] 29521 Verified compress.bzip2 wrapper ===[CGI related]== 28227 Assigned PHP CGI depends upon non-standard SCRIPT_FILENAME 31892 Verified PHP_SELF incorrect without cgi.fix_pathinfo, but turning on screws up PATH_INFO ===[Class/Object related]= 36694 Assigned unserialize method is not called on an object when session is restored 40159 Feedback Cannot access protected property ===[COM related]== 31327 Assigned chinese char and word problem 32099 Assigned After opening ADO connection and closing it repeatedly, Apache stops service 33188 Assigned Cannot instantiate a DOTNET object 34253 Assigned COM binary object/array issue (question marks?) 34564 Assigned reference (in/out) parameters don't work 35872 Assigned CLI errors upon exit if class is left on IE 35875 Assigned IE event failure upon scheduling script 36360 Assigned PHP crashes when accessing an object that was just create by parent object 36959 Open ReadRecords Method (Crystal Reports XI) Hangs 37562 Open Unable to lookup "ParameterFieldDefinitions" 37927 Assigned newwindow2 & newwindow 37965 Assigned Multi-dimensional array between PHP and COM 38021 Open Uncaught exception 'com_exception' 38719 Assigned COM Error during accessing function VirtualMachines 39930 Open Error passing Word macro arguments ===[Compile Failure]== 37462 Open install fails for sapi/cgi/php 37610 Assigned win32build has incorrect expat, PHP non-buildable 38762 Assigned build dir != src dir results in "Zend/zend_language_parser.c: No such file" 39975 Assigned Some error in C/C++ syntax ===[Compile Warning]== 38515 Suspended Warnings during compile 38702 Assigned Getting odbc warnings during compilations ===[Date/time related] 37358 Assigned date_sunrise() date_sunset() handle main zone offset but not count summer time 39139 Assigned Last month bug 39965 Assigned Latitude and longitude are backwards in date-sun-info 40037 Assigned Incorrect output from strtotime, when timestr is used with a relative term this 40100 Assigned strtotime() first occurance of weekday returns wrong date ===[dBase related] 33285 Verified dbase functions return garbage on certain file ===[Directory function related]=== 35691 Assigned Can't change to another drive letter using chdir() 40163 Feedback UNC Path not working ===[Documentation problem] 35261 Open php_admin_value does not lock include_path 35936 Verified ini.zlib.output-compression Documentation 36018 Open variable variable reference to superglobal only works after non-variable ref 36109 Open socket_sendto throws error 36450 Assigned DECIMAL and TEXT field Crash 36454 Open Destructor, include/require and path with "./" 36705 Open Location header results in duplicate Status header ([f]cgi only) 36711 Open Document detect_unicode and mention that __halt_compiler doesn't affect it 36847 Open debug_backtrace() result is not unset and eats memory 36956 Open dirname returns \ for root / 36971 Open unset() no longer works on $this in PHP5 37047 Verified static executes after return 37124 Open PostgreSQL Query Returns Resource id for Field Value 37273 Open Symlinks and session handler allow open_basedir bypass 375
Re: [PHP-DEV] allow_url_fopen / allow_url_include and fine grained control
Hmm. Yes. I see. Moot indeed. On 22/01/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Tue, January 16, 2007 7:07 pm, Sara Golemon wrote: > allow_url_fopen and allow_url_include continue to accept boolean flags > in order to behave just as they do now: true/on allows anything, > false/off allows only those wrappers without the is_url bit set. +1, fwiw. As far as the "user" being able to implement something otherwise dis-allowed... Well, yeah, they could. I'm not sure who would really turn off an internal wrapper, then turn on "user" then be upset that somebody coded a work-around for a blocked internal wrapper... I mean, that just seems like an unlikely real-world sequence of events, in any decent work-place... I suppose if it's the case of malicious code getting executed, there'd be a point, but really, once you have arbitrary malicious PHP code getting executed on your box, it's kind of moot if they can then download more PHP code to execute, isn't it?... -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- - Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!" -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Possible Upload Bug
Hello I've discovered something that seems to be a bug. Not sure which one is the cause (the PHP processor or the browser), but here it is the description. I've created a form with enctype=multipart/form-data and of course a file input field. Now everything seem to work fine until I try to upload a certain PDF document, when the script that processes the upload shows me an empty $_FILES array. I have tried uploading other PDF files and without anything weird happening. I am not very sure that I am allowed to attach files when using this mailing list, so if someone can take a look at this problem I will send him/her this specific file. Other details related to the system where I have tested Server: Apache/2.0.55 PHP: PHP 5.1.6 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.1) Gecko/00 Firefox/2.0.0.1 (Ubuntu-edgy) Sergiu -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] COM extension defects: defect 39930
Hi Internals As promised back in December I have now found some time to look at the COM defects to help reduce the backlog. I have now investigated the first of these; http://bugs.php.net/bug.php?id=39930 and have updated the defect with my findings. In this case I believe the defect is in Word rather than PHP or the COM extension. Can someone with enough karma please take a look at my comments and if they are OK return the defect as "bogus". Many thanks. Regards Andy Andy Wharmby IBM United Kingdom Limited Winchester, England SO21 2JN E-mail: [EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: COM extension defects: defect 39930
Thanks Andy! I've updated the bug report. --Wez. On 1/22/07, Andy Wharmby <[EMAIL PROTECTED]> wrote: Hi Internals As promised back in December I have now found some time to look at the COM defects to help reduce the backlog. I have now investigated the first of these; http://bugs.php.net/bug.php?id=39930 and have updated the defect with my findings. In this case I believe the defect is in Word rather than PHP or the COM extension. Can someone with enough karma please take a look at my comments and if they are OK return the defect as "bogus". Many thanks. Regards Andy Andy Wharmby IBM United Kingdom Limited Winchester, England SO21 2JN E-mail: [EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Diagnosing bug
Hi, I have been trying to track down a potential bug in my code and after testing everything I could, I believe it is a bug in PHP. The problem is that it's quite a complex issue and only occurs when mod_rewrite is being used on Linux (it works fine on my Windows PC I'm developing on). I have done all the usual things like disable all 3rd party extensions and use the latest PHP snapshot (PHP 5) but the bug still comes up. I can work around it but I would prefer to submit a bug report so it can be looked and hopefully fixed. This is where the problem is. I have been discussing the problem on php.general - http://news.php.net/php.general/247543 - and my difficulty is producing test code that I can use to submit a bug report. I have attempted to "extract" the code out of the applicatiom but when I do that, the code works fine. I know that this suggests that it is a bug in my code and not PHP at all, but the nature of the bug, and the fact that it only occurs with mod_rewrite on Linux, I believe suggests otherwise. So I'm asking if someone could take a look at my post to php.general and possibly give me some advice for writing up a test case for this so I can report it properly? Thanks, David Mytton -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Is this what Stefan Esser was referring to ...?
I always found it strange so many projects use PHP in the name. PHPBB, PHPArchitect, PHP-Eclipse, PHPAccelerator, PHP Nuke, PHP Kitchen... If PHPBB/PHPnuke do not derive from code in PHP source itself, PHP group, as I understand it, can do next to nothing about it, since no distribution of materials that have copyright belonging to the PHP group is happening. Sounds like PHP should have been trademarked so that these projects AFAIK (not being a lawyer) defending trademark is quite bothersome - you actually *have* to go after all violators or your trademark is void. Meaning PHP Group would *have* to go after all authors of all phpWhatever which would lead to a lot of pissed off people and a lot of time wasted in stirring trouble instead of spending this time to do something useful. couldn't legally use the acronym without the consent of the PHP group or some other oversight group. I mean, PHPBB doesn't exactly help with the security image of PHP :/ I don't think names are the main problem here... -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] easter_date() II
Hello, easter_date() returns a timestamp produced by C's mktime(). (ext/calendar/easter.c:111): Z_LVAL_P(return_value) = mktime(&te); AFAIK mktime() (time.h) is different to php's mktime() as it does not consider php's timezones, i,e, C's mktime does always return a timestamp of the local timezone. At least I conclude that from own tests. PHP's date functions on the other hand interpret the timestamp with respect to the php (default?) timezone. This leads to the wrong test results of easter_date.phpt as described in my posting from 22. Jan. Regards, Oliver -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] easter_date() II
Hi Oliver, Report a bug using bugs.php.net (with a link to the patch diff -up :) This way it will not get lost in the internals archive. On 1/22/07, Oliver Block <[EMAIL PROTECTED]> wrote: Hello, easter_date() returns a timestamp produced by C's mktime(). (ext/calendar/easter.c:111): Z_LVAL_P(return_value) = mktime(&te); AFAIK mktime() (time.h) is different to php's mktime() as it does not consider php's timezones, i,e, C's mktime does always return a timestamp of the local timezone. At least I conclude that from own tests. PHP's date functions on the other hand interpret the timestamp with respect to the php (default?) timezone. This leads to the wrong test results of easter_date.phpt as described in my posting from 22. Jan. Regards, Oliver -- 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] GCC / Rounding Problem
On Tue, 16 Jan 2007, Luca Longinotti wrote: > Christian Schneider wrote: > > Do you think the configure script should be changed? I'm not sure if my > > version of the test works on the system where the original test was > > developed. > > https://overlays.gentoo.org/proj/php/browser/patches/php-patches/4.4.4/4.4.4/php4.4.4-gcc_inline_floor.patch > That fixes it correctly, and that same fix was later applied to the PHP5 > branch, just never backported to 4_4. So, if the maintainer wants to fix > it in 4_4 too (I'd recommend and like that), here's the patch, enjoy! Thanks, I applied this one now. regards, Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP Object-Caching and Reference Counting
That's correct. However, it is not guaranteed that your unset would delete last reference - there can be references on stack, in temp variables in current expressions being calculated (function call could happen in mid-expression), etc. Of course, it might be that your code is very controlled so you know it never happens, but as general case you can't rely on it. Ok. I got your point. You are right that it's hard to predict where references could be found. Also, if you check only zval refcount, you might unset objects that actually are referenced from other places but by different zvals, since one object could be referenced by a number of zvals. I am not familiar with the term: "zval"...My understanding of php comes from extensive usage...Can you give me a specific example? $foo = new MyObject(); //ref count to Object #1 is 1 $bar = $foo;//ref count to Object #1 is 2 if ( ($zapp = $bar)->doIt() ) {...} //ref count is 3 or 4? but it doesn't matter really... I also believe that my reasons for this feature only require that there are not any less references than are returned by ref_count()...I am aware that the usage is for quite an advanced concept...but why shouldn't PHP also be used for this. The one argument against this feature that carries the most weight, for me, is that PHP might change the behaviour of its memory management and then keeping count of references would be an unecessary overhead, which might lead to my code not working anymore if the feature were to be dropped. Are there likely to be any changes in the future?...and is there an other solution to this concept? I find it rather neat...;) Especially if you couple it with the magic function __wake() where the objects re-register themselves in the cache-list... id] = $this; } ... } ?> In this case all objects not referenced by any variable in the $_SESSION array (or it's descendants), would be destructed at the end of the script. This way the objects remain unique even across sessions and some kind of cleaning up is done by the serialization process. The trouble is that this only works at the end of the script where of course even the current stack is not used anymore. So I can't use this principle in a function-call. Or does anyone of you have a different solution?;) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP Object-Caching and Reference Counting
Hi, To get an understanding of zval's and php internal basics, I recommend you read the following tutorials: http://devzone.zend.com/node/view/id/1021 - Part I: Introduction to PHP and Zend http://devzone.zend.com/node/view/id/1022 - Part II: Parameters, Arrays, and ZVALs http://devzone.zend.com/node/view/id/1023 - Part II: Parameters, Arrays, and ZVALs (continued) http://devzone.zend.com/node/view/id/1024 - Part III: Resources (Hmm this is the 3rd time I advertise these tutorials, I should get paid for it :p ) Best regards, Arnold Lars Schultz schreef: That's correct. However, it is not guaranteed that your unset would delete last reference - there can be references on stack, in temp variables in current expressions being calculated (function call could happen in mid-expression), etc. Of course, it might be that your code is very controlled so you know it never happens, but as general case you can't rely on it. Ok. I got your point. You are right that it's hard to predict where references could be found. Also, if you check only zval refcount, you might unset objects that actually are referenced from other places but by different zvals, since one object could be referenced by a number of zvals. I am not familiar with the term: "zval"...My understanding of php comes from extensive usage...Can you give me a specific example? $foo = new MyObject(); //ref count to Object #1 is 1 $bar = $foo;//ref count to Object #1 is 2 if ( ($zapp = $bar)->doIt() ) {...} //ref count is 3 or 4? but it doesn't matter really... I also believe that my reasons for this feature only require that there are not any less references than are returned by ref_count()...I am aware that the usage is for quite an advanced concept...but why shouldn't PHP also be used for this. The one argument against this feature that carries the most weight, for me, is that PHP might change the behaviour of its memory management and then keeping count of references would be an unecessary overhead, which might lead to my code not working anymore if the feature were to be dropped. Are there likely to be any changes in the future?...and is there an other solution to this concept? I find it rather neat...;) Especially if you couple it with the magic function __wake() where the objects re-register themselves in the cache-list... id] = $this; } ... } ?> In this case all objects not referenced by any variable in the $_SESSION array (or it's descendants), would be destructed at the end of the script. This way the objects remain unique even across sessions and some kind of cleaning up is done by the serialization process. The trouble is that this only works at the end of the script where of course even the current stack is not used anymore. So I can't use this principle in a function-call. Or does anyone of you have a different solution?;)
Re: [PHP-DEV] PHP 5.2.1RC3 Released
On 1/20/07, Antony Dovgal <[EMAIL PROTECTED]> wrote: Has something changed with realpath() (at least on windows, my only > test)??? In 5.2.0 if the file does not exist, it returns false, but in > 5.2.1RC2 and 5.2.1RC3 it returns the path to a non-existing file. > (Used fastcgi/nts version to test) Please fill a report @ bugs.php.net. Thanks in advance. Since I have the thread safe version of rc3 running now, and it is not there, i suspect that it might be a build issue. Do the two use or link to different core libraries? > 3. When using RC3 as a handler (thread safe version), phpinfo reports > PHP 5.2.0 but under apache2handler is says 5.2.1RC3??? Most likely you forgot to delete old php5ts.dll. Yes, found that, thanks... I knew I had to have done something wrong... -steve-- -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP Object-Caching and Reference Counting
I am not familiar with the term: "zval"...My understanding of php comes from extensive usage...Can you give me a specific example? OK, sorry, got a bit into engine-speak, basically zval is the internal representation of a variable, more or less, though $foo and $bar can be linked to the same zval, and may be linked to different ones, depending on the context. The objects have its won refcounts internally, which means two unrelated variables can point to the same object. For these variables, both refcounts would be 1, but if you destroy any variable, object won't be destroyed since there's another variable pointing to it and the object knows that. So checking just refcount of the variable is not enough, since low refcount doesn't mean there's no variables referring to the object, only there's no "related" variables. If you want to dive into this in detail, I think the links recommended by Arnold Daniels would be a good start, especially in part talking about references and copies. I also believe that my reasons for this feature only require that there are not any less references than are returned by ref_count()...I am ref_count() can return small number and there can still be references to this object - just from another variable. So to be sure you would have basically to inspect both refcounts - variable's and object's. -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] allow_url_fopen / allow_url_include and fine grained control
My understanding is that this coudn't happen because a userspace stream would be flagged is_url. So unless someone turns off, say "ftp", and then adds "ftp" to the whitelist, there is no problem. And if anyone does that, he/she should seriously consider looking for a job where he/she can't mess things up that badly :P Am 22.01.2007 um 06:44 schrieb Richard Lynch: On Tue, January 16, 2007 7:07 pm, Sara Golemon wrote: allow_url_fopen and allow_url_include continue to accept boolean flags in order to behave just as they do now: true/on allows anything, false/off allows only those wrappers without the is_url bit set. +1, fwiw. As far as the "user" being able to implement something otherwise dis-allowed... Well, yeah, they could. I'm not sure who would really turn off an internal wrapper, then turn on "user" then be upset that somebody coded a work-around for a blocked internal wrapper... I mean, that just seems like an unlikely real-world sequence of events, in any decent work-place... I suppose if it's the case of malicious code getting executed, there'd be a point, but really, once you have arbitrary malicious PHP code getting executed on your box, it's kind of moot if they can then download more PHP code to execute, isn't it?... -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- 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] Giving Globals the CV treatment [WAS: Runtime JIT Proposals]
Hi Sara, At first I don't understand why you are trying to deallocate variable. + if (CG(active_op_array)->T == (parent->u.var - 1)) { + CG(active_op_array)->T--; + } Isn't the same variable reused as result of ZEND_FETCH_DIM? The rest of patch seems proper, but I am not sure about place. Why we optimize @$a['b'] but not @$a->b and @$a->b()? I would prefer to find more general solution. Dmitry. > -Original Message- > From: Sara Golemon [mailto:[EMAIL PROTECTED] > Sent: Sunday, January 21, 2007 12:57 AM > To: Dmitry Stogov > Cc: internals@lists.php.net; 'Andrei Zmievski'; 'Andi Gutmans' > Subject: Re: [PHP-DEV] Giving Globals the CV treatment [WAS: > Runtime JIT Proposals] > > > One last thought on global CVs... How's this for fixing the > loophole of: > > ZEND_BEGIN_SILENCE > ZEND_FETCH_R $0 '_POST' (global) > ZEND_FETCH_DIM_R $1 $0 'foo' > ZEND_END_SILENCE > > I know it seems like a pretty minor gain, but (A) using @$_GET['foo'] > isn't an uncommon practice, and (B) pushing this all into CV based > FETCH_DIM ops would greatly simplify the runtime JIT stuff > I'm working on. > > The short-version summary of this patch is that when the > engine is going > to do a FETCH_DIM based on prior nodes, it checks the top of the > backpatch stack to see where the container element is coming from, if > it's coming from a simple FETCH, it rewrites that to a > FETCH_DIM, rather > than adding a new element to the BP stack. > > -Sara > > P.S. - Bench numbers follow (0.1% difference): > > unpatched patched > simple 0.472 0.473 > simplecall 1.914 1.916 > simpleucall2.920 2.920 > simpleudcall 3.507 3.507 > mandel 2.056 2.055 > mandel23.273 3.277 > ackermann(7) 3.389 3.390 > ary(5) 0.157 0.157 > ary2(5)0.138 0.138 > ary3(2000) 1.057 1.056 > fibo(30) 9.789 9.750 > hash1(5) 0.395 0.396 > hash2(500) 0.300 0.300 > heapsort(2)0.770 0.771 > matrix(20) 0.508 0.508 > nestedloop(12) 0.872 0.872 > sieve(30) 0.640 0.640 > strcat(20) 0.289 0.289 > > Total 32.446 32.416 > > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php