Re: [PHP-DEV] Re: New Operator

2006-03-15 Thread bertrand Gugger

Brian Moon wrote:
Oh, you want an operator to do that?  Does some other language have this 
that we are wanting to copy here?  Seems overly complicated to me.  But, 
so does a lot of things being added PHP these days.


As bash ${parameter:=word} ?

--
toggg

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] PHP Embedded

2006-03-15 Thread Mark Evans

HI Michael

I have made an unaccepted php_embed extension available at 
http://www.badcode.be/~descript/PHP/php_embed/
Take a look at the example : 
http://www.badcode.be/~descript/PHP/php_embed/examples/pembed_new.c

I use this part of code on my software with C++
If you have questions ...


Great many thanks, I think I am finally starting to understand how this 
all works.. Look out world... c++ newbie coming through :-D


Regards

Mark

--
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

2006-03-15 Thread Stefan Walk
Pierre wrote:
> On Tue, 14 Mar 2006 07:32:15 -0800
> [EMAIL PROTECTED] (Andi Gutmans) wrote:
> 
>> Yeah that sounds good. Maybe change UPDATE to UPDATING
> 
> First draft commited in:
> 
> php-src / README.UPDATING_TO_PHP6 
> 
> --Pierre
> 

Hi,

A few remarks:
This code lacks the emulation for GET variables...?
And as I remarked when Hannes Magnusson posted a link to the first
version of this code on the list, this method of emulating register
globals has severe security implications (way more than an enabled
register globals), if $_POST has a key _SESSION it will overwrite the
$_SESSION variable, corrupting the session data with user-supplied data.
The same applies to $_SERVER.

On a first glance, going through variables_order in reverse order and
utilizing EXTR_SKIP seems safe, but someone better double-check that.

Regards,
Stefan

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] phps line numbering

2006-03-15 Thread Kevin Waterson
Addition of line numbering to phps
This is a rather simple addition and will be benificial to all who use phps
for debugging and/or displaying code. Its a simple diff to zend_highlight.c

Patches have been written and languish simply awaiting inclusion in HEAD

Can we have a show of hands of those who would like this?
5.1 patch can be viewed here:
http://svn.schlueters.de/phpatches/PHP_5_1/zend_highlight_ol.diff

Any real reason this cannot be included?

Kind regards
kevin

-- 
"Democracy is two wolves and a lamb voting on what to have for lunch. 
Liberty is a well-armed lamb contesting the vote."

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] phps line numbering

2006-03-15 Thread Ilia Alshanetsky

I'd consider it for PHP6, but not for PHP5.1 at least not at this time.

Ilia

Kevin Waterson wrote:

Addition of line numbering to phps
This is a rather simple addition and will be benificial to all who use phps
for debugging and/or displaying code. Its a simple diff to zend_highlight.c

Patches have been written and languish simply awaiting inclusion in HEAD

Can we have a show of hands of those who would like this?
5.1 patch can be viewed here:
http://svn.schlueters.de/phpatches/PHP_5_1/zend_highlight_ol.diff

Any real reason this cannot be included?

Kind regards
kevin



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] phps line numbering

2006-03-15 Thread Johannes Schlueter
Hi Ilia et al.,

the patch is older than PHP 6 and back then there was nobody interested in 
committing it so it wasn't brought to HEAD, yet. But I'll do that if the 
patch itself is being accepted.

johannes

On Wednesday 15 March 2006 15:46, Ilia Alshanetsky wrote:
> I'd consider it for PHP6, but not for PHP5.1 at least not at this time.
>
> Ilia
>
> Kevin Waterson wrote:
> > Addition of line numbering to phps
> > This is a rather simple addition and will be benificial to all who use
> > phps for debugging and/or displaying code. Its a simple diff to
> > zend_highlight.c
> >
> > Patches have been written and languish simply awaiting inclusion in HEAD
> >
> > Can we have a show of hands of those who would like this?
> > 5.1 patch can be viewed here:
> > http://svn.schlueters.de/phpatches/PHP_5_1/zend_highlight_ol.diff
> >
> > Any real reason this cannot be included?
> >
> > Kind regards
> > kevin

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] phps line numbering

2006-03-15 Thread Pierre
On 3/15/06, Ilia Alshanetsky <[EMAIL PROTECTED]> wrote:
> I'd consider it for PHP6, but not for PHP5.1 at least not at this time.

I'm definitively for having it in php6. For 5.x, if there is a 5.2, 
then it could be in too.

--Pierre

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] phps line numbering

2006-03-15 Thread Florian Anderiasch
Kevin Waterson schrieb:
> Addition of line numbering to phps
> This is a rather simple addition and will be benificial to all who use phps
> for debugging and/or displaying code. Its a simple diff to zend_highlight.c

Hello Kevin,
I haven't tested this - but if phps output is numbered, it will be
completely cluttered and you can't copy-paste anymore. Exactly when
*displaying* code so that people can adapt it that's a quite bad idea
then imho. Rather add another extension and leave .phps like it is.

Greetings,
Florian

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] phps line numbering

2006-03-15 Thread Florian Anderiasch
arg, I'm wrong - ignore me please

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] phps line numbering

2006-03-15 Thread Aizat Faiz
How about including the patch, and having a php.ini option to 
enable/disable the line numbering.


Kevin Waterson wrote:

Addition of line numbering to phps
This is a rather simple addition and will be benificial to all who use phps
for debugging and/or displaying code. Its a simple diff to zend_highlight.c

Patches have been written and languish simply awaiting inclusion in HEAD

Can we have a show of hands of those who would like this?
5.1 patch can be viewed here:
http://svn.schlueters.de/phpatches/PHP_5_1/zend_highlight_ol.diff

Any real reason this cannot be included?

Kind regards
kevin




--
aizat faiz: sleep to the power of z. -_-;;^zzz
strange symphonies - http://aizatto.com/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] phps line numbering

2006-03-15 Thread Derick Rethans
On Wed, 15 Mar 2006, Aizat Faiz wrote:

> How about including the patch, and having a php.ini option to enable/disable
> the line numbering.

NO more ini settings please... and definitely not for something trivial 
as this.

Derick
-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] phps line numbering

2006-03-15 Thread Sean Coates
> Patches have been written and languish simply awaiting inclusion in HEAD

Johannes' method (..) doesn't copy & paste well in
FireFox 1.5 -- you might consider this a FF problem, but in any case,
line numbers are pasted, so this is really a pain for sharing code.

Until a good method is found (if there is one), I say leave the patch
out -- although, FWIW, I _would_ like to see line numbers if there's a
way to make it work well (avoid horizontal scrolling, paste without
numbers).

S

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] phps line numbering

2006-03-15 Thread Lukas Smith

Ilia Alshanetsky wrote:

I'd consider it for PHP6, but not for PHP5.1 at least not at this time.


what exactly is the big deal with adding a new optional parameter?
i dont really see the huge impact that should push this feature back to 
the next major php version. its something that could go into any minor 
version.


regards,
Lukas

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] auto_globals_jit and register_argc_argv disconnect

2006-03-15 Thread Rasmus Lerdorf
Our default config has both auto_globals_jit and register_argc_argv 
enabled.  However, having register_argc_argv enabled disables 
auto_globals_jit which carries a really high WTF factor.


We can fix this by shuffling things around a bit and making 2 calls to 
php_build_argv.  One to populate the global argc/argv in cli mode and 
another to populate the _SERVER version from either 
php_auto_globals_create_server or php_register_server_variables 
depending on how we do the checks in php_hash_environment.  Then to 
connect the references we'd need a hash lookup in php_build_argv.  It 
gets a bit messy, but I don't think the current situation makes any 
sense at all.  Anybody see a clean way out of this?


-Rasmus

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] phps line numbering

2006-03-15 Thread Lukas Smith

Lukas Smith wrote:

Ilia Alshanetsky wrote:

I'd consider it for PHP6, but not for PHP5.1 at least not at this time.


what exactly is the big deal with adding a new optional parameter?
i dont really see the huge impact that should push this feature back to 
the next major php version. its something that could go into any minor 
version.


maybe i should clarify that i am only concered about the 
highlight_file(9 and highlight_string() functions. i dont even think we 
should add linenumbers to .phps.


regards,
Lukas

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] auto_globals_jit and register_argc_argv disconnect

2006-03-15 Thread Rasmus Lerdorf

Dmitry Stogov wrote:

Hi Rasmus,

Why you need "register_argc_argv" in your php.ini?
Isn't CLI version sets it by default?


I don't really.  My point was that it defaults to be on, so when you 
don't have a php.ini and just stick with the defaults, you will never 
get jit even though phpinfo will tell you it is turned on.



Also, do we need this "register_argc_argv" for some SAPI except CLI, CGI and
EMBED?


Don't think so.

-Rasmus

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DEV] auto_globals_jit and register_argc_argv disconnect

2006-03-15 Thread Dmitry Stogov
Hi Rasmus,

Why you need "register_argc_argv" in your php.ini?
Isn't CLI version sets it by default?

Also, do we need this "register_argc_argv" for some SAPI except CLI, CGI and
EMBED?

Dmitry.

> -Original Message-
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, March 15, 2006 7:10 PM
> To: internals
> Subject: [PHP-DEV] auto_globals_jit and register_argc_argv disconnect
> 
> 
> Our default config has both auto_globals_jit and register_argc_argv 
> enabled.  However, having register_argc_argv enabled disables 
> auto_globals_jit which carries a really high WTF factor.
> 
> We can fix this by shuffling things around a bit and making 2 
> calls to 
> php_build_argv.  One to populate the global argc/argv in cli mode and 
> another to populate the _SERVER version from either 
> php_auto_globals_create_server or php_register_server_variables 
> depending on how we do the checks in php_hash_environment.  Then to 
> connect the references we'd need a hash lookup in php_build_argv.  It 
> gets a bit messy, but I don't think the current situation makes any 
> sense at all.  Anybody see a clean way out of this?
> 
> -Rasmus
> 
> -- 
> 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] auto_globals_jit and register_argc_argv disconnect

2006-03-15 Thread Dmitry Stogov
Understood.
The patch is in attachment.

Thanks. Dmitry.

> -Original Message-
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, March 15, 2006 7:44 PM
> To: Dmitry Stogov
> Cc: 'internals'
> Subject: Re: [PHP-DEV] auto_globals_jit and 
> register_argc_argv disconnect
> 
> 
> Dmitry Stogov wrote:
> > Hi Rasmus,
> > 
> > Why you need "register_argc_argv" in your php.ini?
> > Isn't CLI version sets it by default?
> 
> I don't really.  My point was that it defaults to be on, so when you 
> don't have a php.ini and just stick with the defaults, you will never 
> get jit even though phpinfo will tell you it is turned on.
> 
> > Also, do we need this "register_argc_argv" for some SAPI 
> except CLI, 
> > CGI and EMBED?
> 
> Don't think so.
> 
> -Rasmus
> 
> -- 
> 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] auto_globals_jit and register_argc_argv disconnect

2006-03-15 Thread Rasmus Lerdorf

Dmitry Stogov wrote:

Understood.
The patch is in attachment.


Looks good.  I'll run some tests.

-Rasmus

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DEV] phps line numbering

2006-03-15 Thread Jared Williams
 

> > Patches have been written and languish simply awaiting inclusion in 
> > HEAD
> 
> Johannes' method (..) doesn't copy & 
> paste well in FireFox 1.5 -- you might consider this a FF 
> problem, but in any case, line numbers are pasted, so this is 
> really a pain for sharing code.
> 
> Until a good method is found (if there is one), I say leave 
> the patch out -- although, FWIW, I _would_ like to see line 
> numbers if there's a way to make it work well (avoid 
> horizontal scrolling, paste without numbers).

Pretty sure this isn't possible in Firefox, both avoiding horizontal scrolling 
and paste without numbers, are mutually exclusive.

Replacing the list, with divs and using css generated content to display the 
line numbers, cleans up the paste output but won't get
the word wrap.


Jared

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] phps line numbering

2006-03-15 Thread Kevin Waterson
This one time, at band camp, Aizat Faiz <[EMAIL PROTECTED]> wrote:

> How about including the patch, and having a php.ini option to 
> enable/disable the line numbering.

I dont think this is a good option, perhaps some other trigger
file.phps?numbers or something

Kevin


-- 
"Democracy is two wolves and a lamb voting on what to have for lunch. 
Liberty is a well-armed lamb contesting the vote."

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] phps line numbering

2006-03-15 Thread Matthew C. Kavanagh

That other time, at band camp, Kevin Waterson wrote:

This one time, at band camp, Aizat Faiz <[EMAIL PROTECTED]> wrote:
How about including the patch, and having a php.ini option to 
enable/disable the line numbering.


I dont think this is a good option, perhaps some other trigger
file.phps?numbers or something


But there'd better be an ini option to disable that, and an ini option 
to control whether line numbering starts at zero or one, and an ini 
option to disable the ini options. Everyone loves ini options :)


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] CVS Account Request: mattes

2006-03-15 Thread Matthias Esken
I'm just working on the german documentation of Smarty. I sent the first diff 
to messju and he seemed to like it and told me to apply for an own CVS account. 
At the moment I need write access to smarty/docs/de which will be handled by 
monte if I got the information right.

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] phps line numbering

2006-03-15 Thread Markus Fischer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

Jared Williams wrote:
> Replacing the list, with divs and using css generated content to display the 
> line numbers, cleans up the paste output but won't get

... and doesn't work in IE. So no real win here. The semantic solution
would be to use ol/li .

regards
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEGRCJ1nS0RcInK9ARAs2NAJ9f+dSTUcQOP4Dv8A5PfOauKVogDgCfSTsw
TaMDPYjqDbw9NfGxusCupqI=
=o3F+
-END PGP SIGNATURE-

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DEV] auto_globals_jit and register_argc_argv disconnect

2006-03-15 Thread Dmitry Stogov
Le me know about results of your tests.
Then I probably will commit it.

Dmitry.

> -Original Message-
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, March 15, 2006 8:40 PM
> To: Dmitry Stogov
> Cc: 'internals'
> Subject: Re: [PHP-DEV] auto_globals_jit and 
> register_argc_argv disconnect
> 
> 
> Dmitry Stogov wrote:
> > Understood.
> > The patch is in attachment.
> 
> Looks good.  I'll run some tests.
> 
> -Rasmus
> 
> -- 
> 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] auto_globals_jit and register_argc_argv disconnect

2006-03-15 Thread Pierre
On Wed, 15 Mar 2006 20:28:11 +0300
[EMAIL PROTECTED] ("Dmitry Stogov") wrote:

> Understood.
> The patch is in attachment.

Not here, .txt?

--Pierre

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php