ID:               39646
 User updated by:  noreply at test dot com
-Reported By:      jeremy_lupoli at hotmail dot com
+Reported By:      noreply at test dot com
 Status:           Bogus
 Bug Type:         *Regular Expressions
 Operating System: Windows XP
 PHP Version:      5.2.0
 New Comment:

Changing email.


Previous Comments:
------------------------------------------------------------------------

[2006-11-27 17:21:47] tony2...@php.net

preg_match() knows nothing about HTTP or HTTPS, there must be something
else, that affect this behaviour (different data, for example).

------------------------------------------------------------------------

[2006-11-27 16:47:46] noreply at test dot com

Description:
------------
Very oddly, preg_match does not seem to work in some cases over
https:// while it works fine over http://

See:
https://208.97.159.12/test.php (doesn't work) vs.
http://208.97.159.12/test.php (does work).

Only occurs when array is declared implicitely in function, e.g.
preg_match($pat, $class, $mat=array()) does not work on  https:// while
preg_match($pat, $class, $mat) works on both https:// and http://







Reproduce code:
---------------
<? $class="C11"; ?>
<?
$pat = '/^(\D+)(\d+)$/';
if (!preg_match($pat, $class, $mat=array())) {
$notdigits='';
$digits = '';
} else {
print_r($mat);
}  
?>

Expected result:
----------------
Array ( [0] => C11 [1] => C [2] => 11 )

Actual result:
--------------
Array ( )


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39646&edit=1

Reply via email to