[PHP-DEV] Re: [RFC] "use global functions/consts" statement

2020-01-01 Thread Mark Randall
/ anything-but-class level autoloading, things might as well be in a readily available location. -- Mark Randall marand...@php.net -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: [VOTE] Deprecate Backtick Operator (V2)

2019-11-15 Thread Mark Randall
On 31/10/2019 17:01, Mark Randall wrote: https://wiki.php.net/rfc/deprecate-backtick-operator-v2 is now open for voting. This vote has closed with 11 in favour and 26 against. Backticks will therefore be left unaltered. Thank you to everyone that voted. Mark Randall marand...@php.net

[PHP-DEV] Re: [VOTE] Union Types v2

2019-11-08 Thread Mark Randall
. Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] [VOTE] Deprecate Backtick Operator (V2)

2019-10-31 Thread Mark Randall
https://wiki.php.net/rfc/deprecate-backtick-operator-v2 is now open for voting. This is a standard yes / no vote, requiring a 2/3 majority to pass. The vote will run for 2 weeks and will close on 2019-11-15. Mark Randall marand...@php.net -- PHP Internals - PHP Runtime Development Mailing List

[PHP-DEV] [RFC] Deprecate Backticks Operator now in voting

2019-10-31 Thread Mark Randall
of the PHP Internals News podcast. Mark Randall marand...@php.net

Re: [PHP-DEV] Re: [RFC] Union Types v2

2019-10-30 Thread Mark Randall
accidentally sitting in an outbox for a bit too long and has just sent, but the vote has been underway for a while now. It currently has more than 90% in favour with good turnout. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net

[PHP-DEV] Re: Optional pre-compiler for PHP8?

2019-10-27 Thread Mark Randall
On 27/10/2019 02:12, Mike Schinkel wrote: Hello all: And for everyone:> What do you think of this as a potential future for PHP? I had received the impression that a lot of the problems for performance optimizations relate to how PHP can shift things around at runtime, where identical code

Re: [PHP-DEV] [RFC] anti-coalescing-operator

2019-10-24 Thread Mark Randall
cognition has likely gone out the window. There are plenty of much more expressive ways of doing this without introducing new syntax IMHO. Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: [RFC] Union Types v2

2019-10-24 Thread Mark Randall
is to be found. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Reclassifying some PHP functions warning as exceptions

2019-10-21 Thread Mark Randall
en('missing.txt', 'r'), FileException => null; if ($x === null) { die('File could not be opened.'); } -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: Adding explicit intent for SWITCH/CASE fall through?

2019-10-17 Thread Mark Randall
a token that would effectively no-op in all circumstances. It sounds like a job for a static analysis comment: /** @DisableSwitchStatementFallthroughWarning */ switch ($x) { case 1: $x = doSomething(); case 2: doLaLaLaLa(); break; default: doTralala(); } -- Mark Randall

[PHP-DEV] Re: Inline switch as alternative to nested inline conditional

2019-10-15 Thread Mark Randall
On 16/10/2019 02:46, David Rodrigues wrote: Hello. I like to suggests a discussion about a FR to make possible to inline switch, as an alternative to nested inline conditionals. ``` http://www.php.net/unsub.php

[PHP-DEV] Re: Migration tooling and the cumulative cost of purely syntactical deprecations

2019-10-11 Thread Mark Randall
On 11/10/2019 11:25, Nikita Popov wrote: Purely syntactical deprecations, such as the recently discussed case of backticks, but also the already accepted deprecations of the "alternative array access syntax" and the (real) cast, can be performed automatically and with perfect reliability. I

[PHP-DEV] Re: exit() via exception

2019-10-11 Thread Mark Randall
) { } ^^ Compiler Error. Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Internals "camps"

2019-10-10 Thread Mark Randall
On 10/10/2019 23:04, Walter Parker wrote: If this truly is the problem that you say it is, there should be plenty of documentation online as to the issues that it has cause. Maybe you could post some of the better cases (as the the responsibility of the person suggesting the change to provide

Re: [PHP-DEV] Internals "camps"

2019-10-10 Thread Mark Randall
migrate to the much more obvious shell_exec. By writing the RFC, it's pretty obvious which one I think is the best and most realistic course of action. Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Internals "camps"

2019-10-10 Thread Mark Randall
t's within our power, deprecation and eventual removal of backticks in favour of something that's much more obvious in its intent and much less easy to miss. Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Deprecate Backtick Operator (V2)

2019-10-08 Thread Mark Randall
ather than trying to shift the conversation towards who can and cannot propose RFCs :-) If you want to discuss changing the RFC mechanics and who is entitled to make them, please make your own RFC. Thank you. Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, v

Re: [PHP-DEV] [RFC] Deprecate Backtick Operator (V2)

2019-10-07 Thread Mark Randall
things, not just PHP. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Deprecate Backtick Operator (V2)

2019-10-06 Thread Mark Randall
, As the RFC states, there are already widely used tools available which can do this reliably: https://github.com/FriendsOfPHP/PHP-CS-Fixer backtick_to_shell_exec -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Deprecate Backtick Operator (V2)

2019-10-04 Thread Mark Randall
having identical behaviour, the compiler actually transforms the AST into a userland function call to the named shell_exec function as per zend_compile_shell_exec. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] [RFC] Deprecate Backtick Operator (V2)

2019-10-04 Thread Mark Randall
y in light of the existence of better described and more well-known functions exhibiting identical behaviour. This RFC only covers the issuing a deprecation notice, and its complete removal would be contained within a separate RFC. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To u

[PHP-DEV] [Discussion] Unifying Documentation and UI-Based Editing

2019-09-22 Thread Mark Randall
parsing code. It's pure cancer. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Prevent disruptions of conversations

2019-09-19 Thread Mark Randall
in light of the existing internals guidelines regarding considerate posting, and they may find themselves prevented from continuing those actions. Something I think most people would consider entirely reasonable. Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe

[PHP-DEV] Re: [RFC] Reclassifying engine warnings

2019-09-15 Thread Mark Randall
break due to requiring bitwise mask comparison in existing handlers. Either way, this this would allow easily differentiating engine warnings that will become more prominent in this RFC, with those contained in PHP_FUNCTION scope. -- Mark Randall -- PHP Internals - PHP Runtime Development Ma

Re: [PHP-DEV] Build instructions for Ubuntu 18.04 (and other systems)

2019-09-15 Thread Mark Randall
probably find a way around it, at least when running containerised. Are you referring to installing shared libraries on the host? -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Changing fundamental language behaviors

2019-09-13 Thread Mark Randall
, the notion of declare(sloppy=1); Has already been jokingly proposed, and I would personally have no problem with it if people want to opt-in to less reliable enforcement... but once again, I stress that the defaults should always be best-practices. -- Mark Randall -- PHP Internals - PHP

[PHP-DEV] VCS Account Request: marandall

2019-09-12 Thread Mark Randall
Registration recommended by participants of 11 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Union Types v2 (followup on github usage)

2019-09-05 Thread Mark Randall
On 05/09/2019 22:45, Benjamin Morel wrote: . One thing that could be checked, is whether their API allows retrieving the whole discussion history programmatically. If so, one could setup a database to sync all messages to on a regular basis, so that the PHP project could move the discussions

Re: [PHP-DEV] [RFC] Union Types v2 (followup on github usage)

2019-09-05 Thread Mark Randall
single sub-branch individually to get the final word. Something I am finding hard on Github, and maybe it's just because I haven't found the option yet, is finding new posts. Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net

Re: [PHP-DEV] [RFC] Reclassifying engine warnings

2019-08-28 Thread Mark Randall
he analogy someone posted elsewhere... the training wheels are coming off. Time to be responsible and type those few extra characters to be clear on your intent. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Reclassifying engine warnings

2019-08-28 Thread Mark Randall
The manager says: "Lay this out to me" You reply: "It's like our company car still works, but it no longer tighter meets emissions standards so they won't let us take it into the city any more" "Crap", the boss replies "Okay, we had best fix that" -- Mark Ra

Re: [PHP-DEV] [RFC] Reclassifying engine warnings

2019-08-28 Thread Mark Randall
build your business on a foundation of eggshells and then complain when something comes along that makes those eggshells crumble. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Reclassifying engine warnings

2019-08-28 Thread Mark Randall
tools available for years now to make this behaviour more defined: $counts[$key] = ($counts[$key] ?? 0) + 1; "If $counts[$key] is not set, use the value 0". Null Coalescing was explicitly designed to provide for this behaviour. -- Mark Randall -- PHP Internals - PHP Runtime Developme

[PHP-DEV] Re: [RFC] Reclassifying engine warnings

2019-08-28 Thread Mark Randall
on the quality of their code as we (and their customers) would perhaps like them to be. For everyone else, it's one more tool to help make us aware of problems, and prevent those problems from propagating along the stack and effecting other things. Bring it on. -- Mark Randall -- PHP

[PHP-DEV] Elevating Errors: Helpers + Formatting

2019-08-20 Thread Mark Randall
quot;hello"), fn() => func_to_test(1234), fn() => func_to_test(false) ); I am however, unsure where this script should be placed in the codebase. Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Vote: Straw poll for P++ feasibility

2019-08-16 Thread Mark Randall
ain general concepts in a particular way. Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Vote: Straw poll for P++ feasibility

2019-08-16 Thread Mark Randall
r PHP, and build a consensus on things such as strict typing, overloading in the core functions, and perhaps most divisively, if "cleaning up the language" is in itself a viable justification for backwards compatibility breaks, and if so, what weight it should carry. Mark Randa

Re: [PHP-DEV] [RFC] Namespace-scoped declares, again

2019-08-13 Thread Mark Randall
ernally but it would require userland loaders to be upgraded with it, not exactly a huge stretch, especially with most things being composer-based, but a dummy class would make it work out the box, including optimization steps like dumping the class list. Mark Randall -- PHP Internals - PHP

Re: [PHP-DEV] [RFC] Namespace-scoped declares, again

2019-08-13 Thread Mark Randall
css / js / html template files. Perfect for runtime, not so good for compile time, but if I'm wrong I dare say someone will let me know. Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Namespace-scoped declares, again

2019-08-13 Thread Mark Randall
not use an autoloader, the __nsmeta.php would need to be loaded first, this is something that PHP7.4 autoloaders would need to take into consideration. Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Namespace-scoped declares, again

2019-08-12 Thread Mark Randall
and may depend on that package definition to control its behaviour (especially if it gets loaded up with declares or editions). I'll simply be replacing my ubiquitous strict-types declare with whatever was used to reference this package. Mark Randall -- PHP Internals - PHP Runtime Development

[PHP-DEV] Re: Call for participation: Annotating internal function argument andreturn types

2019-08-10 Thread Mark Randall
nts? One thing I did see in the GD library with _php_image_create_from is that ZPP is different depending on logical expressions, rather than pre-processor statements. How should these be handled? Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, v

Re: [PHP-DEV] Re: P++: FAQ

2019-08-10 Thread Mark Randall
of backwards compatibility. Prioritizing backwards compatibility did not receive a strong response. I seem to remember listening to Nikita on Derick's podcast a while ago where he made comment on his observation that newer generation programmers were looking for improved typing and strictness. Mark

[PHP-DEV] Re: Call for participation: Annotating internal function argument andreturn types

2019-08-10 Thread Mark Randall
On 10/08/2019 11:56, Nikita Popov wrote: Hi, Lack of type information for internal functions in Reflection is a long-standing issue. In PHP 8 we finally have all the necessary technical groundwork done to support argument and return type annotations on internal functions at scale. Question -

Re: [PHP-DEV] P++: FAQ

2019-08-09 Thread Mark Randall
ctions. The entire argument order issue could potentially be wrote off with SON. My guess is that whatever happens, it's going to require one version that really brings the pain, to set the groundwork for the future. Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsu

[PHP-DEV] Re: P++: FAQ

2019-08-09 Thread Mark Randall
the version definition to a tag instead of a declare, and having a "Anything and everything new" version. Is there a major difference I'm not immediately seeing? Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Bringing Peace to the Galaxy

2019-08-09 Thread Mark Randall
On 09/08/2019 08:15, Zeev Suraski wrote: You seem to believe that C++ is inherently superior to C. And it's entirely within your right. However, there are projects - to this date - that prefer C to C++ for a variety of reasons. PHP is one of them, and others include the Linux kernel, redis,

Re: [PHP-DEV] Re: Bringing Peace to the Galaxy

2019-08-09 Thread Mark Randall
. Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Bringing Peace to the Galaxy

2019-08-08 Thread Mark Randall
of things, but I agree with Nikita's point that it only kicks things down the line until the next break. I think side-by-side engine versions are likely going to be the end result if it's possible. My heart says "clean break" my head says "side by side". Mark Randall

[PHP-DEV] Re: Bringing Peace to the Galaxy

2019-08-08 Thread Mark Randall
challenge for the internals team and its contributors to create coexistent systems with versioning, but I would simply offer the following: If you're not going forward, you're falling behind, and sometimes going forward requires sacrifice. Mark Randall -- PHP Internals - PHP Runtime Development Ma

Re: [PHP-DEV] [RFC] [VOTE] Deprecate PHP's short open tags,again

2019-08-07 Thread Mark Randall
), would treat code which was previously explicitly specified as valid, as no longer valid, and would expose it to the world. Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] [VOTE] Deprecate PHP's short open tags, again

2019-08-07 Thread Mark Randall
short tag removal has one major thing going for it, consistency, and by extension, predictability. That's it. Is that enough? I'm on the fence. Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: [RFC] Namespace-scoped declares, again

2019-07-30 Thread Mark Randall
about time that an spl_autoload_list was added that accepted the standard composer classmap [class_id => path] and forewent most autoload callbacks entirely? Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: [RFC] Namespace-scoped declares, again

2019-07-27 Thread Mark Randall
ike a job for composer tbh so userland workload would be limited for projects using modern workflows. This would of course be dependent on if the compiler stage has the ability to branch off and call an autoloader the first time it encounters the import_declares. Just my 2 pence worth. --

Re: [PHP-DEV] Re: Generating arginfo from stub files

2019-07-24 Thread Mark Randall
not a catch-all situation, but might present an opportunity for doing some of the leg work automatically. Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: PHP 7.4 FEATURE FREEZE ❄

2019-07-23 Thread Mark Randall
On 23/07/2019 10:00, Derick Rethans wrote: DOs: - Test test test test - Tell your friends and collegues to test with their apps and projects - Oh yeah: test! Derick, congratulations on your RM role, however, for your personal well-being, I feel obliged to ask if you have recently experienced

Re: [PHP-DEV] [RFC] [DISCUSSION] Deprecate PHP's short open tags V2

2019-07-23 Thread Mark Randall
code. If short tags are to be removed, V2 is a significantly more reasonable way of going about it. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: [RFC] [DISCUSSION] Deprecate PHP's short open tags V2

2019-07-23 Thread Mark Randall
stretching the bounds of reasonableness too far to suggest the creation of a dedicated page on php.net that contains a description, a link to csfixer etc, and then that link be included in the depreciation message itself. -- Mark Randall On 23/07/2019 18:54, G. P. B. wrote: Hello intern

[PHP-DEV] Re: FFI class introduces non-standard method types (can be called statically and non-statically)

2019-07-04 Thread Mark Clements (HappyDog)
""Mark Clements (HappyDog)"" wrote in message news:php.internals-105...@news.php.net... > [SUMMARISED] > The new FFI class that has been introduced in PHP 7.4 [1]. > has bivalent methods, which is not allowed in userland code and > is therefore introducing

Re: [PHP-DEV] [Discussion] Scalar Object Strings and MultibyteEncodings

2019-06-20 Thread Mark Randall
On 20/06/2019 22:19, Rowan Collins wrote: On 20/06/2019 16:36, Mark Randall wrote: "Hello".substr(1) // would work as expected regardless of encoding As I always point out when "multi-byte support" or "Unicode support" is discussed, it's often ambiguous just w

[PHP-DEV] [Discussion] Scalar Object Strings and Multibyte Encodings

2019-06-20 Thread Mark Randall
oding My question to everyone is, what mechanism would be used to mark a string as being of a specific encoding? Naturally a .toUTF8() would be possible, but I'm not sure that would be as tidy as it could be. "Hello".toUTF8() $_GET['example'].toUTF8() In certain languages, a basi

Re: [PHP-DEV] Generating arginfo from stub files

2019-06-18 Thread Mark Randall
tions or unions with different requirements for each type. Well-docblock'd stubs, C definitions, documentation pages etc would then be the drawn from the JSON rather than the other way. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV][RFC] Alternative "use" syntax for Closures

2019-06-17 Thread Mark Randall
} return -1; }; $x and $y would be captured, $z would not be. I believe this is how short closures are implemented, but is at present only supporting a single line. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: [PATCH] Add configuration value to enable/disable stack tracelogging

2019-06-17 Thread Mark Randall
provide best-of-both-worlds. The benefits of public key vs a symmetric key are that the logs remain secure even with read access to php.ini. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV][RFC] Alternative "use" syntax for Closures

2019-06-17 Thread Mark Clements (HappyDog)
of the "closure" you made a fool yourself beyond what you > can grasp; but anyhow, my dear, it's refreshing, you made smile. Please try and keep it civil. That was uncalled for. - Mark Clements (HappyDog) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV][RFC] Alternative "use" syntax for Closures

2019-06-16 Thread Mark Randall
= 1; $closure = function() use (...) { }; Where "use (...)" would auto-capture all of the used variables in a similar manner to short closures, that would certainly save a bit of time. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, v

[PHP-DEV] FFI class introduces non-standard method types (can be called statically and non-statically)

2019-06-13 Thread Mark Clements (HappyDog)
uld be resolved before 7.4 is released. Kind regards, - Mark Clements (HappyDog) [1] https://www.php.net/manual/en/class.ffi.php [2] https://www.php.net/manual/en/ffi.new.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: PHP RFC: Nullsafe Calls

2019-06-04 Thread Mark Randall
eing able to tell the difference would have at least some useful applications. Clearly there's ways around that using the current, more verbose method, but it would be nice if a way could be found so that this potential ambiguity wasn't there in the first place if this new mechanism is adde

[PHP-DEV] Re: PHP RFC: Nullsafe Calls

2019-06-03 Thread Mark Randall
to throw it out there as a possible option for handling chaining, that would potentially kill many more birds down the road in the process. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: Error instead of returning false

2019-05-07 Thread Mark Randall
functions as-is, finally claim the \php namespace, alias all of the internal functions into it, and make their default, unchangeable behaviour be to throw a RuntimeException on error. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net

[PHP-DEV] Re: Proposal for a RFC

2019-05-04 Thread Mark Randall
ss ]; } } Eh, my suggestion is probably a terrible ideal. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] [VOTE] Deprecate PHP's short open tags

2019-04-30 Thread Mark Randall
haste, as it's quite clear the current plan cannot go forward as-is. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: Alternative approach to short tags deprecation

2019-04-25 Thread Mark Randall
codebase against each one. But we all know that's not how the real world works. For all those reasons, I am in favour of your proposal to fail-safe with a compiler error. (Also: Did I miss a vote option which would have made short_open_tags always on?) -- Mark Randall -- PHP Internals - PHP

Re: [PHP-DEV] [RFC] [VOTE] Deprecate PHP's short open tags

2019-04-24 Thread Mark Randall
n convince me otherwise, I will continue to strongly believe that foreseeable future (years). I'm half tempted to RFC it so it can go to a vote. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] [VOTE] Deprecate PHP's short open tags

2019-04-24 Thread Mark Randall
be if you were computer-generating code, as it would not pick up literals. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] [VOTE] Deprecate PHP's short open tags

2019-04-24 Thread Mark Randall
ds no weight with me. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Object Type Casting Reloaded

2019-04-23 Thread Mark Randall
On 23/04/2019 14:39, Mark Randall wrote: It keeps coming back to the feature we've all been praying to the PHP Gods for... generics. Replying to myself (sorry). I just wanted to point out that the same syntax would also solve your other issue from the nullable casts thread: function ncast

Re: [PHP-DEV] Object Type Casting Reloaded

2019-04-23 Thread Mark Randall
; } throw new InvalidArgumentException('Cast expected ' . T); } $x = cast($obj); -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Permit trailing whitespace in numeric strings

2019-04-14 Thread Mark Randall
it as the recommended inbuilt method that handles strings with whitespace and trailing junk? Will there be one? I'm aware that the most common IDEs suggest using (int) instead of intval. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http

Re: [PHP-DEV] [RFC] Nullable Casting

2019-04-11 Thread Mark Randall
, you should both be holding your heads high that you've made the effort. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Nullable Casting

2019-04-10 Thread Mark Randall
. Otherwise moves on to next option and casts it to an integer. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Nullable Casting

2019-04-10 Thread Mark Randall
_GET['name'] ?? ''; if ($value === '') { // also, ?name[]= can sod off throw new Exception('You must provide a name'); } -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Nullable Casting

2019-04-10 Thread Mark Randall
null I don't think it would go down very well to have non-nullable casts throwing TypeErrors for common cases, without an elegant could-not-convert fallback that doesn't require a 5 line try-catch block. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit

Re: [PHP-DEV] [RFC] Nullable Casting

2019-04-10 Thread Mark Randall
ice, then prints `int(1)` In the absense of a nullable modifier, that makes so little sense that it definitely needs to throw a TypeError IMO. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Nullable Casting

2019-04-10 Thread Mark Randall
Equally I see a lot of use in the following to nullify unexpected inputs such as if $_GET['something'] was an array: $input = (?string)$_GET['input'] ?? ''; -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Permit trailing whitespace in numeric strings

2019-04-10 Thread Mark Randall
utput = (?int)$input ?? $default; -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Retiring PHP's Mirror Program

2019-03-14 Thread Mark Scholten
know where I can help and if possible I will. Kind regards, Mark Scholten > -Original Message- > From: Levi Morrison [mailto:le...@php.net] > Sent: Thursday, March 14, 2019 16:37 > To: Derick Rethans > Cc: PHP Developers Mailing List; PHP Mirrors ML > Subject: Re:

Re: [PHP-DEV] 2016 TestFest, did the tests written then ever get merged?

2019-02-09 Thread Mark Baker
On 06/02/2019 08:13, Mark Baker wrote: > Looking at the Voting Eligibility discussion going on at the moment. > > I, like many others, participated in the last testfest 18 months or so > ago. Did the results from that ever get merged? Or have they simply been > discarded or forgo

[PHP-DEV] 2016 TestFest, did the tests written then ever get merged?

2019-02-05 Thread Mark Baker
in the contributions list posted aganst the Workflow and Voting RFC Eligibility list: yet all those who participated in the testfest care about the language enough to get involved -- Mark Baker  _ |.  \ \-3 |_J_/ PHP | || |  __  | || |m| |m|  I LOVE PHP

Re: [PHP-DEV] RFC: RFC Workflow & Voting (2019 update)

2019-02-01 Thread Mark Baker
y have more insight into the internals of PHP than the average PHP developer, but sit astride the fence between the core an duserland development -- Mark Baker _ |. \ \-3 |_J_/ PHP | || | __ | || |m| |m| I LOVE PHP -- PHP Internals - PHP Runtime Development Mailin

Re: [PHP-DEV] PHP 8 next?

2018-06-25 Thread Mark Baker
complaints from on the ground that releases are currently too frequent, making it difficult for larger organisations to keep up when they have to retest all their own apps/libraries/plugins with the new versions. A fixed cycle and schedule could help plan for change. -- Mark Baker

Re: [PHP-DEV] PHP 8 next?

2018-06-25 Thread Mark Baker
that the big jump in performance that JIT warrants is enough to justify a major version change, and it makes for a strong selling point, even if there are no BC breaks -- Mark Baker _ |. \ \-3 |_J_/ PHP | || | __ | || |m| |m| I LOVE PHP -- PHP Internals - PHP Runtime

[PHP-DEV] Re: [RFC] Namespace-scoped declares, again

2017-12-11 Thread Mark Randall
a set of independent scripts. If this doesn't pass, long term I think the main alternative would be to have a single statement that was like a quasi-include of declarations in another file, almost like a ".h" declare_import('/my/namespace/nsprefs.php'); -- Mark Randall -- PHP Inter

Re: [PHP-DEV] RFC - Array Of for PHP 7

2017-11-02 Thread Mark Randall
'hello', 1] I did take a look in zend_types.h half expecting to see a pointer to an optional structure defining an indirect function call + argument to be called whenever the zval_value was about to be changed, but if it's in there, I missed it. -- Mark Randall -- PHP Internals - PHP

Re: [PHP-DEV] RFC - Array Of for PHP 7

2017-11-02 Thread Mark Randall
loaded function constructors... ... and yes, that did include almost every major language wishlist item in a single go. Chalk it up to me romancing my long lost love of C++. Thanks. -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Suggestion Method Constant

2017-10-13 Thread Mark Randall
func_2($1, 'Peace', 'Out'), func_3('ThisOneNeeds', 'Arg3ReplacingInstead', $1), func_3($1, $1, 'HowAboutOneWhichUsesTheSameArgumentTwice') ); function chain($start, ... $fns) { foreach ($fns as $fncall) { $start = $fncall($start); } return $start; } -- Mark Randall -- P

Re: [PHP-DEV] Suggestion Method Constant

2017-10-13 Thread Mark Randall
'Arg3ReplacingInstead', $1), func_3($1, $1, 'HowAboutOneWhichUsesTheSameArgumentTwice') ); function chain($start, ... $fns) { foreach ($fns as $fncall) { $start = $fncall($start); } return $start; } -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] array coalesce operator concept

2017-07-12 Thread Mark Shust
Stas, Wow, for some reason it didn't occur to me to try that. Confirming the following works: foreach ($foo ?? [] as $bar) { echo $bar; } I think the biggest need for this is if the value is null. Guess it's case-closed :) Might be a good idea to add this to the docs, pretty neat. Mark

Re: [PHP-DEV] array coalesce operator concept

2017-07-12 Thread Mark Shust
into an iterable/array for the duration of the loop. I'm wondering what opinions would be on the cons of going this route. Given php's weak typing and someone's desire to execute a foreach on _something_, I think this alternate method might be a good option. Mark On Wed, Jul 12, 2017 at 12:18 PM Aidan Woods

<    1   2   3   4   5   >