[PHP-DEV] curl multi

2003-03-17 Thread Wico de Leeuw
Hiya,

If someone has some spare time could he look at curl_multi_info_read() i'd 
like to use (test) the curl_multi functions, but without the 
curl_multi_info_read it isn't really usefull (and when i look at the source 
i thing it's almost finished)

P.S. when i test them i'll report back to you guys when i find things

Greetz and tnx in advance

Wico 

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


[PHP-DEV] Re: [PHP-CVS] curl multi

2003-03-17 Thread Wico de Leeuw
At 11:15 17-3-03 -0500, Sterling Hughes wrote:
On Mon, 2003-03-17 at 10:29, Wico de Leeuw wrote:
 sorry for writing to the wrong list should have been phpdev offcourse
 At 16:28 17-3-03 +0100, Wico de Leeuw wrote:
 Hiya,
 
 If someone has some spare time could he look at curl_multi_info_read() 
i'd
 like to use (test) the curl_multi functions, but without the
 curl_multi_info_read it isn't really usefull (and when i look at the
 source i thing it's almost finished)
 
 P.S. when i test them i'll report back to you guys when i find things
 
 Greetz and tnx in advance
 

It is still very useful, what would give you the idea it isn't?

-Sterling
Hiya

I want to use  to get some webpages parallel, and start processing a page 
when the it has arrived. (while the other ones are still loading)
At the moment i can't find which page is ready and which one not. Even when 
you use a different writer function for each page, because you can't see if 
the page is complete yet. With curl_multi_info you're supposed to get such 
info.

Ok i agree it's nog complete useless, you can still get many urls at the 
same time but you have to wait until there all loaded.

Gr,

Wico

P.S. sorry for the bad english :)


 Wico
 
 
 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
--
People can have the Model T in any colour -- so long as it's black.
- Henry Ford


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


Re: [PHP-DEV] PHP Setup / Query

2002-12-18 Thread Wico de Leeuw
At 13:19 18-12-02 +0100, Michael A. Norweh wrote:

I've installed the newest version of PHP on an ISS 5.0 based System.
The problem I have at the moment:
If post a variable (URL Query) e.g.: xxx.php?errormsg=error message to a
site, php is unable to get these variable. On my linux server the space is
interpreted as %20 in the correct way.
On IIS the variable data is cutted after error.
I think i ve set any wrong parameter in the php.ini file or in the IIS
webserver settings.



in your script do:  a href=xxx.php?errormsg=?=urlencode($errormsg)?





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



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




[PHP-DEV] Re: Bug #3830 Updated: Function to timeout/break off a function

2002-01-28 Thread Wico de Leeuw

Hiya,

thats not true... register_tcik_function is for between 2 instructions 
(lines?) and will not break into a long takeing mysql_select
(correct me if i'm wrong)

But i still think that such a function will improve php

Greetz,

Wico

At 21:54 28-1-2002 +, Bug Database wrote:
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at
http://bugs.php.net/?id=3830edit=2


ID: 3830
Updated by: yohgaki
Reported By: [EMAIL PROTECTED]
Old Status: Analyzed
Status: Closed
Bug Type: Feature/Change Request
Operating System: linux
PHP Version: 4.0 Beta 4 Patch Level 1
New Comment:

register_tick_function() can be used.


Previous Comments:


[2000-07-31 22:49:52] [EMAIL PROTECTED]

well, could be quite nice



[2000-03-14 11:27:16] [EMAIL PROTECTED]

Hiya,

i did like to see a function wich breaks into another when it take to
long:

?

funtion Hour () {
 sleep 3600;
}

// break after say 2 secs
$timeout = Timeout_function(hour(), 2);
if ($timeout) {
 // function took to long
} else {
 // function compledet normal
}

?




-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Re: Bug #12929 Updated: crash in array_map with associative arrays

2001-08-24 Thread Wico de Leeuw

At 02:00 24-8-01 +, you wrote:
ID: 12929
Updated by: andrei
Reported By: [EMAIL PROTECTED]
Old Status: Assigned
Status: Closed
Bug Type: Reproducible crash
Operating System: linux
PHP Version: 4.0.6
Assigned To: andrei
New Comment:

Fixed in CVS.

Previous Comments:


[2001-08-23 21:06:14] [EMAIL PROTECTED]

I can fix the crash, but what should be done with the keys? Should they be 
just ignored? I think it only makes sense to preserve them if you are 
mapping a single arrays, in case there are 2 or more, the keys are 
useless.. agree?

Yup i agree... :)
I was only interested in the keys

Greetz and tnx,

Wico



[2001-08-23 12:38:35] [EMAIL PROTECTED]

Have fun:
?
 $data = Array('a','b','c'); // works
#   $data = Array(1 = 'a', 2 = 'b', 3 = 'c');  // crash
#   $data = Array('1' = 'a', '2' = '3'); // crash

 $plop = array_map('addslashes', $data);
 die(I didn't crash :));
?





ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=12929edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #11651: Need something like a __LINE__ constant to show the line in *main* file.

2001-06-25 Thread Wico de Leeuw

At 08:34 25-6-2001 +, [EMAIL PROTECTED] wrote:
From: [EMAIL PROTECTED]
Operating system: Linux 5.2
PHP version:  4.0.5
PHP Bug Type: Feature/Change Request
Bug description:  Need something like a __LINE__ constant to show the line 
in *main* file.

When some error happens in function within included file it is sometimes 
very hard to find from which line in the main script (containing include 
function) this function was called. It would be much better if there were 
a way to get the number of the line within the main script file which is 
being parsed.

__FILE__

file1:

include (file2);
some_function();


file2:

function some_function() {
...
}




--
Edit Bug report at: http://bugs.php.net/?id=11651edit=1



--
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Re: [PHP-QA] 4.0.6 Packaged!

2001-06-22 Thread Wico de Leeuw

At 19:28 21-6-2001 +0200, Sascha Schumann wrote:
On Thu, 21 Jun 2001, Wico de Leeuw wrote:

  Hiya
 
  i get this error when doing make under apache 1.3.20

 A more interesting info would be the output of gcc -v.

this error is for php-4.0.5 and php-4.0.6 for apache 1.3.17 and 1.3.20

php 4.0.4pl compiles fine with 1.3.14 and 1.3.17

Greetz,

Wico

[root@linux php-4.0.5]# gcc -v
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnu/pgcc-2.95.2.1/specs
gcc version pgcc-2.95.2.1 20001224 (release)



 - Sascha Experience IRCG
   http://schumann.cx/http://schumann.cx/ircg


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Where is : get_defined_constants() ?

2001-06-22 Thread Wico de Leeuw

Hiya

there is no function (up to version php-4.0.6)  get_defined_constants()
the function is in the manual however :)

Greetz,

Wico


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Re: [PHP-QA] 4.0.6 Packaged!

2001-06-21 Thread Wico de Leeuw

Hiya

i get this error when doing make under apache 1.3.20

gcc -c  -I../../os/unix -I../../include   -DLINUX=22 
-I/home/src/wico/php-4.0.6 -I/home/src/wico/php-4.0.6/main 
-I/home/src/wico/php-4.0.6/main -I/home/src/wico/php-4.0.6/Zend 
-I/home/src/wico/php-4.0.6/Zend -I/home/src/wico/php-4.0.6/TSRM 
-I/home/src/wico/php-4.0.6/TSRM -I/home/src/wico/php-4.0.6 
-I/home/src/wico/php-4.0.6 -I/home/src/wico/php-4.0.6/main 
-I/home/src/wico/php-4.0.6/main -I/home/src/wico/php-4.0.6/Zend 
-I/home/src/wico/php-4.0.6/Zend -I/home/src/wico/php-4.0.6/TSRM 
-I/home/src/wico/php-4.0.6/TSRM -I/home/src/wico/php-4.0.6 -DUSE_EXPAT 
-I../../lib/expat-lite -DNO_DL_NEEDED -Os -O6 -march=pentium `../../apaci` 
-DAPACHE xmltok.c
In file included from xmltok.c:260:
xmltok_impl.c: In function `normal_getAtts':
xmltok_impl.c:1478: Internal compiler error in `do_spl', at loop.c:12473


At 13:03 21-6-2001 +0100, Phil Driscoll wrote:
4.0.6 built ok on Suse 7.1.
Tested with my code (MySQL stuff mainly) and PhpMyAdmin.
No problems found.

Cheers

--
Phil Driscoll

--
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Timeout Function

2001-04-25 Thread Wico de Leeuw

At 13:53 24-4-2001 -0700, Rasmus Lerdorf wrote:
  I would like to see a timeout function implemented in PHP (something like
  Perl's alarm function would be perfect). I notice there is a
  set_time_limit() function in PHP, but it cannot be applied to a specified
  block of code (it applies to the entire script) and it causes a fatal error
  when the timeout is reached (instead of letting you run some alternate code
  if the timeout is reached).

That's not true.  If you use register_shutdown_function() then this
function you register will be run once the timeout hits.  See the chapter
in the manual on connection handling.

But you can't continue normally from within the register_shutdown_function 
(output to browser and stuff)
You can't use it more than once etc.

I think it's a good option (and submitted a feature request a long time ago 
for that)

http://www.php.net/bugs.php?id=3830

Greetz,

Wico



-Rasmus


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #10301: How can I execute an unix command?

2001-04-12 Thread Wico de Leeuw

At 13:51 12-4-2001 +, [EMAIL PROTECTED] wrote:
From: [EMAIL PROTECTED]
Operating system: linux
PHP version:  Earlier? Upgrade first!
PHP Bug Type: Filesystem function related
Bug description:  How can I execute an unix command?

For example : 'tail -n 10 test.txt  test2.txt'
I tryed use the exec() function, but without success.

Go RTFM

https://www.zend.com/manual/ref.exec.php

thanks


--
Edit Bug report at: http://bugs.php.net/?id=10301edit=1



--
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #10301: How can I execute an unix command?

2001-04-12 Thread Wico de Leeuw

At 13:51 12-4-2001 +, [EMAIL PROTECTED] wrote:
From: [EMAIL PROTECTED]
Operating system: linux
PHP version:  Earlier? Upgrade first!
PHP Bug Type: Filesystem function related
Bug description:  How can I execute an unix command?

For example : 'tail -n 10 test.txt  test2.txt'
I tryed use the exec() function, but without success.

thanks

You can close your bug report now cuz this has nothing to do with bugs only 
with being lazy


--
Edit Bug report at: http://bugs.php.net/?id=10301edit=1



--
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Function suggestion

2001-04-11 Thread Wico de Leeuw

At 12:43 10-4-2001 -0700, Rasmus Lerdorf wrote:
Hiya

I have been using this (selfmade) function for ages:

function String_Replace_Foreign_Chars ($data) {
 return(strtr($data, 
"",
 "AAaaCcDNnO0oo0YyyB"));
}

Greetz,

Wico

Using str_replace() would speed this function up by an order of magnitude.

On Tue, 10 Apr 2001, Lindsey Simon wrote:

  I'm not positive I'm mailing to the right list, but I have a function 
 that might be useful
  to others. I often use php to retrieve a name from a database and then 
 let a user upload a
  file and I name that file by as $user.mp3(in this case). I need to 
 convert all of the
  international characters to a standard character for this since 
 different OS's send
  requests for filenames with non-standard standards...
 
  so here goes:
 
  function intl2plain ($thing) {
$thing = preg_replace("/xE0/", "a", $thing);
$thing = preg_replace("/xE8/", "e", $thing);
$thing = preg_replace("/xEC/", "i", $thing);
$thing = preg_replace("/xF2/", "o", $thing);
$thing = preg_replace("/xF9/", "u", $thing);
 
$thing = preg_replace("/\xC0/", "A", $thing);
$thing = preg_replace("/\xC8/", "E", $thing);
$thing = preg_replace("/\xCC/", "I", $thing);
$thing = preg_replace("/\xD2/", "O", $thing);
$thing = preg_replace("/\xD9/", "U", $thing);
 
$thing = preg_replace("/\xE1/", "a", $thing);
$thing = preg_replace("/\xE9/", "e", $thing);
$thing = preg_replace("/\xED/", "i", $thing);
$thing = preg_replace("/\xF3/", "o", $thing);
$thing = preg_replace("/\xFA/", "u", $thing);
$thing = preg_replace("/\xFD/", "y", $thing);
 
$thing = preg_replace("/\xC1/", "A", $thing);
$thing = preg_replace("/\xC9/", "E", $thing);
$thing = preg_replace("/\xCD/", "I", $thing);
$thing = preg_replace("/\xD3/", "O", $thing);
$thing = preg_replace("/\xDA/", "U", $thing);
$thing = preg_replace("/\xDD/", "Y", $thing);
 
$thing = preg_replace("/\xE2/", "a", $thing);
$thing = preg_replace("/\xEA/", "e", $thing);
$thing = preg_replace("/\xEE/", "i", $thing);
$thing = preg_replace("/\xF4/", "o", $thing);
$thing = preg_replace("/\xFB/", "u", $thing);
 
$thing = preg_replace("/\xC2/", "A", $thing);
$thing = preg_replace("/\xCA/", "E", $thing);
$thing = preg_replace("/\xCE/", "I", $thing);
$thing = preg_replace("/\xD4/", "O", $thing);
$thing = preg_replace("/\xDB/", "U", $thing);
 
$thing = preg_replace("/\xE3/", "a", $thing);
$thing = preg_replace("/\xF1/", "n", $thing);
$thing = preg_replace("/\xF5/", "o", $thing);
 
$thing = preg_replace("/\xC3/", "A", $thing);
$thing = preg_replace("/\xD1/", "N", $thing);
$thing = preg_replace("/\xD5/", "O", $thing);
 
$thing = preg_replace("/\xE4/", "a", $thing);
$thing = preg_replace("/\xEB/", "e", $thing);
$thing = preg_replace("/\xEF/", "i", $thing);
$thing = preg_replace("/\xF6/", "o", $thing);
$thing = preg_replace("/\xFC/", "u", $thing);
$thing = preg_replace("/\xFF/", "y", $thing);
 
$thing = preg_replace("/\xC4/", "A", $thing);
$thing = preg_replace("/\xCB/", "E", $thing);
$thing = preg_replace("/\xCF/", "I", $thing);
$thing = preg_replace("/\xD6/", "O", $thing);
$thing = preg_replace("/\xDC/", "U", $thing);
$thing = preg_replace("/\x9f/", "Y", $thing);
 
$thing = preg_replace("/\xE7/", "c", $thing);
$thing = preg_replace("/\xC7/", "C", $thing);
 
return $thing;
  }
 
  Maybe it's useful for others, it's along the lines of 
 htmlspecialchars(); etc...
 
  -lindsey
 
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] PHP 4.0 Bug #9029: preg_split inconsistency

2001-01-31 Thread Wico de Leeuw

you gotta escape the escapes

$b = preg_split('/([\\(\\)])/', $a);

Greetz,

Wico


At 13:13 31-1-01 +, [EMAIL PROTECTED] wrote:
From: [EMAIL PROTECTED]
Operating system: OpenBSD 2.8
PHP version:  4.0.4pl1
PHP Bug Type: PCRE related
Bug description:  preg_split inconsistency

While trying to write a simple Scheme parser in PHP, we encountered this 
problem:

In perl, you can capture the delimiters passed to split() by enclosing the 
portion with brackets, in the regexp.  This does not work in PHP.

For example, here is the perl script, and its output:

#!/usr/bin/perl
use Data::Dumper;

$_ = '(define heshe (if (equal gender "Male") "He" "She")) ';
@b = split /([\(\)])/;
print Dumper(@b);

Output:
$VAR1 = '';
$VAR2 = '(';
$VAR3 = 'define heshe ';
$VAR4 = '(';
$VAR5 = 'if ';
$VAR6 = '(';
$VAR7 = 'equal gender "Male"';
$VAR8 = ')';
$VAR9 = ' "He" "She"';
$VAR10 = ')';
$VAR11 = '';
$VAR12 = ')';
$VAR13 = ' ';

But in PHP:

? $a = '(define heshe (if (equal gender "Male") "He" "She")) ';
$b = preg_split('/([\(\)])/', $a);
var_dump($b); ?

Outputs:
array(7) {
   [0]=
   string(0) ""
   [1]=
   string(13) "define heshe "
   [2]=
   string(3) "if "
   [3]=
   string(19) "equal gender "Male""
   [4]=
   string(11) " "He" "She""
   [5]=
   string(0) ""
   [6]=
   string(1) " "
}

The brackets aren't captured, which makes the Scheme parsing a bit 
difficult :-)  There are other ways to do this, of course, but the 
preg_split() would be the simplest and the most efficient way to do it, as 
far as we can see.

I noticed that the PCRE libraries are only at version 3.0 in PHP, and that 
3.4 is available from the main site.  I'll try updating to that, and see 
if it solves this.


--
Edit Bug report at: http://bugs.php.net/?id=9029edit=1



--
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] PHP 4.0 Bug #8860 Updated: variable array not working

2001-01-23 Thread Wico de Leeuw

At 15:20 23-1-01 +, [EMAIL PROTECTED] wrote:
ID: 8860
Updated by: cynic
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Scripting Engine problem
Assigned To:
Comments:

ah, sorry, should've read the report more carefully.


So what should it echo?
three or Grrr?

i think three

Greetz,

Wico

Previous Comments:
---

[2001-01-23 10:07:21] [EMAIL PROTECTED]
changed status

---

[2001-01-23 10:06:24] [EMAIL PROTECTED]
ok and that isn;t working either...
althoug i liked the first more (and still think it should be that way)

so this doesn't work either:

$three = "G";

echo "Test";
$test = Array("one","two","three","four"); $var = 'test[2]'; echo $$var; 
/* should echo "three" */


---

[2001-01-23 09:59:43] [EMAIL PROTECTED]
no. it will echo contents of $three. if you don't have that variable in 
current scope, it'll echo null, and, depending on your settings, emit a 
warning.

---

[2001-01-23 09:57:18] [EMAIL PROTECTED]
according to Zeev this should work:

$test = Array("one","two","three","four"); $var = 'test[2]'; echo $$var; 
/* should echo "three" */

But with it doesn't


Greetz,

Wico

---


Full Bug description available at: http://bugs.php.net/?id=8860


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Re: PHP 4.0 Bug #6046 Updated: preg_replace for a special pattern

2001-01-22 Thread Wico de Leeuw

At 08:18 21-1-01 +, Bug Database wrote:
ID: 6046
Updated by: cynic
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Feature/Change Request
Assigned To:
Comments:

use non-capturing patterns.

Sometimes you can't

like ([0-9]?(?(1))[a-z])

Now you need to capture

Greetz,

Wico


Previous Comments:
---

[2000-08-09 07:41:24] [EMAIL PROTECTED]
hiya

if you have a regex that captures more than one pattern i'd to give a 
argument to the function which to replace

say:
regex: (a)(b)(a)
replace: test

preg_replace("'(a)(b)(a)'", "test", "abaabaaba");
normal preg_replace will replace 'aba' with 'test' outputing: testtesttest

preg_replace_pattern_no("'(a)(b)(a)'", "test", "abaabaaba", 2);
replacing pattern 2 and outputting: atestaatestaatesta

Greetz,

Wico

---


Full Bug description available at: http://bugs.php.net/?id=6046


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Compile error (multiple compilations)

2001-01-12 Thread Wico de Leeuw

Hiya

gcc -c  -I../../os/unix -I../../include   -DLINUX=2 
-I/home/src/php-4.0.4pl1 -I/home/src/php-4.0.4pl1/main 
-I/home/src/php-4.0.4pl1/main -I/home/src/php-4.0.4pl1/Zend 
-I/home/src/php-4.0.4pl1/Zend -I/home/src/php-4.0.4pl1/TSRM 
-I/home/src/php-4.0.4pl1/TSRM -I/home/src/php-4.0.4pl1 -DUSE_EXPAT 
-I../../lib/expat-lite -DNO_DL_NEEDED -Os -O6 -march=pentium `../../apaci` 
-DAPACHE xmltok.c
In file included from xmltok.c:260:
xmltok_impl.c: In function `normal_getAtts':
xmltok_impl.c:1478: Internal compiler error in `do_spl', at loop.c:12473

changing -O6 to -O3 works



At 11:15 12-1-01 +0100, Wico de Leeuw wrote:
Hiya

when changing:
/bin/sh ../libtool --silent --mode=compile /home/src/php-4.0.4pl1/meta_cc 
-DHAVE_CONFIG_H -I. -I. -I../main   s -O6 -march=pentium  -c ./zend_execute.c

to:

/bin/sh ../libtool --silent --mode=compile /home/src/php-4.0.4pl1/meta_cc 
-DHAVE_CONFIG_H -I. -I. -I../main   -Os -O6 -march=pentium  -c ./zend_execute.c


and run make again everything is fine

Greetz,

Wicp


At 10:54 12-1-01 +0100, Wico de Leeuw wrote:
Hiya

when compiling php-4.0.4pl1

my CFLAGS AND CXXFLAGS are: "-Os -O6 -march=pentium"
using pgcc-2.95.2.1 linux rehat 6.2

i get this error when compiling php:

/bin/sh ../libtool --silent --mode=compile /home/src/php-4.0.4pl1/meta_cc 
-DHAVE_CONFIG_H -I. -I. -I../main -Os -O6 -march=pentium -c 
zend_constants.c
/bin/sh ../libtool --silent --mode=compile /home/src/php-4.0.4pl1/meta_cc 
-DHAVE_CONFIG_H -I. -I. -I../main -Os -O6 -march=pentium -c 
zend_dynamic_array.c
/bin/sh ../libtool --silent --mode=compile /home/src/php-4.0.4pl1/meta_cc 
-DHAVE_CONFIG_H -I. -I. -I../main   s -O6 -march=pentium  -c ./zend_execute.c
gcc: cannot specify -o with -c or -S and multiple compilations
make[1]: *** [zend_execute.lo] Error 1
make[1]: Leaving directory `/home/src/php-4.0.4pl1/Zend'
make: *** [all-recursive] Error 1
[root@linux src]#

Look like it strips off the -O and forgets the rest

Greetz,

Wico


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]