Re: [PHP-DEV] [RFC] Generators

2012-08-18 Thread lester
> On Sat, 11 Aug 2012, Nikita Popov wrote: > >> Hi internals! >> >> I think there already was a lot of discussion on the generators, so >> it's time to move to the next step. I'd like to vote on the feature in >> two weeks, so this the "announce[ment] on internals@, by the author, >> with the inten

Re: [PHP-DEV] date.timezone E_WARNING -- Really necessary? What's the rationale?

2013-05-27 Thread lester
> In my opinion UTC is a good compromise. I agree that _in the absence of any other setting_ there's nothing wrong with using UTC! Let be clear: UTC is a perfectly fine hands-off default rather than issuing a warning. Non-technical end users will guess you're on London time but whatever. And if

Re: [PHP-DEV] [RFC] Pipe Operator

2016-04-30 Thread lester
However, passing an array to array_filter() then passing the result to array_map() is always type safe (because array_filter still returns an array even if it filters down to 0 items), and array_map on an empty array is essentially a no-op, so I'm comfortable doing so, and wish I could do so m

Re: [PHP-DEV] [RFC] Pipe Operator

2016-04-30 Thread lester
God I hate crap software ... TRYING to reply without top post ... but Samsung is incapable! What I was trying to comment on was that trapping that no result is returned may be what is needed, so handling the empty array rather than a null return just means having to remember what you do use :(

Re: [PHP-DEV] Re: [RFC VOTE] Unbundle ext/interbase

2019-05-02 Thread Lester
distributions should work with the test suite using the sample database rather than the temporary one. -- Lester Caine - G8HFL - Contact - https://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - https://lsces.co.uk EnquirySolve - https://enquirysolve.co

Re: [PHP-DEV] Re: [RFC VOTE] Unbundle ext/interbase

2019-05-02 Thread Lester
On 02/05/2019 15:24, Christoph M. Becker wrote: A patch would be welcome! Looks like every file needs modifying ... I'll see what I can do, but my local php-src is broken and will not sync currently :( -- Lester Caine - G8HFL - Contact - https://lsces.co.uk

Re: [PHP-DEV] Re: [RFC VOTE] Unbundle ext/interbase

2019-05-02 Thread Lester
/tests/README>. https://github.com/bitweaver/install/blob/master/create_firebird_database.php Generates a firebird database from PHP via the command line which is the other approach. I've started again with a clean sheet and have a working php-src so I'll try and sort a suitable p

Re: [PHP-DEV] Re: [RFC VOTE] Unbundle ext/interbase

2019-05-02 Thread Lester
n the version of FB running. This will only run with FB3 while FB2.x is still in common use hence it being preferable to use something supplied with the FB installation. https://firebirdsql.org/manual/qsg10-connecting.html -- Lester Caine - G8HFL - Contact - https://ls

[PHP-DEV] hints and constraints

2015-02-05 Thread Lester Caine
n't feel that is 'the PHP way' and some of the flexibility PHP currently provides is actually constrined in a much more practical manor than the current proposals. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electro

Re: [PHP-DEV] hints and constraints

2015-02-05 Thread Lester Caine
On 05/02/15 11:37, Andrea Faulds wrote: > Hi Lester, > >> On 5 Feb 2015, at 10:58, Lester Caine wrote: >> >> Can I please rename the 'big integer' rfc to 'unconstrained integer' for >> two reasons. One BIGINT does have well established definiti

Re: [PHP-DEV] hints and constraints

2015-02-05 Thread Lester Caine
there is no single 'string' constraint. A string length/position can't be stored in an unconstrained integer, so we need a constrained holder for that and it's limits depend on the type of string being stored and the platform. -- Lester Caine - G8HFL - Cont

Re: [PHP-DEV] Annotated PHP 5->7 extension diff

2015-02-05 Thread Lester Caine
of examples to work from, and the assortment of changes to imagick are more difficult to understand. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Mo

Re: [PHP-DEV] Re: [RFC][DISCUSSION] script() and script_once()

2015-02-06 Thread Lester Caine
since the people you are trying to protect will not use a new mechanism anyway? I hope that I have my own installations configured such that one can't upload material on-line that can be accessed but having to ensure third party libraries are using 'script' rather than 'include/re

Re: [PHP-DEV] Annotated PHP 5->7 extension diff

2015-02-06 Thread Lester Caine
gickwand up as well but still a little lost on what needs doing ... Also I still have not fathomed out why I don't get a list of extensions for imagick ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services -

[PHP-DEV] Pointers to understanding code base

2015-02-06 Thread Lester Caine
he .s for ZEND_ENGINE_3 ? supported_formats must have the list as it says there are 209 entries, but why is there a problem doing something simple which works on the 5.x builds. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Elec

Re: [PHP-DEV] Pointers to understanding code base

2015-02-07 Thread Lester Caine
( email addresses used to be easy! - get the right one ) On 07/02/15 02:34, Dan Ackroyd wrote: > Lester, > > If you are having issues with Imagick please report them here: > https://github.com/mkoppanen/imagick > > Not only is that the right place to report issues with unrele

Re: [PHP-DEV] Pointers to understanding code base

2015-02-07 Thread Lester Caine
> more suitable in each particular case. does not help if one does not know how one decides ... The main problem is that the smart_string section seems to have an identity crisis? smart_str is till being used in the exmples. Any reaon for that? -- Lester Caine - G8HFL

[PHP-DEV] Dragging the legacy users forward.

2015-02-07 Thread Lester Caine
with the code than simply 'it runs' :( In the past using 32 bit builds has been a fix for many problems, not just the windows platform ones, so removing that prop requires a lot more care! -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=conta

Re: [PHP-DEV] [VOTE] Scalar Type Hints

2015-02-07 Thread Lester Caine
wedge that has resulted in a growing number of abstraction layers for handing data from database, much of which needs a common base of scalar values in the arrays then handled in PHP, rather than creating their own versions of those scalar entries. -- Lester Caine - G8HFL

Re: [PHP-DEV] Dragging the legacy users forward.

2015-02-08 Thread Lester Caine
On 08/02/15 06:37, Yasuo Ohgaki wrote: > Hi Lester, > > PHP7 is proposing a LOT of shiny new features which will break much > legacy code. So the question has to be just what is the plan regarding > cross version support. I see that the general consensus is PHP5 should

Re: [PHP-DEV] Dragging the legacy users forward.

2015-02-08 Thread Lester Caine
o be using composer for everything? None of this was around by 5.0.0 days yet the bulk of my framework code is well over 10 years old and at one time one could select you preferred database install and run. Nowadays just keeping a small subset of database engines working is all we can manage. P

Re: [PHP-DEV] Dragging the legacy users forward.

2015-02-08 Thread Lester Caine
couple of sites then things would be different, but the current catalogue is some 120 different sites some of which are pigging ASP and I will be glad when I can finally pull them over to PHP. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=c

[PHP-DEV] Managing builds via Eclipse

2015-02-08 Thread Lester Caine
Does anybody have a working Eclipse setup for building php-src and extensions? I keep hitting 'phpsrc' when I try using google which just about sums up how bad google is these days :( As soon as one tries to drill down all one gets is pages with php in the url ... -- Lester Cai

Re: [PHP-DEV] Dragging the legacy users forward.

2015-02-08 Thread Lester Caine
egabytes of data into the error log but there ACTUALLY seem to be less in the php7 error log ... need to figure that out, but I've currently hit the latest brick wall as mbstring is not compiling! Most of the others have compiled fine, but currently there is a blank front page until I can

Re: [PHP-DEV] [VOTE] Scalar Type Hints

2015-02-09 Thread Lester Caine
hich scalar type hints does nothing to address :( -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Di

Re: [PHP-DEV] Annotated PHP 5->7 extension diff

2015-02-09 Thread Lester Caine
se but would still appreciate some input on that for compiling source rather than managing php projects ) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/

[PHP-DEV] Design by Contract and scalar types ...

2015-02-09 Thread Lester Caine
g, but I am now thinking that a properly exposed string and integer class which has the ability to assign constraint checks does make sense. Then use of an integer value on a 32bit platform can error when the actual value is too big for the target use. THAT is what strict type checking is about! -

Re: [PHP-DEV] Annotated PHP 5->7 extension diff

2015-02-09 Thread Lester Caine
m moving on ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital M

Re: [PHP-DEV] Design by Contract

2015-02-10 Thread Lester Caine
what in my opinion IS the best way to allow different factions to add their own pet style is drowning simple clean solutions such as docblock. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk E

[PHP-DEV] zend_get_parameters_ex rework

2015-02-10 Thread Lester Caine
; return; > } But I suspect I need to change the *string_arg to a character string so 'rc' and add a string_len field. At least that is what I think I'm seeing from the samples I have found. -- Lester Caine - G8HFL - Contact - http

Re: [PHP-DEV] Design by Contract

2015-02-11 Thread Lester Caine
ment does make sense as a half way house to opcode caching. ( and some help with actually fixing php7 in code would be appreciated! ) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk Enq

Re: [PHP-DEV] [RFC][DISCUSSION] Script only includes

2015-02-11 Thread Lester Caine
On 11/02/15 09:34, Derick Rethans wrote: >> Some of you are tired with this topic, but please take a look the RFC >> > >> > [RFC] Script only includes - this is 3rd version. >> > https://wiki.php.net/rfc/script_only_include >> > >> > Please let me know what you like or dislike. > Con: > - It intr

Re: [PHP-DEV] zend_get_parameters_ex rework

2015-02-11 Thread Lester Caine
On 10/02/15 14:31, Lester Caine wrote: > in interbase/ibase_blobs.c > >> zval *blob_arg, *string_arg; >> ibase_blob *ib_blob; >> >> RESET_ERRMSG; >> >> if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex

Re: [PHP-DEV] Design by Contract

2015-02-11 Thread Lester Caine
inal version or the Mk2 version of phpDocumentor on code that has produced clean documents in the past. Just another area that needs time spending to work out what now need updating which does not affect the working code. -- Lester Caine - G8HFL - Contact -

Re: [PHP-DEV] [VOTE] Scalar Type Hints

2015-02-11 Thread Lester Caine
;Better static analyzer' when the bulk of the material being worked with simply can't be processed 'statically'? The only result of this passing that I can see is that PHP will start to develop two completely different code bases. Anthony closes by saying that is EXACTLY what he wil

Re: [PHP-DEV] zend_get_parameters_ex rework

2015-02-12 Thread Lester Caine
ps://github.com/php/php-src/blob/master/ext/interbase/ibase_blobs.c Line 318 passes string_arg to function at 131 ( this is so much easier using eclipse to navigate :) ) The other compile problem I have is the complaints about casting pointers to integer ... -- Lester Caine - G8HFL -

Re: [PHP-DEV] zend_get_parameters_ex rework

2015-02-12 Thread Lester Caine
t one of the uses, another is feed by a zval which I then need to convert to a zend_string, but I think I can just change b_val to Z_STR*(b_val) but the compiler is saying that Z_STR is not defined? I've spent half an hour trying to dig around but not managed to find what I should be using

Re: [PHP-DEV] Legal date generated from illegal date

2015-02-13 Thread Lester Caine
at needs fixing first is the underlying OS functions rather than continually trying to patch the top level, but we perhaps need to document better just where the joins are ... just how many days were there from 0BC to today ... -- Lester Caine - G8HFL - Contact - http:

Re: [PHP-DEV] zend_get_parameters_ex rework

2015-02-13 Thread Lester Caine
terface to match the new PHP rules. I'll be having a go myself later ... got to earn some money first :) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysol

Re: [PHP-DEV][RFC][VOTE] Group Use Declarations

2015-02-13 Thread Lester Caine
On 13/02/15 16:41, Andrea Faulds wrote: > But with Marcio’s proposal, we could instead write this: > > use function SomeLibrary\Math\{sin, cos, tan, degrees, radius}; Well it used to be simply ... require SomeLibrary\math.php; -- Lester Caine - G8HFL

Re: [PHP-DEV][RFC][VOTE] Group Use Declarations

2015-02-13 Thread Lester Caine
libraries with conflicting names is that not because there are problems with both libraries if you need to use both? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://e

Re: [PHP-DEV][RFC][VOTE] Group Use Declarations

2015-02-13 Thread Lester Caine
whole process wrong? Can't we restore the simple way of working in PHP7 where it does not need to wrap around other things quite so closely? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co

Re: [PHP-DEV][RFC][VOTE] Group Use Declarations

2015-02-14 Thread Lester Caine
On 13/02/15 21:16, Nikita Nefedov wrote: >> Can't we restore the simple way of working in PHP7 >> where it does not need to wrap around other things quite so closely? > > Hi Lester, > > This way if doing things on php didn't go anywhere, people just stopped

Re: [PHP-DEV] [VOTE] Scalar Type Hints

2015-02-14 Thread Lester Caine
gement we do have! The vast majority of parameters DO have a limit on their size. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Works

Re: [PHP-DEV] Proposing [constructive] solutions (was: I quit)

2015-02-16 Thread Lester Caine
otally understand how to change every other extension in the same style :( Currently I lost track of the bits I should be using as current notes and searching just pulls up phpng or even older guides, so it would be nice to have a single index for PHP7 with all of the good samples linked. Oh and

[PHP-DEV] Done something wrong ...

2015-02-16 Thread Lester Caine
Seems to be due to changes for HashTable? But what have I missed? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop -

Re: [PHP-DEV] Done something wrong ...

2015-02-16 Thread Lester Caine
On 16/02/15 18:34, Ferenc Kovacs wrote: > On Mon, Feb 16, 2015 at 6:55 PM, Lester Caine wrote: > >> I've synced with current git and seem to have the files I expect for >> interbase, but when trying to run a clean build of the core stuff it no >> longer compiles

Re: [PHP-DEV] Done something wrong ...

2015-02-16 Thread Lester Caine
rtant because it instructs git to only remove files that are ignored > via .gitignore. Your manually created files will stay. Thanks for that Martin ... turns out hg purge can do the same thing via hggit plugin ;) Just needed the kick in the right direction. -- Lester Caine - G8HFL

[PHP-DEV] Compile problems - Was Switch jumptable optimization

2015-02-17 Thread Lester Caine
have a working build of PHP7 again having wasted a couple more days trying to track down what was wrong. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolv

Re: [PHP-DEV] Reviving scalar type hints

2015-02-17 Thread Lester Caine
e, but this at least would allow int to become an unconstrained object if people want that. It's the whole "we can fix it later" that I don't like ... especially when other votes are changing the goal posts in parallel. -- Lester Caine - G8HFL - Co

Re: [PHP-DEV] Reviving scalar type hints

2015-02-17 Thread Lester Caine
h -ve values are even more useful than a simple 'zero' return and that may replace a string return. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enqui

Re: [PHP-DEV] Reviving scalar type hints

2015-02-17 Thread Lester Caine
broken already with the other changes to the core :( I'm not returning 'IS_FALSE' so I'm probably going to have to change the 'false' to '0' anyway so as to avoid the bool? -- Lester Caine - G8HFL - Contact - http://lsces.c

Re: [PHP-DEV] Reviving scalar type hints

2015-02-17 Thread Lester Caine
x27;strict' at all. You will process the string, decide if you want to tell the client that it must be a whole number, or if it exceeds some limit. That may even be done in javascript in the browser, so what is fed back has already been sanitised. It will come in as a string and you k

Re: [PHP-DEV] Reviving scalar type hints

2015-02-17 Thread Lester Caine
was the 'best practice' a few years back so it is rare to be passing a single value anyway. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ M

Re: [PHP-DEV] Reviving scalar type hints

2015-02-17 Thread Lester Caine
On 17/02/15 21:28, François Laupretre wrote: >> De : Lester Caine [mailto:les...@lsces.co.uk] >> >> On 17/02/15 18:33, François Laupretre wrote: >>> What does this mean in your case ? Just that, as long as the feature is not >> available, your function won'

Re: [PHP-DEV] zend_get_parameters_ex rework

2015-02-17 Thread Lester Caine
the database then the PHP7 build. The code and database are identical ... only the PHP side is different. But I need a few hours sleep ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsce

Re: [PHP-DEV] Scalar Type Hints v0.4

2015-02-18 Thread Lester Caine
s? Again we have to ensure that the pre-processing takes care of the problem and how would static analysis even know there was a problem? A type hint following the SQL standards would be more helpful than the javascript approach of giving an error in strict mode. -- Lester Caine - G8HFL

Re: [PHP-DEV] Compile problems - Was Switch jumptable optimization

2015-02-18 Thread Lester Caine
in the one code tree. On that side, I don't enable the mysql stuff normally and while mysqlnd is compiling happily as a shared extension it looks like I can't load it as it is not actually a valid extension? Is that a bug or is the fact it's allowed to

Re: [PHP-DEV] Scalar Type Hints v0.4

2015-02-18 Thread Lester Caine
ess trying to reference them :( ( Andrey - there may not be plans to support a full range of hints - weak or strict, but this is all valid material that PHP handles daily and passes around ) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.

Re: [PHP-DEV] Scalar Type Hints v0.4

2015-02-18 Thread Lester Caine
On 18/02/15 14:59, Pádraic Brady wrote: > I wouldn't necessarily mind int->float - it's lossless assuming one way only. Assuming int is not 64 bit ;) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic

Re: [PHP-DEV] Scalar Type Hints v0.4

2015-02-18 Thread Lester Caine
is the very thing that any 'hinting' should be taking care of! This is the very area where using 32bit builds at least provides a level of protection currently. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic

Re: [PHP-DEV] Re: [RFC-Discuss] Scalar Type Declarations v0.5

2015-02-18 Thread Lester Caine
64bit builds will not overflow until they run out of space anyway. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop

Re: [PHP-DEV] Re: [RFC-Discuss] Scalar Type Declarations v0.5

2015-02-19 Thread Lester Caine
On 19/02/15 01:33, Christoph Becker wrote: > Lester Caine wrote: > >> On 18/02/15 23:09, Christoph Becker wrote: >>> It seems to me that this behavior is hard to deal with generally for >>> programmers as well as static analyzers. Andreas' bigint RFC[1] wou

Re: [PHP-DEV] [RFC-Discuss] Scalar Type Declarations v0.5

2015-02-19 Thread Lester Caine
ood for speed, but can introduce cross platform differences that may be difficult to debug. We currently live with those problems already with the int->float agro on 64bit numbers. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Elect

Re: [PHP-DEV] Reviving scalar type hints

2015-02-19 Thread Lester Caine
always). I believe that's > what makes it a good compromise, a better one than the currently proposed > RFC. Now that all made sense! My only grey area is 'allowing sensible ones' where the size is an integral part of what is 'sensible' ... the one where conventi

Re: [PHP-DEV] Using Other Channels (was Scalar Type Declarations v0.5)

2015-02-19 Thread Lester Caine
neither relax the weak/strict debate which is apparently so essential in other forums? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers D

Re: [PHP-DEV] Reviving scalar type hints

2015-02-19 Thread Lester Caine
s not sound like simplifying things? As with other debates, some say ignore 32 bit, and others say lets loose the constraints altogether, but having a fundamental type behave differently depending on platform is a problem? -- Lester Caine - G8HFL - Contact - http://lsces.

Re: [PHP-DEV] Reviving scalar type hints

2015-02-19 Thread Lester Caine
ffect how these values are processed. Pierre - You may think that the size of integer is irrelevant in the discussion on providing a strict type use of it, but in practice it is somewhat important if the codebase you are creating is only 32bit but all the data being handled is 64bit. -- Lest

Re: [PHP-DEV] Using Other Channels (was Scalar Type Declarations v0.5)

2015-02-19 Thread Lester Caine
than creating a new different object. Back to my as_xxx rather than is_xxx ... as_xxx fails if the result can't be produced, or yes it gives a new object of that type. It's how all these extra objects exist that is confusing, but if all the persistent data simply creates objects of the corr

Re: [PHP-DEV] Using Other Channels (was Scalar Type Declarations v0.5)

2015-02-19 Thread Lester Caine
not need a cast. If it's not validated ... it needs to be before it can be used anyway. Is every variable stored as a string even when it's source is a validated scalar value? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L

Re: [PHP-DEV] Nightmares on type hints, annotations, and aop...

2015-02-20 Thread Lester Caine
If PHP creates a new variable what does it store by default? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Worksh

Re: [PHP-DEV] Coercive Scalar Type Hints RFC

2015-02-21 Thread Lester Caine
creen as strings ... having the original string with a value which can be used for calculation is simply how I thought PHP worked. A variable is more than just a 'value', we need it's name which is a string, and a viewable string could be useful, along with other flags. I had assum

Re: [PHP-DEV] PDO_DBLIB type handling

2015-02-21 Thread Lester Caine
een safe to use 32bit numbers directly in PHP which is additional reasons for keeping to a string base. ( Since all of my material is managed via databases it is also why I am normally using 'stringy ints'! ) -- Lester Caine - G8HFL - Contact - http://lsces

Re: [PHP-DEV] Coercive Scalar Type Hints RFC

2015-02-21 Thread Lester Caine
t added to it, but you may also need the string view, or the origin may be a string already, so one maintains both a binary view and a 'string' view of the same variable. So I don't subscribe to 'stringy ints' because all variables have a stringy element naturally. If I had

Re: [PHP-DEV] Coercive Scalar Type Hints RFC

2015-02-21 Thread Lester Caine
eneral user ? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigital

[PHP-DEV] Unnecessary extensions ...

2015-02-22 Thread Lester Caine
odules and I see no reason why those who want 'strict' can't have that as a pecl module to replace 'lax' operations. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk

Re: [PHP-DEV] JIT (was RE: [PHP-DEV] Coercive Scalar Type Hints RFC)

2015-02-22 Thread Lester Caine
int check/'coerce' as part of the range check, and produce a number of errors based on the result. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/

Re: [PHP-DEV] Reclassify E_STRICT notices

2015-02-22 Thread Lester Caine
ertainly accept while upgrading code, but I also appreciate why 'Remove PHP4 Constructors' might not be accepted leaving a difficulty. I think one ends up with still needing a 'mode' switch if the legacy constructors are retained? -- Lester Caine - G8HFL ---

[PHP-DEV] Type hints ...

2015-02-22 Thread Lester Caine
ferent rule sets but this just adds another set of 'rules' rather than a single solution. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model En

Re: [PHP-DEV] JIT (was RE: [PHP-DEV] Coercive Scalar Type Hints RFC)

2015-02-22 Thread Lester Caine
r. Why would using an integer I've passed in a URL be a 'fault'? All of the data navigation functions pass their state via the URL and one simply protects against hackers by filtering the state to a default value if it does not return the correct integer data. -- Lester Caine - G8HFL

Re: [PHP-DEV] Type hints ...

2015-02-23 Thread Lester Caine
On 23/02/15 02:49, François Laupretre wrote: > Hi Lester, > > I am not sure I understand well, but the extended type syntax partially > described in https://wiki.php.net/rfc/dbc may correspond to what you > describe. Such extended syntax will be part of 'Design by Contra

Re: [PHP-DEV] Type hints ...

2015-02-23 Thread Lester Caine
On 23/02/15 13:49, François Laupretre wrote: > Hi Lester, > >> De : Lester Caine [mailto:les...@lsces.co.uk] >> >> Reworking 15+ years of code to create 'dbc' versions of the existing >> annotations is another drain on available time. I can see someone >

Re: [PHP-DEV] Coercive Scalar Type Hints RFC

2015-02-23 Thread Lester Caine
alidation requirements. Something which could be provided if the right hooks are available to identify hints be that the current rules or some third party strict rule set. There was a query about making hints user definable and that fits in better than any of the current 'single' solution

Re: [PHP-DEV] Coercive Scalar Type Hints RFC

2015-02-23 Thread Lester Caine
ith eaccelerator. So first step get up to the same platform with all sites, but currently there is no incentive to switch to a slower system ... Your speed table from earlier shows a marked improvement up to PHP5.4 with eaccelerator loaded. PHP7 reduces memory usage and execution time against

Re: [PHP-DEV] Reclassify E_STRICT notices

2015-02-24 Thread Lester Caine
of the coding style elements it currently 'allows' need to be reviewed to see if it is time they were deprecated, allowing some of the new 'strict' elements to be tagged properly in PHP7 ? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?p

Re: [PHP-DEV] [Discussion] Last chance for case-sensitive engine

2015-02-24 Thread Lester Caine
E_STRICT now would allow an eventual incorporation of proper multilingual support later. Keeping some areas 'English only' does not bother me, but the rest of the infrastructure has already moved on so it is about time PHP joined modern practice? One of the areas that many peopl

Re: [PHP-DEV] [RFC] Script only include/require

2015-02-25 Thread Lester Caine
s change does nothing to fix the badly-written code, but it is THAT which needs to be fixed rather than perfectly safe systems that 'disobey' this nannying? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Elec

Re: [PHP-DEV] [RFC] Script only include/require

2015-02-25 Thread Lester Caine
On 25/02/15 09:14, Yasuo Ohgaki wrote: > Hi all, > > On Wed, Feb 25, 2015 at 5:58 PM, Lester Caine wrote: > >>> As soon as you have any possibility of including a file uploaded by an >>> attacker, you are probably going to lose. >> >> I think that this

Re: [PHP-DEV] [Discussion] Last chance for case-sensitive engine

2015-02-25 Thread Lester Caine
istent and if PHP nannied this in the same way it nannies some other style points, then I would put under the pro rather than con! Some of the BC areas being discussed do seem 'why put us through that', but unicode is still being pushed to the sidelines and this is one of those BC break

Re: [PHP-DEV] The Game Theory of Scalar Type Hint Voting

2015-02-25 Thread Lester Caine
them are ... Scalar Type Hinting - yes/no Type of hinting - weak/strict/other If only weak hinting accepted, option to add strict anyway - yes/no Changes to casting rules are a separate discussion? Change casting - yes/no/partial (selected tidy-up) -- Lester Cain

Re: [PHP-DEV] [RFC] Exceptions in the engine

2015-02-25 Thread Lester Caine
s and if the returns now change then currently working code starts to fail. Fixing the extra exceptions looks more interesting, so referring to the first try block above, having to catch different exceptions from each function is the problem here. But I still prefer dealing with the error as part

Re: [PHP-DEV] Re: [RFC-Discuss] Scalar Type Declarations v0.5

2015-02-25 Thread Lester Caine
hould be a nice clean value is actually what gets through? All right if that fails in a later function call then one can crash out, and you don't want to serve hackers anyway, but one needs to know if it is a hacker or a user with a problem. But this more a play against the need for type hinti

Re: [PHP-DEV] Coercive Scalar Type Hints RFC

2015-02-25 Thread Lester Caine
all have what we want. Yes it will result in confusion over what runs where, but equally we can tailor hinting to match a particular set of rules rather than having to live with some other persons preference such as the 'new' casting rules ... -- Lester Caine - G8HFL -

Re: [PHP-DEV] Coercive Scalar Type Hints RFC

2015-02-26 Thread Lester Caine
changes the rules that don't fit for Coercive. Neither deserve acceptance because both are only creating more divergence. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http:/

Re: [PHP-DEV] Strict typing and callback vs declare()

2015-02-26 Thread Lester Caine
AN be optimised for the target and which can be enhanced via that target can only be an improvement on what is proposed so far. And the title here is wrong - this is not restricted to 'strict' it applies to all scalar type hinting/checking. -- Lester Caine - G8HFL -

Re: [PHP-DEV] A different user perspective on scalar type declarations

2015-02-26 Thread Lester Caine
rebird/51 and http://www.firebirdfaq.org/faq12/ show some options used to get around the various input problems. So like PHP - no agreement on what BOOL is. FB3.0 is still in development, but adds a bool field for which IS_TRUE and IS_FALSE are not a comfortable fit because for any database a field c

Re: [PHP-DEV] A different user perspective on scalar type declarations

2015-02-27 Thread Lester Caine
numeric string. Just been checking and yes if a multi-bit binary field is a string of '0's it's false - nothing to process - but any bit set gives true and one scans for the set bit. This is one where the leading zero may affect the numeric conversion, but you can read it as a

Re: [PHP-DEV] A different user perspective on scalar type declarations

2015-02-27 Thread Lester Caine
include white space when it is actually added. It's not uncommon though to cast numeric fields to 'char' to create fixed length records and I would not like to say how many legacy systems still use that approach for building tables of data? -- Lester Caine - G8HFL

Re: [PHP-DEV] Coercive STH - some real world tests and updated RFC

2015-02-27 Thread Lester Caine
es, weird behavior that substr("", 2, 2); for example returns false. But > changing thatis just another evil BC break. Now I don' think that 'weird' ... Although the correct return should perhaps be 'null', but it's long been practice that s there is no resu

Re: [PHP-DEV] Coercive STH - some real world tests and updated RFC

2015-02-27 Thread Lester Caine
eeds fixing perhaps that is what needs addressing? string|false is a core element of most of PHP? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Mode

  1   2   3   4   5   6   7   8   9   10   >