[PHP-DEV] PHP 4 Bug Summary Report

2007-10-01 Thread internals
 PHP 4 Bug Database summary - http://bugs.php.net

 Num Status Summary (634 total including feature requests)
===[*Programming Data Structures]=
40496 Assigned   Test bug35239.phpt still fails (works in PHP 5)
===[*Regular Expressions]=
42283 Open   problem in regular expressions
===[Apache2 related]==
38670 Open   Whole 4.4.x branch has problem with open_basedir option nested 
from Apache2
===[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
42177 Open   Warning array_merge_recursive(): recursion detected comes 
again...
===[CGI related]==
42180 Open   php in fastcgi environment periodicaly get 90% of CPU
42701 Open   php4-cgi under fastcgi does not respect -d argument
===[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)
===[Compile Failure]==
42807 Open   Can't find php_session.h if using non-standard location.
===[Date/time related]
42671 Open   ext/standard/tests/time/002.phpt fails due to AIX not 
supporting TZ=US/Eastern
===[Documentation problem]
29045 Suspended   gzopen for URL
36663 Open   unexpected difference between zlib.output_compression and 
ob_gzhandler
===[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
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
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 Authentication
8855 Open 

[PHP-DEV] PHP 6 Bug Summary Report

2007-10-01 Thread internals
 PHP 6 Bug Database summary - http://bugs.php.net

 Num Status Summary (62 total including feature requests)
===[*General Issues]==
26771 Suspended  register_tick_funtions crash under threaded webservers
===[*Unicode Issues]==
42163 Open   fgetcvs gives different output with and without Unicode
42731 Open   strcspn() gives incorrect output with mask as empty string 
with unicode on
42746 Open   '\u' char in single quotes gets interepreted.
===[Apache2 related]==
42209 Open   fail on make for sapi/apache2handler/apache_config.lo
===[Arrays related]===
35277 Suspended  incorrect recursion detection
41758 Assigned   SORT_LOCALE_STRING broken for sort() in PHP6
===[Class/Object related]=
33595 Assigned   recursive references leak memory
41461 Assigned   E_STRICT notice when overriding methods not defined by an 
Interface in hierarchy
===[Compile Failure]==
42606 Open   unicode/constants.c relies on ICU draft api
===[Feature/Change Request]===
20377 Open   php_admin_value affects _only_ .htaccess
27618 Open   curl_multi_info_read does not appear to work
29479 Suspended  changing current process name
34211 Open   PDO_OCI: Allow for data type TIMESTAMP(0) WITH LOCAL TIME 
ZONE
34252 Open   Base functions extension and refactoring
34527 Open   trim functions extension
34775 Open   parse_url() provide better error description on failure
34882 Open   Unable to access *original* posted variable name with dot in
35309 Open   Database connection pooling
37081 Open   Make the include-errors mention faulty permissions
37380 Open   DOMDocument-createAttribute[NS] can't set value
37546 Open   DOMDocumentFragment-appendXML namespace support
37796 Open   t_is_not_identical for  ?
38622 Open   Proposed new security scheme for shared hosting (safe mode 
substitute)
38946 Open   pecl/docblock should be merged into ext/tokenizer
40013 Open   php_uname() doesnt return nodename
40499 Open   filter sapi does not register any highlightning filter
40713 Open   set_magic_quotes_runtime(0) causes Fatal Error
41019 Assigned   auto update feature for FastCGI for IIS
41119 Open   range() function behavior different on PHP6 and PHP5
41602 Open   POSIX functions on Windows using Cygwin Library
42262 Open   get_magic_quotes_gpc() should be there and return false
===[Filesystem function related]==
27792 Assigned   Functions fail on large files (filesize,is_file,is_dir)
42037 Open   fgetc() retuns one char when fails to read on php6
42057 Open   fwrite() writes data into file when length is given as a 
negative value
42110 Open   fgetcsv doesn't handle \n correctly in multiline csv record
42125 Open   fgetss reads an extra char from file created using 
file_put_content()
42126 Open   size of the file differ, when created using file_put_content() 
on php6
42167 Open   fgetcsv gives different output on php6 compared to php5
42219 Open   length argument of fgetcsv() is not effective/working in PHP6
42229 Open   fgetcsv() behaves differently for a file containing '\n' with 
php5 and php6.
===[GD related]===
34670 Assigned   imageTTFText for Indian scripts (Devanagari)
34992 Assigned   imageconvolution does not respect alpha
===[I18N and L10N related]
42471 Open   locale_set_default returns true on invalid locales
===[ODBC related]=
39756 Assigned   Crashes in fetching resultsets with LONG ASCII columns from 
MaxDB
===[OpenSSL related]==
25614 Suspended  openssl_pkey_get_public() fails when given a private key
===[Other web server]=
26495 Suspended  Using WebSite Pro 2.5 with ISAPI, cookies are not working
===[PDO related]==
35368 Suspended  PDO query does not work properly with serialize
39171 Assigned   pdo_mysql configure script sets empty default socket
42079 Open   pdo_mysql always links to 3.x libraries
===[Performance problem]==
42528 Open   Out of char(8-bit) range value doesn't roll back, with 
uni-code ON.
===[Program Execution]
39992 Open   proc_terminate() leaves children of child running

Re: [PHP-DEV] CVS Account Request: ab5602

2007-10-01 Thread Antony Dovgal
On 01.10.2007 07:29, Robert Thompson wrote:
 Help debug and fix continuing issues with respect to PHP + Solaris.   
 In the position of debugging and fixing Solaris + PHP issues almost 
 exclusively for my job. 
 In particular, I would like to contribute to code fixes and configuration 
 checks for the 
 many issues PHP is facing with respect to Solaris's shifty getcwd() and 
 realpath() bugs.

While I absolutely appreciate your effort to improve PHP's Solaris support 
(which is not in the best shape atm), I have to say that we usually do not give 
CVS accounts right away.
CVS account is not necessary for sending patches and discussing them in the 
list, 
which is the best way to make yourself known to the community.

Btw, I believe discussion would be required in most cases since Solaris 
problems affect quite major parts of PHP.

So please send you patches to internals@lists.php.net, we'd be happy to discuss 
and apply them.

-- 
Wbr, 
Antony Dovgal

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



[PHP-DEV] Re: Compiled variables and backpatching

2007-10-01 Thread Paul Biggar
Hi,

Stanislav wrote me a very useful reply to my CV questions. I wonder if
anyone has time to give me a quick note on backpatching, and what that
is?

On 9/23/07, Paul Biggar [EMAIL PROTECTED] wrote:
 What is backpatching?
 Is it related to compiled variables, or are they different concepts?
 Why was backpatching necessary?
 Is this performance related, and what performance impact does backpatching 
 have?

Thanks a lot,
Paul


-- 
Paul Biggar
[EMAIL PROTECTED]

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



Re: [PHP-DEV] T_IMPORT vs. T_USE

2007-10-01 Thread Johannes Schlüter
Hi Sebastiann et al.,

On Sun, 2007-09-30 at 18:06 +0200, Sebastian Bergmann wrote:
 When we removed the namespace implementation that was scheduled for
  PHP 5.0 before PHP 5.0's release we kept the T_NAMESPACE and T_USE
  tokens for forward-compatibility.

T_NAMESPACE is new, only T_USE wasn't removed back then. afaik. ;-)

  The new namespace implementation in HEAD and PHP_5_3 uses the the new
  T_IMPORT token instead of T_USE thus breaking code as import is now
  a reserved word.
 
  We should, IMHO, drop T_IMPORT and change the namespace implementation
  to use T_USE.
 
  Thoughts?

Well, import seems to be a word used quite often in PHP for method
names, after I found some code breaking I did a short test using
Google's Codesearch[1] to look for method calls using -import( and
got about 300 results including major apps like horde, tikiwiki, typo3
and wordpress.

Therefor I think it's worth to at least think about using the already
reserved, but not used, keyword use. From taking a look at the
language (the English one in this case ;-)) a sentence like use
Namespace::SomeClass as SomeClass makes perfect sense to me - but I
don't know much about the concept of Perl's (and other language's)
meaning of use, BUT, we're neither Java nor Perl but PHP so we should
use the keyword fitting best to PHP...

If we can agree on the change I can write a patch changing the token and
renaming the internal stuff accordingly.

johannes

[1] http://www.google.com/codesearch?q=lang%3Aphp+%22-%3Eimport%28%
22hl=enbtnG=Search+Code

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



RE: [PHP-DEV] [patch] Late static bindings (LSB)

2007-10-01 Thread Dmitry Stogov
Hi Robin,

Thank you for catching this issue.
static:: make no sense in compile-time constants.
I've just forbidden it there.

Thanks. Dmitry.



 -Original Message-
 From: Robin Fernandes [mailto:[EMAIL PROTECTED] 
 Sent: Friday, September 28, 2007 6:45 PM
 To: internals@lists.php.net
 Cc: Stanislav Malyshev; Baptiste Autin; Zoe Slattery; Dmitry 
 Stogov; Marcus Boerger; Lukas Kahwe Smith; Michael Lively; 
 Etienne Kneuss; Andi Gutmans
 Subject: Re: [PHP-DEV] [patch] Late static bindings (LSB)
 
 
 Sorry to persist with this, but I think it could be really 
 useful to clarify the meaning of static:: outside of method 
 bodies... particularly since parent:: and self:: can already 
 behave very strangely in such scenarios (see 
 http://news.php.net/php.internals/32443 ).
 
 For example, I find the following behaviour with the current patch
 counter-intuitive:
 
 ?php
 // NOTE: X is not related to A.
 class X  {
   const MY_CONST = I am completely unrelated to class A.;
   static function createA() {
 new A;  // triggers initialiser evaluation
   }
 }
 
 class A {
   const MY_CONST = const A;
   public $p = static::MY_CONST;
   static function getInstance() {
 return new A;
   }
 }
 
 // First instantiate A inside X. This causes A's properties'
 // default values to be evaluated within X's scope. X::createA();
 
 // Now that A's default values have been evaluated,
 // behaviour is as if any new instance of A treats
 // the occurrence of static:: on line 12 to mean X.
 
 // Instantiate A inside A:
 $a = A::getInstance();
 var_dump($a-p);// has value of X::MY_CONST.
 
 // Instantiate A at global scope:
 $a = new A();
 var_dump($a-p);// has value of X::MY_CONST.
 ?
 
 Actual output:
 string(37) I am completely unrelated to class A.
 string(37) I am completely unrelated to class A.
 
 
 Some thoughts:
  - static:: could simply be forbidden in all class 
 property/constant default values.
  - Any occurrences of static:: in instance property default 
 values could behave as if they were in the constructor, but 
 be forbidden in static property and constant initialisers.
  - Other ideas?
 
 
 Also, there are some questions around reflection. All of the following
 A::reflect*() calls cause a fatal error like:
   PHP Fatal error:  Undefined class constant 'MY_CONST' in %s 
 on line %d
 
 ?php
 class A {
   const MY_CONST = const A;
   const C1 = static::MY_CONST;
 
   static function f($a = static::MY_CONST) {
 return $a;
   }
 
   static function f2() {
 static $x = static::MY_CONST;
   }
 
 
   static function reflectConst() {
 $rc = new ReflectionClass('A');
 var_dump($rc-getConstant('C1'));
   }
 
   static function reflectArg() {
 $rm = new ReflectionMethod('A::f');
 $rps = $rm-getParameters();
 var_dump($rps[0]-getDefaultValue());
   }
 
   static function reflectStat() {
 $rm = new ReflectionMethod('A::f2');
 var_dump($rm-getStaticVariables());
   }
 
 }
 
 A::reflectConst(); // fatal error
 A::reflectArg();   // fatal error
 A::reflectStat();  // fatal error
 ?
 
 Is this desirable? One could argue that the reflection calls 
 emanate from A::, so static:: could be resolved accordingly. 
 This test case suggests that static:: is in fact being bound 
 to the ReflectionClass class itself (since 
 ReflectionClass::IS_FINAL===64) :
 
 ?php
 class A {
   const IS_FINAL = This string is not integer sixty-four;
   const C1 = static::IS_FINAL;
 }
 
 $rc = new ReflectionClass('A');
 $rc-getConstant('C1');  // trigger evaluation of A::C1
 
 var_dump(A::C1);
 ?
 
 Actual output:
 int(64)
 
 
 Kind regards,
 Robin
 
 On 27/09/2007, Jingcheng Zhang [EMAIL PROTECTED] wrote:
  Hello,
  static methods seem exactly like dynamic binded methods now, is 
  there any chance that abstract static function being 
 restored from 
  E_STRICT limitation? Currently it is allowed in interfaces, but 
  forbidden in abstract class, I don't know why php 
 implements static 
  method in this way, this seems strange.. Thanks!
 
  On 9/27/07, Stanislav Malyshev [EMAIL PROTECTED] wrote:
  
So, if I understand you well, Stanislas, you are personally not 
much
   into
static:: but more into making that sort of code working :
   
interface iC {
  public $structure;
}
abstract class A implements iC {
  public function display() {
  echo self::$structure;
  }
}
class B extends A {
  static public $structure = This is a string.;
}
$b = new B();
$b-display();
  
   No, I don't think we should make interfaces with 
 variables, I'm just 
   telling that the code before had API that not allowed correctly 
   enforce its requirements.
   --
   Stanislav Malyshev, Zend Software Architect
   [EMAIL PROTECTED]   http://www.zend.com/
   (408)253-8829   MSN: [EMAIL PROTECTED]
  
   --
   PHP Internals - PHP Runtime Development Mailing List
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 
 
  

[PHP-DEV] substr/array_slice in []

2007-10-01 Thread Alexey Zakhlestin
Here http://www.php.net/~derick/meeting-notes.html#cleanup-for-vs is a
phrase For both strings and arrays, the [] operator will support
substr()/array_slice() functionality

will it appear in php5.x (php 5.3)?


-- 
Alexey Zakhlestin
http://blog.milkfarmsoft.com/

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



Re: [PHP-DEV] substr/array_slice in []

2007-10-01 Thread Ilia Alshanetsky
This was not on the table and the time of the 5.3 discussion, I for  
one think its a bit too much magic.


On 1-Oct-07, at 7:30 AM, Alexey Zakhlestin wrote:


Here http://www.php.net/~derick/meeting-notes.html#cleanup-for-vs is a
phrase For both strings and arrays, the [] operator will support
substr()/array_slice() functionality

will it appear in php5.x (php 5.3)?


--
Alexey Zakhlestin
http://blog.milkfarmsoft.com/

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



Ilia Alshanetsky

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



Re: [PHP-DEV] substr/array_slice in []

2007-10-01 Thread Antony Dovgal
On 01.10.2007 16:32, Ilia Alshanetsky wrote:
 This was not on the table and the time of the 5.3 discussion, I for  
 one think its a bit too much magic.

Yeah, too Perl-ish for me.

-- 
Wbr, 
Antony Dovgal

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



Re: [PHP-DEV] [PATCH] Getopt with longopts and windows support - part 2

2007-10-01 Thread Jani Taskinen
Patch applied to HEAD / PHP_5_3.

--Jani

On Mon, 2007-08-06 at 09:57 -0400, David Soria Parra wrote:
 Hi internals,
 
 so based on a discussion of php.pecl we thought about using the php_getopt
 for the PHP_FUNCTION(getopt) instead of the system provided getopt. Here
 is the patch for that. Hopefully someone is reviewing and commiting the
 patch as i don't have karma. 
 
 It addes main/getopt.c main/php_getopt.h to the build system and uses the
 php_getopt function in the ext/standard/basic_functions.c. Furthermore it
 removes all HAVE_GETOPT and HARTMUT_0 switches. it also enable longopts
 for both win and linux in the form
  
 $opt = getopt(a, array(param:, param2));
 
 Where : in the longopts marks that the parameter takes an argument.
 
 The main/getopt.c and main/php_getopt.h is in fact taken from
 sapi/cli/getopt.c and sapi/cli/php_getopt.h but is slightly modified.
 
 http://experimentalworks.net/~dsp/getopt.patch.tar.gz
 
 It also runs on windows.
 
 To apply the patch:
  1) remove 
sapi/cli/getopt.c sapi/cli/php_getopt.h 
sapi/cgi/getopt.c sapi/cgi/php_getopt.h
 
  2) add main/getopt.c and main/php_getopt.h frm the archive
  3) apply the patch.
 
-- 
Patches/Donations: http://pecl.php.net/~jani/

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



Re: [PHP-DEV] substr/array_slice in []

2007-10-01 Thread Stanislav Malyshev

Alexey Zakhlestin wrote:

Here http://www.php.net/~derick/meeting-notes.html#cleanup-for-vs is a
phrase For both strings and arrays, the [] operator will support
substr()/array_slice() functionality

will it appear in php5.x (php 5.3)?


I think since we do have substr/array_slice there's no need to overload 
[] operator.

--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

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



Re: [PHP-DEV] Re: Compiled variables and backpatching

2007-10-01 Thread Stanislav Malyshev

Stanislav wrote me a very useful reply to my CV questions. I wonder if
anyone has time to give me a quick note on backpatching, and what that
is?


I think backpatching refers to updating past opcodes (i.e. opcodes for 
code that was already parsed) when they need something that would be 
known only in the future. E.g., if you have if/else statement, then when 
if condition is false you need to jump to else, but else was not parsed 
yet - so when we parse if, we create opcode, but then update it when we 
parse else so that it jumps to the right place. Also backpatching is 
used to compose variable expressions -  like $foo[$bar]-x-$y-z.

--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

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



Re: [PHP-DEV] substr/array_slice in []

2007-10-01 Thread Andrei Zmievski

It's on my TODO list.

-Andrei

Alexey Zakhlestin wrote:

Here http://www.php.net/~derick/meeting-notes.html#cleanup-for-vs is a
phrase For both strings and arrays, the [] operator will support
substr()/array_slice() functionality

will it appear in php5.x (php 5.3)?




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



RE: [PHP-DEV] T_IMPORT vs. T_USE

2007-10-01 Thread Andi Gutmans
Hi Johannes,
Our preference would be to stick to import because I think the perception 
many will have of use is that it also includes files (just based on some 
other languages). That said I agree that compatibility would be an issue here. 
In fact it's even somewhat of an issue with namespace which is probably also 
used quite a bit esp. in relation to XML.

What I'd like to do is see if it's feasible to support reserved words as 
identifiers. It should be possible but we need to see if it makes sense, how it 
affects consistency, and if we do it what identifiers we'd do it for (or all?).

We probably won't get to this until after our conference next week so my 
suggestion is to keep it as-is for now and then revisit it. We're still far 
enough off from the release so that we don't need to finalize today.

Thx.
Andi

 -Original Message-
 From: Johannes Schlüter [mailto:[EMAIL PROTECTED]
 Sent: Monday, October 01, 2007 4:24 AM
 To: Sebastian Bergmann
 Cc: internals@lists.php.net
 Subject: Re: [PHP-DEV] T_IMPORT vs. T_USE
 
 Hi Sebastiann et al.,
 
 On Sun, 2007-09-30 at 18:06 +0200, Sebastian Bergmann wrote:
  When we removed the namespace implementation that was scheduled for
   PHP 5.0 before PHP 5.0's release we kept the T_NAMESPACE and T_USE
   tokens for forward-compatibility.
 
 T_NAMESPACE is new, only T_USE wasn't removed back then. afaik. ;-)
 
   The new namespace implementation in HEAD and PHP_5_3 uses the the
 new
   T_IMPORT token instead of T_USE thus breaking code as import is
 now
   a reserved word.
 
   We should, IMHO, drop T_IMPORT and change the namespace
 implementation
   to use T_USE.
 
   Thoughts?
 
 Well, import seems to be a word used quite often in PHP for method
 names, after I found some code breaking I did a short test using
 Google's Codesearch[1] to look for method calls using -import( and
 got about 300 results including major apps like horde, tikiwiki,
 typo3
 and wordpress.
 
 Therefor I think it's worth to at least think about using the already
 reserved, but not used, keyword use. From taking a look at the
 language (the English one in this case ;-)) a sentence like use
 Namespace::SomeClass as SomeClass makes perfect sense to me - but I
 don't know much about the concept of Perl's (and other language's)
 meaning of use, BUT, we're neither Java nor Perl but PHP so we should
 use the keyword fitting best to PHP...
 
 If we can agree on the change I can write a patch changing the token
 and
 renaming the internal stuff accordingly.
 
 johannes
 
 [1] http://www.google.com/codesearch?q=lang%3Aphp+%22-%3Eimport%28%
 22hl=enbtnG=Search+Code
 
 --
 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] substr/array_slice in []

2007-10-01 Thread Martin Alterisio
Sorry to bother, I have a few questions on this matter.
How will this impact on the SPL ArrayAccess and related interfaces and
objects?
Will there be an interface to this functionality?
If so, how will ranges be passed through to this interface?
Will this be consistent with substr() and array_slice() if used with an
ArrayAccess implementation?

Thank you and sorry for the bother.

Regards,

Martin Alterisio

2007/10/1, Alexey Zakhlestin [EMAIL PROTECTED]:

 Here http://www.php.net/~derick/meeting-notes.html#cleanup-for-vs is a
 phrase For both strings and arrays, the [] operator will support
 substr()/array_slice() functionality

 will it appear in php5.x (php 5.3)?


 --
 Alexey Zakhlestin
 http://blog.milkfarmsoft.com/

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




Re: [PHP-DEV] substr/array_slice in []

2007-10-01 Thread Stanislav Malyshev

Sorry to bother, I have a few questions on this matter.
How will this impact on the SPL ArrayAccess and related interfaces and
objects?


That's the problem with such syntax - one would expect it works with 
ArrayAccess and it starts to be complicated...


--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

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



Re: [PHP-DEV] T_IMPORT vs. T_USE

2007-10-01 Thread Gregory Beaver
Andi Gutmans wrote:
 Hi Johannes, Our preference would be to stick to import because I
 think the perception many will have of use is that it also includes
 files (just based on some other languages). That said I agree that
 compatibility would be an issue here. In fact it's even somewhat of
 an issue with namespace which is probably also used quite a bit
 esp. in relation to XML.
 
 What I'd like to do is see if it's feasible to support reserved words
 as identifiers. It should be possible but we need to see if it makes
 sense, how it affects consistency, and if we do it what identifiers
 we'd do it for (or all?).

This would be pretty easy, in a hackish way, by adding a whole bunch of
duplicate rules T_FUNCTION T_STRING, T_FUNCTION T_IMPORT, T_FUNCTION
T_NAMESPACE and so on.  A more robust way would be to move to lemon/re2c
but I'm not volunteering to do this (yet?)

:)
Greg

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



Re: [PHP-DEV] T_IMPORT vs. T_USE

2007-10-01 Thread Stanislav Malyshev

This would be pretty easy, in a hackish way, by adding a whole bunch of
duplicate rules T_FUNCTION T_STRING, T_FUNCTION T_IMPORT, T_FUNCTION
T_NAMESPACE and so on.  A more robust way would be to move to lemon/re2c
but I'm not volunteering to do this (yet?)


probably better something like keyword_as_identifier - T_IMPORT | 
T_NAMESPACE | etc. and then T_FUNCTION keyword_as_identifier, T_CLASS 
keyword_as_identifier etc. But we have to watch out for expressions - 
there could be conflicts... That's what we should check.


--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

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



Re: [PHP-DEV] T_IMPORT vs. T_USE

2007-10-01 Thread Stefan Walk

Andi Gutmans schrieb:

Our preference would be to stick to import because I think the perception many will have of 
use is that it also includes files (just based on some other languages). That said I agree that 
compatibility would be an issue here. In fact it's even somewhat of an issue with namespace which 
is probably also used quite a bit esp. in relation to XML.


You mean like import includes files in python? ;)

Regards,
Stefan

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



[PHP-DEV] [PATCH] Proposal for fixing bug #40501

2007-10-01 Thread David Soria Parra
Hi internals,

once again a proposal for a bugfix. 
This time concerning http://bugs.php.net/bug.php?id=40501.

As the standard escape character is \\ , but the RFC says , I added a
optional escape character to the function call as a last parameter.
Furthermore, when the escape character is the same as the enclosure
character (e.g. ), a  string will be escape, while a single  will be
enclosured.

the patch and the according updated and added testfiles can be found at

http://experimentalworks.net/downloads/bug40501.patch.tar.gz

opinions?

greets
 David

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



[PHP-DEV] Re: RE : [PHP-DEV] Re: RE : [PATCH] zend-multibyte unicode detection vs. __halt_compiler()

2007-10-01 Thread Rui Hirokawa

Changing 'detect_unicode' disabled as default is a possible solution.

But, it might cause some backward incompatibility issues.
If no one gives any objection within a coupled of days,
I will commit the change ('detect_unicode'  will be disabled by default).

Rui

On Thu, 27 Sep 2007 18:37:57 +0200
LAUPRETRE François (P) [EMAIL PROTECTED] wrote:

  From: Rui Hirokawa [mailto:[EMAIL PROTECTED] 
  
  1.set detect_unicode = Off
  2.adding declare(encoding=encoding_name) on the first line 
  of script can be your solution ?
 
 The 'declare' statement is not a solution because unicode detection is done 
 before it is seen. So, PHK and PHAR remain incompatible with zend_multibyte.
 
 Can you confirm that unicode detection does not exist in PHP 6 (keeping only 
 'declare' statements) ?
 
 As a workaround in PHP 5, would it be possible to add a 'detect_unicode=off' 
 line in php.ini-dist and php.ini-recommended ?
 
 Regards
 
 Francois
 


-- 
Rui Hirokawa [EMAIL PROTECTED]

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



[PHP-DEV] [PATCH] bug 42818

2007-10-01 Thread David Soria Parra
Hi internals,

another small patch. This time concerning
http://bugs.php.net/bug.php?id=42818. As I'm not a ZendEngine expert I'm
not sure if this is the right place and the right way to fix the bug, but
at least for me this small fix works fine. Maybe somebody who is really
into depth with the engine can use it as a small hint.

The problem is that in ZEND_INIT_ARRAY_SPEC_UNUSED_UNUSED_HANDLER the op
code tmp_var is initialized but never freed by the clone op handler.

patch is against PHP_5_3

greets 
 david


Index: zend_vm_execute.h
===
RCS file: /repository/ZendEngine2/zend_vm_execute.h,v
retrieving revision 1.62.2.30.2.49.2.5
diff -u -r1.62.2.30.2.49.2.5 zend_vm_execute.h
--- zend_vm_execute.h   1 Oct 2007 10:37:13 -   1.62.2.30.2.49.2.5
+++ zend_vm_execute.h   1 Oct 2007 23:24:33 -
@@ -4661,7 +4661,9 @@
zend_error(E_WARNING, __clone method called on non-object);
EX_T(opline-result.u.var).var.ptr = EG(error_zval_ptr);
EX_T(opline-result.u.var).var.ptr-refcount++;
-
+   if (obj) {
+ zval_dtor(obj);
+   }
ZEND_VM_NEXT_OPCODE();
}

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



[PHP-DEV] Re: Solaris and getcwd()

2007-10-01 Thread Rob Thompson

BTW: Here is the bug that I am referring to:

http://bugs.php.net/bug.php?id=41822

 correction: getcwd() is not an stdio function ;)

Rob Thompson wrote:
 Hi everyone, I just subscribed to this list in hopes of working out some
 PHP bugs that have to do with Solaris.
 
 I've been trying to find out some reason why the getcwd() PHP function
 fails under some situations under Solaris.  Particularly, when some
 component of the file path looks like: d--x--x--x (no read perms).  This
 appears to be a security feature that Solaris implements that is not
 there in Linux.  Here is what I found out:
 
 If you are not root AND you want to get your current working directory
 that has parents with without 'r' permissions, you must do one of
 two things:
 
 a) Execute a getcwd() program that is suid-root.
 
OR: And this is the strange one...
 
 b) Tell Solaris that you already know where you are!!
 
 You can accomplish (b) by doing a 'cd /mydir/mysubdir/' where mydir has
 the permissions (d--x--x--x).  Without changing directories with a
 fully-qualified path, getcwd() will return NULL.
 
 Here are my questions for the list:
 
1) Is there any way for a running non-root instance of PHP under
 Apache or another web server to know where it is in the directory tree
 already, in hopes of implementing (b) above?
 
2) I'm assuming that the current functionality of PHP include()
 requires stdio's getcwd() in order to function with relative paths.  Is
 this really the case?
 
3) If #1 is possible and #2 is the case, would it be reasonable to
 implement a fix for this with doing a chdir(), followed by a getcwd() if
 your architecture is Solaris?
 
 I could try and attempt a fix, but my knowledge of the PHP source is
 sorely lacking at this time.  I'm working on bettering it!
 
 Thanks!
 -Rob
 

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



[PHP-DEV] link to exceptions in autoload thread?

2007-10-01 Thread Gregory Beaver
Hi all,

Could someone point me to the message(s) explaining why the executor is
unstable when an exception is thrown in __autoload()?

Thanks,
Greg

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