Hi Andreas,
2017-08-01 6:57 GMT+02:00 Andreas Hennings :
> Hello list,
> a quite common use case is that one needs to find out if a string
> $haystack begins or ends with another string $needle.
> Or in other words, if $needle is a prefix or a suffix of $haystack.
>
> One prominent example would
Hello list,
a quite common use case is that one needs to find out if a string
$haystack begins or ends with another string $needle.
Or in other words, if $needle is a prefix or a suffix of $haystack.
One prominent example would be in PSR-4 or PSR-0 class loaders.
Maybe the use case also occurs whe
Jakub Zelenka wrote:
On Sat, Jul 29, 2017 at 7:10 PM, Niklas Keller wrote:
Andrea Faulds schrieb am Sa., 29. Juli 2017, 18:55:
Hi Craig,
Craig Duncan wrote:
On 29 July 2017 at 15:16, Andrea Faulds wrote:
Could we not simply make it a flag? e.g.
$bar = json_encode($foo, JSON_THROW_
Results for project PHP master, build date 2017-07-30 19:22:35-07:00
commit: e6bfbb6
previous commit:f9c3ee9
revision date: 2017-07-30 22:01:31+02:00
environment:Haswell-EP
cpu:Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz 2x18 cores,
stepping 2, LLC 45 MB
> On Jul 31, 2017, at 5:54 PM, Johannes Schlüter wrote:
>
> On Mo, 2017-07-31 at 14:49 +0300, Andrew Nester wrote:
>> That’s actually the thing that you can’t use
>> PDO::ATTR_STATEMENT_CLASS with persistent PDO.
>
> The actually question is: Why not? - From a quick glance on the code I
> see n
On Mo, 2017-07-31 at 14:49 +0300, Andrew Nester wrote:
> That’s actually the thing that you can’t use
> PDO::ATTR_STATEMENT_CLASS with persistent PDO.
The actually question is: Why not? - From a quick glance on the code I
see no obvious reason. In speculation I assume the implementor thought
"Well
> On Jul 31, 2017, at 2:59 PM, Dan Ackroyd wrote:
>
> On 31 July 2017 at 12:49, Andrew Nester wrote:
>>
>> To make it possible to have persistent PDO with custom PDOStatement you
>> should have:
>>
>> 1) custom `CustomPDO implements PDOInterface` which will be somewhat proxy
>> to PDO insta
On 31 July 2017 at 12:49, Andrew Nester wrote:
>
> To make it possible to have persistent PDO with custom PDOStatement you
> should have:
>
> 1) custom `CustomPDO implements PDOInterface` which will be somewhat proxy to
> PDO instance
> 2) custom `CustomPDOStatement implements PDOStatementInterfa
> On Jul 31, 2017, at 2:17 PM, Dan Ackroyd wrote:
>
> On 31 July 2017 at 08:21, Andrew Nester wrote:
>>
>> when we are using persistent PDO we can’t use PDO::ATTR_STATEMENT_CLASS and
>> return our custom PDOStatement class
>>
>> But just implementing PDOInterface and PDOStatementInterface wi
That’s actually the thing that you can’t use PDO::ATTR_STATEMENT_CLASS with
persistent PDO.
To make it possible to have persistent PDO with custom PDOStatement you should
have:
1) custom `CustomPDO implements PDOInterface` which will be somewhat proxy to
PDO instance
2) custom `CustomPDOStatem
On 31 July 2017 at 08:21, Andrew Nester wrote:
>
> when we are using persistent PDO we can’t use PDO::ATTR_STATEMENT_CLASS and
> return our custom PDOStatement class
>
> But just implementing PDOInterface and PDOStatementInterface will allow us to
> implement
> this and have proper type hints in
Yes, sure.
Good example has been provided in related issue in bug tracker.
Assume we are using persistent PDO and want to handle long running processes
and add some logic when executing queries / connections (for instance logging).
It would require your custom classes deriving from PDO and PDOS
12 matches
Mail list logo