[PHP-DEV] leak in trunk rev 288110

2009-09-07 Thread Xuefer
reproduce: make all install Generating phar.php [Mon Sep 7 16:37:35 2009] Script: '/home/xuefer/src/php/php6/ext/phar/build_precommand.php' /home/xuefer/src/php/php6/Zend/zend_operators.c(1728) : Freeing 0x08BD31DC (110 bytes), script=/home/xuefer/src/php/php6/ext/phar/build_prec

Re: [PHP-DEV] [RFC] prototyping

2009-01-13 Thread Xuefer
just a note about it in javascript, "this" ($this in php) is a special variable in closure, "this" is always bound to the "object" of "object.method(...)" when it is called, whenever i want a "this" of closure creation time context, i use: var _this = this; return function() { _this.prop = 123; _th

[PHP-DEV] 5.3 cvs zend_do_begin_dynamic_function_call ZEND_OP_DATA op2 not initialized

2008-12-11 Thread Xuefer
opline2->op2.op_type == 0, which should be opline2->op2.op_type == IS_UNUSED. patch followed: $ cvs diff zend_compile.c Index: zend_compile.c === RCS file: /repository/ZendEngine2/zend_compile.c,v retrieving revision 1.647.2.27.2.41.2

Re: [PHP-DEV] Disable PHAR by default

2008-09-29 Thread Xuefer
the bug is updated with my comments, i think it's a cgi not phar issue. can u pls have a look soon? thanks -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP 4.4.9RC1

2008-07-24 Thread Xuefer
On Tue, Jul 22, 2008 at 3:57 PM, Derick Rethans <[EMAIL PROTECTED]> wrote: > Hello! > > I packed PHP 4.4.1RC9 today, which you can find here: > http://downloads.php.net/derick/ 4.4.9RC1? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] simplify code for ext/date/config.{m4,w32}

2008-05-05 Thread Xuefer
in ext/date/ of php5/6, i see the following code ===config.m4= cat > $ext_builddir/lib/timelib_config.h < #endif EOF ===config.w32= var tl_config = FSO.CreateTextFile("ext/date/lib/timelib_config.h", true); tl_config.WriteLine("#include \"config.w32.h\""); tl_config.Close(); ===

[PHP-DEV] Re: Bug #44654: wired syntax error for #

2008-04-06 Thread Xuefer
i'm having trouble with the bug http://bugs.php.net/bug.php?id=44654 i just reported. i'm not sure if it's a expected behavoir or a bug introduced by re2c or whatever patch. On Sun, Apr 6, 2008 at 10:19 PM, PHP Bug Database <[EMAIL PROTECTED]> wrote: > From:

Re: [PHP-DEV] Dropping ze1_compatibility_mode (PHP 5.3)

2008-03-18 Thread Xuefer
On Tue, Mar 18, 2008 at 10:10 PM, Dmitry Stogov <[EMAIL PROTECTED]> wrote: > Drop it. > > Dmitry. php5/ext/pdo/pdo_dbh.c:1530: error: 'zend_executor_globals' has no member named 'ze1_compatibility_mode' sorry for the noise again, who's responsive to extension relatived to this change? there're mor

Re: [PHP-DEV] Patch for opcode caches

2008-03-15 Thread Xuefer
> I don't actually see early binding as being much of a problem, the real > problem is when the same class is both early and late bound. If you > consistently always bind early or always bind late, opcode caches should > be quite happy to let you do that. But if you mix the two, things get >

Re: [PHP-DEV] new version of check_parameters.php

2008-03-13 Thread Xuefer
an off topic suggestion, why not add a shebang #!/usr/bin/php ... -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [PATCH] Bug #43896 htmlspecialchars returns empty stringoninvalid unicode sequence

2008-02-05 Thread Xuefer
> iconv() will stop on conversion error and return partial string or empty > string. It will require even more complex code than 5.2.5 > htmlspecialchars() does. With htmlspecialchars you check for empty string > before and after the call. With iconv you check for php errors during > iconv call. th

Re: [PHP-DEV] Re: PATCH: Implementing closures in PHP

2007-12-30 Thread Xuefer
On Dec 29, 2007 12:45 AM, Ryusuke SEKIYAMA <[EMAIL PROTECTED]> wrote: > >any idea about the possibility of hash conflict? > > How about this patch? > http://www.opendogs.org/pub/php-5.3dev-071228a.patch yeah build_runtime_defined_function_key! that's what i thought of :) and i hope the function nam

Re: [PHP-DEV] Patch for macros for tracking refcount and is_ref

2007-12-28 Thread Xuefer
why not keep ZVAL_ADDREF ZVAL_DELREF for 3rd party source level compatibility reason and deprecate it? e.g.: pecl/event/event.c: 790 ZVAL_ADDREF(ev->php_cb_arg); On Sep 4, 2007 10:24 PM, David Wang <[EMAIL PROTECTED]> wrote: > > One thing to note is that I removed the existing ZVAL_ADDREF and

Re: [PHP-DEV] PATCH: Implementing closures in PHP

2007-12-24 Thread Xuefer
any idea about the possibility of hash conflict? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Proposed feature for json_encode()

2007-11-29 Thread Xuefer
if we want to we should do echo htmlspecialchars(json_encode($stringValue)) instead actually, and yes JSON_HEX_TAG will help avoiding htmlspecialchars() just like urlencode()ed data which never contains < > or so. i'm not sure if there is problem if you put json_encode()ed data in

Re: [PHP-DEV] PATCH: anonymous functions in PHP

2007-03-20 Thread Xuefer
thanks to the demo script that bring us to this topic again. i must agree that designing a language isn't as simple as most ppl might think. so thank u if u keep thinking this topic. i would remind that the static variable make it not cache friendly, so i suggest the anonymous-name should be some

[PHP-DEV] time to remove useless dirty hack

2007-02-05 Thread Xuefer
ZendEngine2/zend_compile.c opline->result.op_type = IS_CONST; /* FIXME: Hack so that INIT_FCALL_BY_NAME still knows this is a class */ i checked cvs log (and hardly) find that this hack was for php 5.0-rc/betas, not even used in 5.0. can anyone think about it and change it back to IS_TMP_VAR? it

[PHP-DEV] need the spam moderated in pecl-dev

2006-06-04 Thread Xuefer
it looks likes there's too many spam in pecl-dev these days. is that list moderated yet? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] tsrm_shutdown() and the CLI SAPI

2006-05-27 Thread Xuefer
i can confirm this on other extension. something like this grep free_id */*.c -B1 -A3 mbstring/mbstring.c-#ifdef ZTS mbstring/mbstring.c:ts_free_id(mbstring_globals_id); mbstring/mbstring.c-#else mbstring/mbstring.c-_php_mb_globals_dtor(&mbstring_globals TSRMLS_CC); mbstring/mbstring.c-#en

Re: [PHP-DEV] #line C macro equivalent in php ?

2006-05-11 Thread Xuefer
i'll second that idea, but not the syntax. template engine such smarty, and compiler compiler, need it really.

Re: [PHP-DEV] GOTO and/or BREAK LABEL

2006-03-09 Thread Xuefer
On 3/9/06, Steph Fox <[EMAIL PROTECTED]> wrote: > Please, Xuefer! Your vote was already recorded, shhh! i wasn't to vote more than once. it's same vote but with a bit different syntax changed. oh well, the result is out, this is only my explaination.

Re: [PHP-DEV] GOTO and/or BREAK LABEL

2006-03-08 Thread Xuefer
> If the "Java-like" syntax is seen as confusing, what about, as in some other > languages, interpolating the label into the for/foreach/while statement: > > for () label {...} or for label (...) {...} a. label: for () { break label; } AND label: { for () { break label; } } (see

Re: [PHP-DEV] GOTO and/or BREAK LABEL

2006-03-07 Thread Xuefer
On 3/7/06, Dmitry Stogov <[EMAIL PROTECTED]> wrote: > Hi, > > Because of some confused people I reverted "break label" patch and post it > for discussion once again together with GOTO patch. > > Please reviw and vote. > > 1) goto and break label > 2) goto only (like C) > 3) break label only (like J

Re: [PHP-DEV] foreach, assigning to a reference, and E_NOTICE

2006-03-06 Thread Xuefer
> Sean's not so much referring to his own problem as (like you said) the > solution is a fairly simple matter of following strict coding practices. yeah, i see. but... > when foreach assigns to a pre-existing > reference target it's not the problem of the second foreach, any usage of $j after the 1

Re: [PHP-DEV] Revisiting output control code

2006-03-06 Thread Xuefer
is there any chance that a buffer in output buffer will be supported? supposing u're implementing "send the whole page in html to friends" function. using smarty as email template. if (isset($_GET['send_html_to'])) { ob_start('send_as_html'); } function send_as_html($content) { $tpl = new Smarty("h

Re: [PHP-DEV] foreach, assigning to a reference, and E_NOTICE

2006-03-06 Thread Xuefer
> However, upon further discussion, a number of us agreed that it would be > pertinent to raise an E_NOTICE when foreach assigns to a pre-existing > reference target. Certainly, the behaviour demonstrated above is > non-obvious, and contrary to the normal "PHP way" (simplicity). > Developers, at le

Re: [PHP-DEV] foreach, assigning to a reference, and E_NOTICE

2006-03-06 Thread Xuefer
try: it's known behavior. may app rely on this.

Re: [PHP-DEV] using $this-> implicitly inside same class

2006-02-24 Thread Xuefer
> > > I was thinking of something more like this: > > > class Connection { > declare (implicit_this_properties) { >// use $this-> implicitly within this class only >ini_set('this.use_implicit', ON); > >protected $link; >private $server, $username, $password, $db; } > >public fu

Re: [PHP-DEV] Unicode string literals and casting

2006-02-17 Thread Xuefer
> Your point about writing portable Unicode-friendly code is well taken. > Rasmus and I have chatted a bit here, and we think we can propose some > changes that may make it easier. sorry, i can hardly found the thread. can u give me sone hint on the subject so i can search it? > > With unicode_sema

Re: [PHP-DEV] Re: Unicode string iterator performance

2006-02-03 Thread Xuefer
On 2/4/06, Jessie Hernandez <[EMAIL PROTECTED]> wrote: > Hi Andrei, > > Pardon me for my ignorance, as I have not even looked at the Unicode > stuff, but based on what you wrote, what about always allocating two > UChars per codepoint? It would take a bit more space, but then > random-offset indexi

Re: [PHP-DEV] PHP, Apache 2, memory and APC

2006-02-02 Thread Xuefer
think of using fastcgi? u can have more user->httpserver concurrent connection than http->fastcgi. 5-20 php-fastcgi is enough in some case, with thread disabled, while u can run apache2 mpm worker.

Re: [PHP-DEV] unable to create class from constant

2005-09-19 Thread Xuefer
can u tell me why php -r 'function myfunc(){} define("X", "myfunc"); X(); ' Fatal error: Call to undefined function: x() in Command line code on line 1 but not calling myfunc? wrong list. :) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.p

Re: [PHP-DEV] PHP 6.0 Wishlist

2005-08-13 Thread Xuefer
> I think PHP 6.0 provides an excellent opportunity to rectify a huge number > of frustrating inconsistencies; it would be a shame not to make the most of > this. > > > > The two biggest inconsistencies raised by users and "language comparison" > groups are a) function argument order, and b) fun

Re: [PHP-DEV] PHP 6.0 Wishlist

2005-08-13 Thread Xuefer
> >> This is the first one that comes to my mind: > >> > >> int strpos (string haystack, mixed needle [, int offset]) > >> > > And this is why they're inconsistent to begin with. When I look at > > strpos() I > > think: strchr(char *, int) So the parameter ordering does make sense the

Re: [PHP-DEV] PHP 6.0 Wishlist

2005-08-13 Thread Xuefer
On 8/13/05, Marco Tabini <[EMAIL PROTECTED]> wrote: > > On 8/13/05 2:25 AM, "Ilia Alshanetsky" <[EMAIL PROTECTED]> wrote: > > > Why would I need name spaces for basic functions, just so that I need to > > rename all my code to use str:replace rather then str_replace and > > perform 2 hash table l

Re: [PHP-DEV] How to get started with Unicode

2005-08-12 Thread Xuefer
missing "charset=" in content-type header when unicode.output_encoding is set to other than utf-8 is_binary() is_unicode()? (while there is is_string()) and is_buffer() for string/binary/unicode? but pls fix extract() at very first as it inject variable in active symbol table. -- PHP Internals -

Re: [PHP-DEV] Upload progress patch

2005-08-12 Thread Xuefer
ahh, i found i'm in wrong list, ignore my previous reply -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP 6.0 Wishlist

2005-08-12 Thread Xuefer
i'd suppose u guys going to deprecate+E_STRICT first, remove later > > George Schlossnagle schrieb: > >> Radically change all the operator syntaxes. > > > http://www.gravitonic.com/software/php/patches/ze2_concat_obj_op.diff.gz > FYI: _ is validate char in variable/function name _("Hello! worl

Re: [PHP-DEV] Upload progress patch

2005-08-12 Thread Xuefer
in svn trunk On 8/12/05, steve roussey <[EMAIL PROTECTED]> wrote: > Has the upload progress patch been ever been voted up or down? > > -steve-- > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Moving to PHP5.1 and Apache 2.2 next year, need help

2005-08-11 Thread Xuefer
On 8/12/05, steve roussey <[EMAIL PROTECTED]> wrote: > Just a couple last notes on lingering: > > o Apache 2+ uses SO_LINGER by default if it defined for that system. > Apache 1 will only use it if you define USE_SO_LINGER (I suppose in > configure). Apache2 has all sorts of stuff in the comments

Re: [PHP-DEV] YANP (Yet Another Namespace Proposal)

2005-07-07 Thread Xuefer
at compile time? this means u cannot import * (all) symbols from a namespace -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src / NEWS /ext/date php_date.c php_date.h/ext/date/tests bug26198.phpt bug29585.phpt default-timezone-2.phpttimezone-configuration.phpt

2005-07-03 Thread Xuefer
FYI: http://bugs.php.net/?id=33545 i use cygwin for local test date() make me crazy as it gives out warning all over the php pages imho, the precendence should change too. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] 5.1.0 Release Process

2005-07-02 Thread Xuefer
how about /usr/src/php5/Zend/zend_operators.c(1179) : Freeing 0x1015C2C8 (11 bytes), script=/www/test.php === Total 1 memory leaks detected === but there was no problem untill i do "cvs up" and rebuild recently -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http:

Re: [PHP-DEV] 5.1.0 Release Process

2005-06-30 Thread Xuefer
may zend_vm_set_opcode_handler be exported with ZEND_API? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] strange php4.3.x foreach performance issue

2005-06-10 Thread Xuefer
"foreach ($arr as $k => $v)" is 2 times as faster as "foreach ($arr as $v)" in php4.3.x both test under lastest cvs. 4.3.12-dev testing with array[] = string $v: 2.5590002536774 $k=>$v: 0.7020001411438 $v each(): 1.025000333786 $k $v each(): 1.1790001392365 testing with array[] = array

Re: [PHP-DEV] PHP 5.1

2005-06-06 Thread Xuefer
(recall: eliminating warning is as important as dealing with errors. u can't figure out which warning is relative to the problem if there's too many noise warning.) all of u in -internals is expert. u might have forgot how ppl learn php. "simple" is the spirit of php, but is adding feature always

Re: [PHP-DEV] info about ext/session bug #29322 Constant SID already defined

2005-05-20 Thread Xuefer
reproducable script: $ ./sapi/cgi/php.exe -v PHP 5.1.0-dev (cgi-fcgi) (built: May 7 2005 01:01:15) $ grep 'Id:' ../php5/ext/session/session.c /* $Id: session.c,v 1.409 2005/03/24 00:17:16 tony2001 Exp $ */ $ ./sapi/cgi/php.exe test.php Content-type: text/html Set-Cookie: SID=a; path=/ Expires

[PHP-DEV] info about ext/session bug #29322 Constant SID already defined

2005-05-20 Thread Xuefer
i cannot reopen bug 29322, nor can i add commit to it http://bugs.php.net/bug.php?id=29322 pls check against the cvs: http://cvs.php.net/diff.php/php-src/ext/session/session.c?r1=1.391&r2=1.392&ty=h -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/u

Re: [PHP-DEV] Suggestion: If URL Loads Initially, then stop

2005-04-13 Thread Xuefer
use HEAD request On 4/13/05, Ryan Hemelaar <[EMAIL PROTECTED]> wrote: > Hi there, > > I don't know if this is the place to do it, but anyway. I have a suggestion > for a new function that PHP could have: > > It will be similar to fopen, but instead of actually loading the URL, it > starts loadin

Re: [PHP-DEV] http_build_query and arg_separator.output

2005-03-24 Thread Xuefer
is that still a problem if you set arg_separator.input = ";&" this should BC with why not use arg_separator.output = ";" the doc told me there's some browser can't recognize ";", but can anyone tell me when browser need to do something with it? parsing the "Location"? i just found it problem on

Re: [PHP-DEV] Upload Progress Meter Patch

2005-03-22 Thread Xuefer
use cli as cgi, read stdin and parse header/content yourself On Tue, 22 Mar 2005 18:41:04 +0100 (CET), Derick Rethans <[EMAIL PROTECTED]> wrote: > On Tue, 22 Mar 2005, Robert wrote: > > > has the Upload progress meter patch finally been applied? > > (http://pdoru.from.ro/) > > No, it has not b

Re: [PHP-DEV] PHP 5.1

2005-02-01 Thread Xuefer Tinys
more choices: foo_bar(string $key or array $keys, int or string $how) bar can be one of get,post,request,env,server foo may be filter? ifilter? (i for input) may foo be empty? _get _post etc.. $how is default to FILTER_RAW so we have _get("abc") and _GET("abc") for raw data same as $_GET['abc'] be

Re: [PHP-DEV] Re: referencing Superglobals with variable variables inside functions

2005-01-31 Thread Xuefer Tinys
$_GET is solved at compile time, which is good, but this make other variables bad at execution time? how much does this patch slow execution down? it's one more hash lookup. affect speed of $var or $$var? or both? On Mon, 31 Jan 2005 14:24:41 -0800, Sara Golemon <[EMAIL PROTECTED]> wrote: > > So

[PHP-DEV] [apc-error] apc_sma_free: could not locate address 0x901

2004-11-09 Thread Xuefer
apc guys with lastest CVS version, i recently get this error shown in error_log, any idea? 0x901 is a fixed constant, never changed it seem only happened when file is updated and reload the page 2nd reload is ok, with new file take effect -- PHP Internals - PHP Runtime Development Mailing List T

Re: [PHP-DEV] Really odd PHP problem

2004-09-07 Thread Xuefer
>> both mmcache and apc does not have "crash recover" > > The concept of a crash recover is somewhat flawed in my opinion. The only > way to really do this is to catch SIGSEGV, SIGBUS and other such fatal > signals and twiddle a knob somewhere in shared memory that tells other > processes to flu

Re: [PHP-DEV] Really odd PHP problem

2004-09-07 Thread Xuefer
27;function a(){static $a=1+1;}' Parse error: parse error, expecting `','' or `';'' in Command line code on line 1 to avoid being unstable(crash?) i wonder why mmcache managed to do it. how about other optimizers? - Original Message - From: "R

Re: [PHP-DEV] Really odd PHP problem

2004-09-06 Thread Xuefer
i can confirm it. it's the problem of cacher. mmcache is rather complex and NOT stable, although many ppl is running happily, they're not under heavy load. 1 hours to 1days after apache is restarted, mmcache end up with all page randomly crash (share mem courpo APC works with apache2 DSO, and th

Re: [PHP-DEV] GOTO operator

2004-08-04 Thread tinys xuefer
thanks it's my mistake, i didn't want to reply this thread but reply to my own one From: Derick Rethans <[EMAIL PROTECTED]> To: Marcus Boerger <[EMAIL PROTECTED]> CC: tinys xuefer <[EMAIL PROTECTED]>, [EMAIL PROTECTED] Subject: Re: [PHP-DEV] GOTO operator Date: Wed, 4 A

Re: [PHP-DEV] GOTO operator

2004-08-04 Thread tinys xuefer
ace to ask the question here? it is said: Internals list A medium volume list for those who want to __help out__ with the development of PHP From: "tinys xuefer" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: [PHP-DEV] GOTO operator Date: Sat, 31 Jul 2004 15:16:54 +0800 MIME

[PHP-DEV] how to return a copy of arguments but using CopyOnWrite scheme?

2004-08-02 Thread tinys xuefer
i'm truying to write a ext for php, personal usage in some case, my function modify the value and return for performance issue, i'd like to use CopyOnWrite scheme for the case returning without modify but how? _ The new MSN 8: smart

Re: [PHP-DEV] GOTO operator

2004-07-31 Thread tinys xuefer
how about: "break label;" ? just a thought From: Andi Gutmans <[EMAIL PROTECTED]> To: "Sara Golemon" <[EMAIL PROTECTED]>,[EMAIL PROTECTED] Subject: Re: [PHP-DEV] GOTO operator Date: Sat, 31 Jul 2004 00:13:51 -0700 MIME-Version: 1.0 X-Sender: [EMAIL PROTECTED] Received: from pb1.pair.com ([216.92.1