[PHP-DEV] Using XMLWriter after a SoapFault-Exception

2019-06-28 Thread Nicolai Scheer
Hi list, I've just updated bug report https://bugs.php.net/bug.php?id=78150 and added a simplified version of the reproduction code. As it appears, XMLWriter refuses to write xml files after a SoapFault-Exception. I'd be very glad if someone could have a look at this. Thanks! Greetings Nico

[PHP-DEV] Unable to use XMLWriter in Exception-Handler

2019-06-12 Thread Nicolai Scheer
Hi all, I recently stumbled across some very weird behaviour when using XMLWriter inside an exception handler. Depending on the exception that is being thrown XMLWriter is able to write the file or not. I opened a bug report with a (kind of) simple reproduction script: https://bugs.php.net/bug.p

[PHP-DEV] default_charset and mb_internal_encoding

2019-04-02 Thread Nicolai Scheer
Hi list, I'm currently in the process of migrating an old application from php 5.6 to 7.2. In the process, I fiddled with the default_charset ini setting. The documentation states (c.f. https://www.php.net/manual/en/ini.core.php#ini.default-charset): "In PHP 5.6 onwards, "UTF-8" is the default v

Re: [PHP-DEV] object destruction php 5.6 vs. 7.2

2018-08-13 Thread Nicolai Scheer
Hi Nikita, On Sat, 11 Aug 2018 at 11:03, Nikita Popov wrote: > On Wed, Aug 8, 2018 at 11:09 PM, Nicolai Scheer > wrote: > >> [resource destructor does not get called until shutdown] > > > My guess would be some kind of refcounting issue. For example > zend_u

[PHP-DEV] object destruction php 5.6 vs. 7.2

2018-08-08 Thread Nicolai Scheer
Hi, I'm currently facing difficulties to migrate one of our extension from php 5.6 to 7.2. Basically everything works fine. The extension defines its own resource, and since it's object oriented, stores the resource inside a member variable, i.e. we register the custom resource using zend_list_in

[PHP-DEV] Notice on non existing array key (on a boolean)

2015-08-25 Thread Nicolai Scheer
Hi all, I'd expect the following code to throw a notice/warning: $x = true; $y = $x['foo']; It executes completely silently. $y is NULL afterwards, which is expected, since the right hand side of the assignment is undefined. If $x was an array (e.g. empty array), a E_NOTICE would be emitted. C

[PHP-DEV] Access of protected members

2015-08-03 Thread Nicolai Scheer
Hi, just stumbled upon a strange issue. I always thought that protected/private member variables can only be altered from inside the object. This example shows, that this is not true: class Test { protected $member = null; public static function getObj() { $myself = new Test

[PHP-DEV] Invokation on __toString() for object used as array key

2014-09-23 Thread Nicolai Scheer
Hi all, until 5 minutes ago I thought it would be perfectly legal to use an object as an array key, given that its __toString() method is in place. Seems as if I was wrong. I know that array keys are not what is considered "string context" internally, at least not directly. Would it harm in any

[PHP-DEV] zend_stream_fixup

2014-07-18 Thread Nicolai Scheer
Hi, can anyone shed a light on what zend_stream_fixup (in zend_stream.c) is for? >From what I get from the code, it seems it ensures that the whole file is read into memory, no matter what type the zend_file_handle is... Thanks! Greetings Nico -- PHP Internals - PHP Runtime Development Maili

Re: [PHP-DEV] strtr vs. str_replace runtime

2013-01-10 Thread Nicolai Scheer
Hi! On 9 January 2013 23:45, Gustavo Lopes wrote: > On Thu, 03 Jan 2013 11:40:31 +0100, Gustavo Lopes > wrote: > > The algorithm behaves very poorly in this case because at each position >> of the text, all the substrings starting there and with size between m and >> n (where m is the size of

Re: [PHP-DEV] File-Paths exceeding MAX_PATH on Windows

2013-01-08 Thread Nicolai Scheer
Hi again! On 8 January 2013 14:56, Nicolai Scheer wrote: > > Do you have any advice how I can move lill' pandora to an extension? Of > course I might copy the complete simple_file_wrapper, but I'd rather not do > it that way... I did not find any "add standard stream

Re: [PHP-DEV] File-Paths exceeding MAX_PATH on Windows

2013-01-08 Thread Nicolai Scheer
Hi! On 8 January 2013 14:40, Pierre Joye wrote: > On Tue, Jan 8, 2013 at 2:38 PM, Nicolai Scheer > wrote: > > > I agree, but what about pandora and the other file functions like > unlink() > > etc.? :) > > They currently do not prevent such long and prefixed path

Re: [PHP-DEV] File-Paths exceeding MAX_PATH on Windows

2013-01-08 Thread Nicolai Scheer
Hi! On 8 January 2013 14:27, Pierre Joye wrote: > hi, > > On Tue, Jan 8, 2013 at 2:24 PM, Nicolai Scheer > wrote: > > > What do you think? > > As I stated earlier, doing so is like opening the pandora box. I would > rather go with mounted directory and the likes

Re: [PHP-DEV] File-Paths exceeding MAX_PATH on Windows

2013-01-08 Thread Nicolai Scheer
Hi! On 8 January 2013 06:48, Pierre Joye wrote: > hi, > > On Mon, Jan 7, 2013 at 10:22 PM, Ferenc Kovacs wrote: > > > is this about allowing the user to shot him/herself in the foot, or > adding > > this feature could potentially break some existing functionality (eg. new > > trick to bypass op

[PHP-DEV] File-Paths exceeding MAX_PATH on Windows

2013-01-07 Thread Nicolai Scheer
Hi! Out of the urgent need to access files with a path longer than MAX_PATH on Windows, I started some research. At first I thought it might be a good idea to write my own stream wrapper extension (e.g. file_long://.) . Before I started, I tried to find out, why those paths don't work in the

Re: [PHP-DEV] strtr vs. str_replace runtime

2013-01-03 Thread Nicolai Scheer
Hi! On 3 January 2013 11:40, Gustavo Lopes wrote: > Em 2013-01-02 16:53, Nicolai Scheer escreveu: > > >> I might have chosen the wrong tool for what I'm trying to achieve in the >> first place, but can anyone comment on the algorithmic complexity of >> strt

[PHP-DEV] strtr vs. str_replace runtime

2013-01-02 Thread Nicolai Scheer
Hi! I stumbled upon a "problem" with the function strtr() the other day... I noticed a very long running php script, and tried to reproduce the behaviour. I traced it down to a single call of strtr doing text replacements using a search => replace array. It wasn't quit obvious why the call would

[PHP-DEV] DOMNodeList memory eating

2012-11-29 Thread Nicolai Scheer
Hi! Just stumbled upon a strange behaviour when iterating over DOMNodeLists. Before I open a bug report I'd like to ask if anyone can comment on this issue, maybe it's the excpected behaviour. Consider the following small script: x x x XML; $dom = new DOMDocument(); $dom->loadXML

Re: [PHP-DEV] stream_get_line behaviour Bug #63240

2012-10-10 Thread Nicolai Scheer
Hi again! Thanks for your help an comments on the issue. cataphract commented on the stream_get_line behaviour (returning false when used on an empty file) on the bug report page. I do agree that reading on an empty file can be considered an error thus returning false, because there's nothing to

[PHP-DEV] SoapClient: Catchable Fatal Error for invalid WSDL

2012-10-09 Thread Nicolai Scheer
Hi! Just read the comments for Bug #47584: WSDL error in soapClient causes Fatal Error. If a SoapClient is created and the WSDL can not be found, an Exception is thrown: 1 ) ); } catch ( Exception $e ) { echo $e->faultstring; } echo "ok\n"; $error = error_get_last(); print_r( $error ); ?>

[PHP-DEV] stream_get_line behaviour Bug #63240

2012-10-08 Thread Nicolai Scheer
Hi! We switched from php 5.3.10 to 5.3.17 this weekend and stumbled upon a behaviour of stream_get_line that is most likely a bug and breaks a lot of our file processing code. The issue seems to have been introduced from 5.3.10 to 5.3.11. I opened a bug report: #63240. The issue seems to be rel

Re: [PHP-DEV] DOMDocument->saveXML with node parameter

2012-03-20 Thread Nicolai Scheer
Hi! On 20.03.2012 23:33, Gustavo Lopes wrote: > On Tue, 20 Mar 2012 23:27:50 +0100, Nicolai Scheer > wrote: > >> >> > $doc = new DOMDocument(); >> $doc->loadHTML( 'Test' ); >> $body = $doc->getElementsByTagName( 'body' )->item

[PHP-DEV] DOMDocument->saveXML with node parameter

2012-03-20 Thread Nicolai Scheer
Hi! Just stumbled upon the issue described in https://bugs.php.net/bug.php?id=39771 during a Windows -> Linux migration. The windows binaries for php 5.3.10 and 5.4 got no problems executing the following: loadHTML( 'Test' ); $body = $doc->getElementsByTagName( 'body' )->item( 0 ); echo $doc->

Re: [PHP-DEV] libxml returns codes and xmlreader

2011-08-19 Thread Nicolai Scheer
Hi! [...] >> Nevertheless, is there a "real" reason >> why this is not implemented? Anyone else feeling uncomfortable with >> "calling additional functions to check for error conditions"? > It is modeled after the .NET XMLReader interface with simple boolean > return values. You can file a featu

Re: [PHP-DEV] libxml returns codes and xmlreader

2011-08-19 Thread Nicolai Scheer
Hi! > On Fri, Aug 19, 2011 at 12:27, Nicolai Scheer > wrote: >> I've >> noticed, that some of the libxml return codes >> get >> "simplified" when used in xmlreader which can be quite >> problematic. > Use libxml_get_errors() So

[PHP-DEV] libxml returns codes and xmlreader

2011-08-19 Thread Nicolai Scheer
Hi again! Please excuse if this is a duplicate, my web mailer choked on that one :/ -- I've noticed, that some of the libxml return codes get "simplified" when used in xmlreader which can be quite problematic. I opened a bug report about this behaviour: https://bugs.php.net/bug.php?id

Re: [PHP-DEV] Bug reports for php 5.3.x

2011-08-19 Thread Nicolai Scheer
Hi! > 2011/8/19 Ferenc Kovacs : [...] > I've fixed and pushed it to bugsweb for now with > http://svn.php.net/viewvc?view=revision&revision=315166 until we come > up with a proper solution. Thanks! Greetings, Nico -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, vis

[PHP-DEV] Bug reports for php 5.3.x

2011-08-19 Thread Nicolai Scheer
Hi! Did I miss anything or is it intentional to not allow bug reports for php 5.3.x? The version dropdown on https://bugs.php.net/report.php only shows trunk, svn and php 5.4 stuff (and a 'upgrade first' suggestion if lower). greetings, Nico -- PHP Internals - PHP Runtime Development Mai

Re: [PHP-DEV] BUG 55240 - wrong date creation

2011-08-03 Thread Nicolai Scheer
Hi! On 03.08.2011 21:29, Joey Smith wrote: >> 2011/8/4 Nicolai Scheer : >>> Hi! >>> >>> Did anyone had the time to review bug 55240 >>> (https://bugs.php.net/bug.php?id=55240), yet? >>> > > It definitely appears to be unexpected behaviou

[PHP-DEV] BUG 55240 - wrong date creation

2011-08-03 Thread Nicolai Scheer
Hi! Did anyone had the time to review bug 55240 (https://bugs.php.net/bug.php?id=55240), yet? So far it just has been adjusted to reflect the right package. Any pointers are welcome! Grettings, Nico -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php

Re: [PHP-DEV] PHP 5.3.6 Released!

2011-03-17 Thread Nicolai Scheer
Hi! [snip] On 17.03.2011 16:29, Johannes Schlüter wrote: > Added options to debug backtrace functions Are there any details on this particular feature? What is it about? Greetings, Nico -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.p

Re: [PHP-DEV] Doc on the VM

2009-10-02 Thread Nicolai Scheer
Hi! Mathieu Suen schrieb: > Hi, > > I would like to know if there is some documentation on the different > layout of the array, object varaible ... in php. > Or were in the source can we read how the php VM reprensent those entites? At first, you should have a look at Zend/zend.h in the php sourc