urther.
Or at least that is how I see it. But then, I have no vote, so ¯\_(ツ)_/¯.
-Mike
ding if code modifications are
necessary before upgrading to a new version of PHP.
-Mike
h this code has now been update for probably five years since I am
no longer coding in PHP professionally):
https://github.com/search?q=repo%3Awplib%2Fwplib%20make_new=code
<https://github.com/search?q=repo:wplib/wplib%20make_new=code>
And if you are dealing with 3rd party classes, you'll need to write wrapper
classes.
Hope this helps.
-Mike
HP by studying how Go is handling it and
applying any lessons learned.
#fwiw
- Mike
e outcomes, in which case, knock yourselves
out. 路♂️
-Mike
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
name);
}
if ( file_exists( $file ) ) {
require_once $file;
}
}
> So any type alias proposal would need to sort out the above "definition
> problem" in a way that's generally acceptable. That's been the hold up for 3
> years, I think.
The above is potentially one way to skin that cat.
Anyway, I'm sure there will be lots of opinions on this, so bikeshed away.
-Mike
properties to get or set? Ignoring special cases, that
is.
Of course if the RFC for "Interface Default Methods" fails to pass then this
point is moot.
-Mike
> On May 28, 2023, at 1:51 PM, Erick de Azevedo Lima
> wrote:
>
> As others have said: the interface/contr
people might want to look into in the
near future.
Again, the value IMO for having a PHP core standard library is not necessarily
about being able to add functionality, but to add code that can enable code
from multiple developers to work independently yet inter-operably with new or
existing functi
and thus a way to expand those who can actually contribute to core), and a
starting place for anything that could be written in PHP to be written in PHP
so as not to require updating and testing C code seems to have many benefits.
#jmtcw
-Mike
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
ress your concerns.
This workaround uses a base `AutoInit` class with a constructor that uses
reflection to inspect the properties and if they are uninitialized and without
a default get their type and then initialize them to an appropriate "zero"
value.
Yes it uses reflection which
> method, not SubString() With kind regards / Mit freundlichen Grüßen / S
> přátelským pozdravem, Michael Voříšek
>
>
To add support for this request, it seems “substring” is a complete word in
English, so no need for camel-case:
https://www.thefreedictionary.com/substring
-Mike
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
I agree that we have not and should not treat error message
> strings as part of the API guarantee. If anything, maybe that will help
> incentivize people to stop writing bad (unparsable) exceptions.
I am curious what you would envision a better, "parsable" exception from
ssca
al would be to see if the proposed signature was sufficient for
mainstream needs.
Oh, and a higher memory limit is not always a viable solution.
> And unless you want to ship experimental code to production (which you
> shouldn't) you will have to wait for the next major PHP release any
hen experimental features are turned on,
and without having to include said code.
The benefit there would be people could more quickly implement an experimental
feature to see how it might work in the wild before going to all the effort to
implement in C in PHP's core code, for things
ala/fp-book/benefits-of-functional-programming/
<https://alvinalexander.com/scala/fp-book/benefits-of-functional-programming/>
Hope this helps.
-Mike
P.S. Also, the Internals list's very own Larry Garfield is a huge advocate for
FP in PHP, voilà:
https://leanpub.com/thinking-functiona
d propose instead we consider the following are these instead would be
asking the *ability* to "Set" the Property is "Protected" or "Private" where
The Property is again what the prefix verb "is" is acting on:
isSetProtected()
isSetPrivate()
isGetProtected(), and
isGetPrivate()
#jmtcw
-Mike
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
he implementation and
still retain backward compatibility?
-
I pose these questions in hopes to discern among Internals if Traits are
actually the problem or if instead Traits could be improved to solve the
concerns states in this tread, which might require some longer-term deprecation
but I don't think "fn" vs "function" is
> a strong enough clue.
"Strong enough" is an opinion, and it seems all who have commented have
differing ones of those.
But maybe a memory device would help address (some of?) your concerns:
- fn() — It is SHORT and implicit.
atible with false as a type, and even true
with a type.
FWIW I am just offering up an approach that seems to have worked well in Go for
consideration. If you like it, please discuss it. If not, it was worth a try.
-Mike
P.S. I am sure there are many ways to improve what I proposed. Note this is
*just* a straw man proposal; please offer suggestions for improvement.
> On Mar 14, 2022, at 3:20 PM, Lynn wrote:
>
> On Mon, Mar 14, 2022 at 8:04 PM Mike Schinkel <mailto:m...@newclarity.net>> wrote:
>
> Variable variables provide functionality[1] that if removed would force major
> rewrites of PHP applications that were archit
should at least add a function that would allow getting the variables
value by name. Something like `get_variable_value_by_name($name)` but
hopefully with a less verbose name than I used in my example just now.
#jmtcw
-Mike
[1] https://stackoverflow.com/questions/16339658/php-variable-value-from-str
ange to me you cannot see the benefit of traits that would constrain their
uses to requiring an interface.
If it were possible to specify that a trait required an interface then I don't
envision anyone other than those who need bespoke traits would do so, and those
are not likely traits you would want to
> On Oct 5, 2021, at 3:18 PM, Dan Ackroyd wrote:
>
> On Tue, 5 Oct 2021 at 18:47, Mike Schinkel wrote:
>
>> Consider the `Type` class[3] in the `SebastianBergmann\Type` namespace. It
>> contains 60 lines of function declaration to define 14 functions that all
>
o you think? Is this approach any more appealing than the last one
proposed?
-Mike
[1] https://wiki.php.net/rfc/short-functions
[2] https://github.com/sebastianbergmann/type
[3] https://github.com/sebastianbergmann/type/blob/master/src/type/Type.php
[4] https://gist.github.com/mikeschinkel/6
Obviously it doesn't make sense for a developer to write that, but I could see
that a code generator would have add special-case logic to avoid outputting `?`
with the type `null`.
Does it hurt anything if it is allowed?
-Mike
--
PHP Internals - PHP Runtime Development Mailing List
To unsu
get away from
Point of order here: "we" is not unanimous.
-Mike
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
> On Sep 21, 2021, at 1:12 PM, Pierre Joye wrote:
> On Tue, Sep 21, 2021, 11:56 PM Mike Schinkel <mailto:m...@newclarity.net>> wrote:
> > On Sep 21, 2021, at 3:45 AM, Pierre Joye > <mailto:pierre@gmail.com>> wrote:
> >
> > On Tue, Sep 21
> On Sep 19, 2021, at 8:55 AM, tyson andre wrote:
>
> Hi Mike Schinkel,
>>
>> Hmm. I must have missed that thread as I was definitely following the list
>> at that time.
>>
>> But I found the thread, which only had three (3) comments from others:
>
> On Sep 21, 2021, at 3:45 AM, Pierre Joye wrote:
>
> On Tue, Sep 21, 2021 at 11:21 AM Mike Schinkel wrote:
>
>> Honestly, at first I confused `Deque` with `Dequeue` and was wondering why
>> we would name a class with a verb? It wasn't until Rowan's comment th
any other PHP developers will know computer
science terms like this well enough to know `Deque` is a noun when they see it,
and more importantly how many PHP developers will think to search for `Deque`
when they need a queue?
So here is a straw man argument; name the class one of:
- DataStru
Hi Tyson,
Thanks for the reply.
> On Sep 18, 2021, at 7:26 PM, tyson andre wrote:
>
> Hi Mike Schinkel,
>
>> Given there seems to be a lot of concern about the approach the RFC proposes
>> would it not address the concerns about memory usage and performance if
>&
PI around them is procedural, inconsistent, and overall gross
> 7. They lack a lot of native shorthand operations found in other languages
> (eg, slicing)
> 8. Their error handling is crap
Would you mind elaborating on points #3 and #8?
It is not clear to me what you are getting at with
[new_capacity]) — Reduces memory allocated. Sets Capacity to current
Size or new_capacity.
===
If you had these methods then I think you would get the memory and performance
improvements you want, and if you really want a final Vector class for your own
uses you could roll your own using
ssed in order. But JS classes are
> weird creations, implemented as a complex sugar on top of a classless object
> system, so may not be the best point of reference for PHP, whose object
> system much more closely resembles Java or C#.
I did not reference JS — I only referenced Ja
they should always be loaded immediately whenever the
file is loaded. That makes that argument about debugging cause-and-effect
becomes a moot point.
And lazy evaluation should be considered as a separate feature. I blogged about
that a while back but never brought to the list:
https://mikeschin
ying code is actually doing a
> "return $this" rather
> than returning any other valid "self" instance (such as "return new
> self();")?
So a *mutable* fluent style vs. an *immutable* fluent style?
-Mike
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
arly, the objects created by json_decode or PDO_FETCH_OBJECT only need
> the *initial* properties to be dynamic, not to allow properties to be added
> later.
How do you define "initial?"
-Mike
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
ussion about what would be more proper.
> The one thing missing from anonymous classes right now is an elegant way to
> capture data from outer scope when you create them.
I'm not exactly sure what that means, but if I had to guess I think maybe you
are talking about a literally initializ
ll suboptimal besides just the
class name? (I can think of a few, but want to hear from others before I
explain mine.)
-Mike
t;> "Symfony\Component\Messenger" package.
>
> What's the estimated effort for adding package support to PHP? Did
> anyone outline a possible implementation?
In case you have not seen these, which discuss possibilities but at a higher
level than actually how to implement:
https://github.com/nikic/php-rfcs/blob/language-evolution/rfcs/-language-evolution.md
<https://github.com/nikic/php-rfcs/blob/language-evolution/rfcs/-language-evolution.md>
https://phpinternals.news/45 <https://phpinternals.news/45>
-Mike
\Messenger"
> package.
+100
> 'm personally quite keen on the idea of packages, because they're how a lot
> of PHP code is developed in practice - as modular libraries linked by
> Composer - and I think we could optimise the language for that use (e.g.
> applying more cross-file optimisations within a fully preloaded package).
Yes, agree.
-Mike
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
ikeschinkel/5b433532dc54adf53f5b239c8086fd63
Each approach has its own pros and cons but it probably depends on which would
be easier and more performant to implement.
-Mike
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
erms of being able to
upgrade the trait to better internal approaches as I evolve the trait.
Would trait-private address any part of what you need? Or would other
trait-specific visibility address what you need?
And if not, what about traits makes them not-applicable here? Maybe we could
al
> On Aug 26, 2021, at 4:04 AM, Reindl Harald (privat) wrote:
> Am 26.08.21 um 09:24 schrieb Mike Schinkel:
>> https://3v4l.org/HAkhjW#v8.0.9
>> Total execution time for 5000 iterations for BadActor = 0.351906 milliseconds
>> Total execution time for 5000 iterations
> On Aug 26, 2021, at 2:27 AM, Reindl Harald (privat) wrote:
> Am 26.08.21 um 00:59 schrieb Mike Schinkel:
>>> On Aug 25, 2021, at 6:41 PM, Reindl Harald (privat)
>>> wrote:
>>> Am 26.08.21 um 00:37 schrieb Mike Schinkel:
>>>> That said, I'd be reall
> On Aug 25, 2021, at 6:41 PM, Reindl Harald (privat) wrote:
> Am 26.08.21 um 00:37 schrieb Mike Schinkel:
>> That said, I'd be really interested in seeing use-cases where having dynamic
>> properties is essential to an architecture and where it could not be easily
>&g
s global
hook to be called every time ANY object has a property dynamically accessed or
assigned — conceptually like how spl_autoload_register() works — so that
developers could run their programs to see what properties are used. The hook
could collect class names, property names and data types to help deve
se an interface as a signal to provide language
specific behavior to a class rather than to enforce polymorphic behavior.
So rather than double down on features based on leaky abstractions better to
backtrack and correct the original sin IMO.
-Mike
f guarantee where abstract interfaces would not be
required to maintain such a guarantee. #jmtcw
Thoughts?
-Mike
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
,
which currently would mean only classes where all public and protected
properties are read-only[3].
4. And even if we do #3 that is no reason for us not to consider also doing (at
least some of) #2.
#fwiw
-Mike
[1] https://www.nist.gov/pml/weights-and-measures/metric-si/si-units
<
why I chose it as the example, and that perhaps illustrates
> why I am willing to explore such objects but do not believe they are the
> best choice at this time.
So I promised to explain how to simplify the logic. This has nothing to do with
operator overloads so anyone reading who is only
f PHP can identify a value object then it could limit operator
overloads to just classes that are value objects by whatever approach PHP
chooses to distinguish.
-Mike
[*] Ironically I mentioned you because I thought you would be appreciate seeing
another reason PHP could benefit from value objects. B
d to PHP such that your library was no longer needed. Would you be
fine with that, or do would you prefer that features added to PHP made your
library more attractive as opposed to no longer needed?
I'm not suggesting anything untoward — it would be perfectly reasonable IMO for
you wanting fea
On Aug 9, 2021, at 5:32 PM, Mike Schinkel wrote:
> On Aug 9, 2021, at 1:48 PM, Jordan LeDoux wrote:
> You claim that this would be documented on php.net and this would be
> sufficient. Yet the DateTime class has had operator overloads for comparison
> operators since 5.2 and th
e, we'd have numerous classes in PHP supporting operators. At that
people we could have the confidence needed to decide it and how to implement
general-purpose operator overloading.
But one thing is certain. While we can go from special one-off classes that
support operator overloading to
erfaces added to PHP should either
be individual, or an aggregate of other interfaces.
If ArrayAccess where simply the aggregate of these interfaces PHP developers
would be in a better position:
interface OffsetExists {...}
interface OffsetGettable {...}
interface OffsetSettable {...}
in
build_query() I would rather see http_parse_query().
+1. http_parse_query() is even better.
-Mike
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
portunity
> to fix some long shortcomings around parse_str.
Also, +1 to this.
-Mike
P.S. WordPress has a parse_query() *method* on their WP_Query() class, but as
someone who has worked with WordPress for 10+ years even I don't see these two
in conflict. One is a method scoped to th
roposing either annotation tells PHP that instead of looking to see if
$obj explicitly implemented AdderInterface it could instead look to see if its
methods match the methods specified in the interface. And given the smaller
nature of implicit interfaces, that should be a rather small check.
I'v
some actual examples instead of just repeating assertions that this
is needed and if you don't get it you believe it will make your life more
difficult as a library maintainer.
There are tens of things that make my life difficult every day I program in
PHP, but this list doesn't care about my own or any of our difficulties, it
cares about real-world use-cases that would provide reason why a feature needs
to be added to PHP.
-Mike
P.S. Also, what Deleu said.
It claims that there were real-world examples, but did
not show any.
That message was also not part of the RFC.
Listen, I am trying to help make the RFC better to improve its chance of
passing. If you don't want that, then I will just demure.
-Mike
>
> ——
>
> When readin
al-world example use-cases where the author and proponents would
actually like to use nullable intersection types in their future PHP code.
#jmtcw
-Mike
so I
could look into the continued problem and communicate about it on the webmaster
list for you?
Thank you in advance.
-Mike
[1] https://github.com/php/web-php/pull/426
[2] https://www.php.net/mailing-lists.php
ould greatly appreciate it.
I could work on this as I recently got web-php set up and working locally to be
able to submit some PRs.
But I assume the [PHP-DEV] list is probably not the best list to discuss this.
Can someone please recommend which list this would be best discussed on?
-Mike
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
d be in the
category of Core Contributors who would get a veto they currently do not have
on core-related concerns, but who would also potentially see their vote on
opinion-based RFCs diluted.
-Mike
> On Jul 20, 2021, at 8:55 AM, Andreas Heigl wrote:
>
> Hey Mike
>
> Thank you for your feedback!
>
> Am 20.07.21 um 11:57 schrieb Mike Schinkel:
>> Quoting the RFC
>>
>>> the requester has contributed to the PHP sourcecode ecosystem.
>>
> On Jul 20, 2021, at 6:16 AM, Nikita Popov wrote:
>
> On Tue, Jul 20, 2021 at 12:01 PM Mike Schinkel <mailto:m...@newclarity.net>> wrote:
>> On Jul 19, 2021, at 3:31 AM, Nikita Popov > <mailto:nikita@gmail.com>> wrote:
>>
>> On Mon, J
> On Jul 19, 2021, at 3:31 AM, Nikita Popov wrote:
>
> On Mon, Jul 19, 2021 at 5:56 AM Mike Schinkel <mailto:m...@newclarity.net>> wrote:
> I was just checking to see what the license was for PHP and this page[1]
> states:
>
> "PHP 4, PHP 5 and
an extremely subjective process. (Which might be
all you are attempting to do?)
Anyway, #jmtcw.
-Mike
> On Jul 20, 2021, at 2:22 AM, Andreas Heigl wrote:
>
> Hey All
>
> Am 19.07.21 um 17:02 schrieb Andreas Heigl:
>> Hey All
>>
>> Am 19.07.21 um 16:34 schrieb
on PHP.net <http://php.net/> has just not yet been updated to
reflect the existence of PHP 8?
-Mike
P.S. Relatedly, if someone wants to publish code in a GitHub repo with intent
to try to have it included in PHP what license should be used? Would BSD-3 be
appropriate?
[1] https://www
was explicitly envisioned[2] that some small
number of attributes might potentially be more than just metadata.
-Mike
[1] https://platform.sh/blog/2020/php-8-0-feature-focus-attributes/
<https://platform.sh/blog/2020/php-8-0-feature-focus-attributes/>
[2] https://wiki.php.net/rfc/attributes_v2#future_scope
<https://wiki.php.net/rfc/attributes_v2#future_scope>
```
Having a "readonly" class where the properties are read-only by default makes
sense to me, but maybe the better way to do it is with an attribute?
#[Readonly]
class Entity {
public int $count;
public string $data;
}
OTOH, that would be inconsistent with using `readonly`
> On Jul 12, 2021, at 4:28 PM, Lynn wrote:
> On Mon, Jul 12, 2021 at 10:20 PM Mike Schinkel <mailto:m...@newclarity.net>> wrote:
> It seems you have just illustrated why in reality we really do not need type
> casting/assertions in PHP given its current features, because we
> On Jul 12, 2021, at 1:56 PM, Max Semenik wrote:
>
> On Mon, Jul 12, 2021 at 8:01 PM Mike Schinkel <mailto:m...@newclarity.net>> wrote:
> Additionally in Go a type assertion can return a second value which is
> boolean telling if the type assertion succeeded
);
Additionally in Go a type assertion can return a second value which is boolean
telling if the type assertion succeeded. Not having this would effectively
moot the benefit to a type assertion if you had to wrap with try{}catch{} in
case it failed.
$service, $okay = $diContainer->get('email.service')::(EmailService);
if (!$ok) {
echo 'Not an EmailService.';
}
#fwiw
-Mike
someone suggests adding siblings
> to __toString(), there's major pushback.
Look ma, no magic methods! :-)
-Mike
100 years from now, we'll
> remove it without further notice".
That is a policy I can concur with. _Definitely_ better than what was stated
earlier in the thread.
Does anyone else disagree? If no, could this get memorialized on the wiki
somewhere to reference in future discussions, if n
d when appropriate and by vote, and not any hard-and-fast
"IF deprecated THEN must be removed soon."
Please note that I am fully respecting the ballot and voting outcomes here; if
people always vote to remove a deprecated feature in next major version that so
be it.
But RFC authors should be allowed to propose a long time horizon for removal
without being told they "are doing it wrong."
-Mike
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
Replying in one long email to all three who replied to me:
> On Jul 5, 2021, at 8:03 AM, Guilliam Xavier wrote:
> Hi Mike,
>
> Your links speak *in general*. However this is *specifically for PHP*:
> https://www.php.net/manual/en/errorfunc.constants.php#errorfunc.constant
;deprecated" features if their
removal would cause significant BC breakage, I'm not just trying to be a
pendant.
-Mike
[1] https://whatis.techtarget.com/definition/deprecated
[2] https://stackoverflow.com/questions/8111774/deprecated-meaning
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
string):bool IntStrFunc;
function bar (intStrFunc $callback) {...}
I think a few have mentioned user-defined types in the recent past but I am not
aware of it being a current RFC for it.
-Mike
ions to readonly properties while in that
context and anything that it calls:
$clone_obj = clone $obj fn() => {
$this->foo = 'new value';
}
Would this not be a viable solution for cloning, for this RFC, or the only you
work on if this one fails to pass?
-Mike
xcept to use a technique
that your RFC describes as "clearly the developer doing something wrong."
-Mike
[1] https://github.com/nilportugues/php-sql-query-builder
> On Sat, 26 Jun 2021 at 2:51 pm, Mike Schinkel <mailto:m...@newclarity.net>> wrote:
> The idea behind is_li
nction in the mean time it would be available, but not yet standardized into
PHP.
Thank you in advance for your consideration.
-Mike
[1] https://3v4l.org/oCBp7#focus=rfc.literals
<https://3v4l.org/oCBp7#focus=rfc.literals>
[2] https://gist.github.com/mikeschinkel/b9abd4178db461568b81
18/creating-substrings-in-f/
<https://dotnetcodr.com/2017/02/18/creating-substrings-in-f/>
- D: https://stackoverflow.com/a/20570677/102699
<https://stackoverflow.com/a/20570677/102699>
- Mathematica: https://reference.wolfram.com/language/ref/StringTake.html
<https://reference.wolfram.com/language/ref/StringTake.html>
-Mike
is a lot of existing code and
>> tutorials that use:
>>
>> $sql = 'WHERE id IN (' . implode(',', array_map('intval', $ids)) . ')';
>>
>> $sql = sprintf('SELECT * FROM table WHERE id = %d;', intval($id));
>>
And WordPress (and I am sure a lot of other legacy
hat's for the best !
>
> Moreover, it also ensures that all developers speak the same language
> regarding primitives provided by the standard library, and makes
> communication more efficient within community.
This. All of this.
-Mike
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
ance required for
simple functions like this? What is likely to change in the future that would
require maintenance? And would you mind giving a few or at least one example
of a trivial function that did need to be maintained after it was written?
Thank you in advance for taking the time and effort to answer.
-Mike
uggest we bring the original
point of this thread to a close.
I will just have to implement a proof-of-concept so that what I have been
proposing will not be so hard to misunderstand.
-Mike
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
> On Jun 22, 2021, at 11:41 AM, Larry Garfield wrote:
>
> On Tue, Jun 22, 2021, at 8:39 AM, Mike Schinkel wrote:
>>> On Jun 22, 2021, at 9:00 AM, Kamil Tekiela wrote:
>>>
>>> Hi Mike,
>>>
>>> Please don't do this. We already have PDO
> On Jun 22, 2021, at 11:56 AM, Pierre wrote:
>
> Le 22/06/2021 à 17:35, Mike Schinkel a écrit :
>> https://github.com/WordPress/WordPress/blob/master/wp-includes/wp-db.php#L2050
> Sorry for the discussion pollution here but, but ouch, plugins are still
> using this unsaf
> On Jun 22, 2021, at 10:35 AM, Stephen Reay wrote:
>
>> On 22 Jun 2021, at 20:39, Mike Schinkel wrote:
>>
>>> On Jun 22, 2021, at 9:00 AM, Kamil Tekiela wrote:
>>>
>>> Hi Mike,
>>>
>>> Please don't do this. We already
> On Jun 22, 2021, at 9:00 AM, Kamil Tekiela wrote:
>
> Hi Mike,
>
> Please don't do this. We already have PDO with prepared statements. The data
> must be bound. This is the secure way of writing SQL queries.
The problem is that over 40% of the web currently runs on P
> On Jun 22, 2021, at 6:45 AM, Pierre wrote:
>
> Le 22/06/2021 à 11:28, Dan Ackroyd a écrit :
>> On Tue, 22 Jun 2021 at 10:25, Mike Schinkel wrote:
>>> Should(n't?) PHP add a basic SQL builder class that can be extended for
>>> special cas
> On Jun 22, 2021, at 5:28 AM, Dan Ackroyd wrote:
>
> On Tue, 22 Jun 2021 at 10:25, Mike Schinkel wrote:
>>
>> Should(n't?) PHP add a basic SQL builder class that can be extended for
>> special cases, e.g. different flavors of SQL?
>>
>
> No. Or at
most basic PHP install,
3. To allow implementing a performant SQL parser (which is not reasonably done
in PHP),
4. To make creating a target for polyfills for prior versions possible,
5. And to create a standard that all PHP projects that use SQL can adopt?
-Mike
P.S. PHP could also implement a sanit
with a method
attribute. Maybe PHP should too?
In summary, is_literal() is a hammer and people will us it to treat everything
like a nail. At least is_trusted() has the future potential to be treated like
a screwdriver.
-Mike
P.S. If I had my druthers is_trusted() would not pass e
t sure I will support this change to arrays proposed
by Tyson.
I might, but I would like to understand Tyson's use-cases first where he would
prefer to need an array instead of an object if objects instantiation were made
easier, and more importantly, why could objects not be used?
-Mike
we don't add both these features to keep the language
> smaller in this aspect of how functions are called.
For the record, my gut tells me beginners will not grok the proposed pipe
operator as easily as I think they will partial functions. But who actually
knows for sure how newbies will comprehend pipes?
-Mike
>
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
> On Jun 18, 2021, at 8:30 AM, Mike Schinkel wrote:
>
>
>> On Jun 18, 2021, at 7:22 AM, Craig Francis > <mailto:cr...@craigfrancis.co.uk>> wrote:
>>
>> On Fri, 18 Jun 2021 at 11:45 am, Guilliam Xavier > <mailto:guilliam.xav...@gmail.com>>
&g
1 - 100 of 769 matches
Mail list logo