« first day (4170 days earlier)      last day (778 days later) » 

12:05 AM
@Feeds hits save sorry what?
@Girgias "pecl Solr" ummm...
> seems the docs are in a pretty awful state
no shit
 
@DaveRandom Hey there was activity 2 days ago, let me have some hope
 
git rebase -i LOL doesn't count
 
It's an actual commit ;_;
 
git commit -am sorry && git tag -m notsorry
?
 
12:30 AM
vote for sealed classes is going to start in few hours :)
 
final class Vote extends Fact implements Opinion {}
 
sealed class Vote permits Fact {} :p
 
use Opinion as Fact;
:-P
 
sealed class Vote permits \Fact {}* there
gonna start spending more time playing with PHP internals code, i have about 5 more RFCs i want to propose for PHP 9.0, but gonna need at least do a PoC.
 
@SaifEddinGmati in C terms, fact == *opinion is definitely not a safe assumption
fact == opinion* is closer to reality
 
 
3 hours later…
 
5 hours later…
9:44 AM
@SaifEddinGmati The implementation of the RFC refers to classes that may inherit the sealed class as "friends". In C++ a friend refers to a class that can access private properties of another class. I don't think it's good to use the same terminology here.
 
@IluTov Is it "legal" to adjust the RFC text after the vote started? I've very intentionally not touched my RFC at that point.
 
@TimWolla It doesn't appear in the RFC text, just the implementation. But to answer your question: It depends on how big the change is and if anybody objects in the mailing list. But yes, drama is common.
 
10:20 AM
@TimWolla I think it's fine to touch the RFC as long as semantics don't change. If they do, then it must be minor and noted on ML (and not be done last day)
 
10:59 AM
On the undef variable RFC there's more votes on the "Why did you vote against" secondary question than votes against the primary question 😕
 
Yeah, I didn't vote for the main event, but if i'd vote against, then it would be because of BC concerns
@SaifEddinGmati RFC still has " Status: Under Discussion" — you should fix that?
 
Hello All
can anyone help me with this
0
Q: PHP Warning: Module 'oci8' already loaded in Unknown on line 0

ratnaMy applications are running on Linux RHEL 8 and it uses oracle DB. I tested the DB connection it's working properly. But now I am facing this error PHP Warning: Module 'oci8' already loaded in Unknown on line 0 I disabled extension=oci8.so in /etc/php.ini extension=oci8.so in /etc/php.d...

 
12:05 PM
Morning
Since you guys are well versed in C, what is it trying to do here ? the - ' ' gets me

int ind, b;

if ((ind = (*argv)[b] - ' ') < 0)
 
cmb
' ' is 32 (assuming ASCII), so it subtracts 32; IOW, it checks whether the character is less then space (i.e. a control character)
 
Thanks @cmb
 
@Derick As I wrote in the mailing list, there wont be one until 8.4 gets cut. The number of changes required is extensive and much of it is likely to change between now and 9.0
 
Idk who made the improvement, but the website php.net and the git repo and syncing more often now, thanks!
 
Ітжс йуст луцк
оопс.
It's just luck.
(Been playing with typing Ukrainian on my keyboard)
@GabrielCaruso Are you approving the moderated email for php-announce too?
 
12:24 PM
Also, my apologies Derick but I don't think I'm going to have opportunity to sit down for the podcast anytime in the next few weeks, I started a new position (same company) and my schedule is so chaotic right now i'm lucky if I get 10 minutes without interruption.
 
@Derick no, why?
 
@GabrielCaruso Well, otherwise your announcement isn't actually sent to the list.
@MarkR No worries.
 
12:48 PM
does anyone know why $foo[] = 1 doesn't currently raise an undefined variable warning, but $foo++ does? is it a deliberate choice, or a coincidence of implementation?
 
@IMSoP That behaviour is special-cased, it used to not just apply to null either, but false too. That was recently nerfed in wiki.php.net/rfc/autovivification_false
 
@IluTov That's a prototype patch :)
@Derick oh! nice catch :) fixed
 
@SaifEddinGmati On the mailing list you've linked to the edit page for the RFC FYI
 
@MarkR isn't that just the same as $foo++ treating null the same as 0, though?
 
@MarkR which email? 🤔 this seems to link to the RFC: externals.io/message/117350
 
12:56 PM
@IMSoP Arguments either way, personally I'm not a fan of autovivication and would happily see it gone for variables, but there's the issue of nested arrays where it's very, very useful
 
@MarkR I'm not talking about the auto-vivification, I'm talking about the use of an undefined variable
 
It's not treated as an undefined variable because auto vivification exists.
 
that makes no sense
.
sorry, trying to write a concise example of how nonsensical this is
foreach ( $foo as $bar ) { $found[] = $bar; } is apparently just fine; foreach ( $foo as $bar ) { $found++; } is apparently not!?
note, in both cases I'm talking about $found being undefined, not explicitly null
 
Do bear in mind that right now it doesn't emit anything, and my RFC is explicitly aimed at those things which currently emit an undefined variable warning, and only those things.
 
as I said on the list, I think that's an extremely poor definition for an error
"why doesn't this error in 9.0?" "because we forgot to add a Warning in 8.0"
 
1:01 PM
The code is:

if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
....
}

So that includes undef 0 + null 1 + false 2 (or not anymore)
 
cmb
@IMSoP yeah, we're talking about PHP ;)
 
but should it
like I say, I've voted no on this basis; we shouldn't be introducing inconsistent errors just because we can't be bothered to define them properly
 
The point is there is no error with $undef[] = 1; it's perfectly valid and emits neither notices nor warnings.
 
@MarkR why is it perfectly valid?
it is bad code for exactly the reasons your RFC lays out
 
If you want to make it a warning in 8.2, i'm happy to roll it up into the changes when 9.0 hits and this RFC of mine gets into effect
 
1:04 PM
eugh, I can't be bothered to repeat myself
 
You're taking exception with something that's deliberately out of scope of my RFC, because it's an explicitly designed part of the language :-)
 
@MarkR I'm taking exception with the rationale for your RFC being inconsistent with the proposal
if the rationale is "undefined variables are bad", just saying "eh, these ones are out of scope because I can't be bothered to change them" makes no sense
auto-vivifying to integer with ++ was "part of the language" for years, but you're proposing to change it
 
en.wikipedia.org/wiki/Autovivification "autovivification is the automatic creation of new arrays and hashes"
 
whatever you want to call it, $foo++ is just as much "part of the language" as $foo[] = 1
so far you've given no justification why they should be different, other than "they already are", i.e. "it's somebody else's problem"
 
cmb
1:52 PM
@MarkR That article also claims that PHP would not allow autovivification.
 
apologies for that getting a bit rant-y; I'm recovering from Covid and my brain's a bit mushy
FWIW, the difference in behaviour appears to date all the way back to PHP 4, so whether it was deliberate or not then may be impossible to find out at this point: 3v4l.org/GYbcK vs 3v4l.org/bsaiV
 
Is this a different thing from this RFC?
 
@Machavity that is (primarily) about $foo = false; $foo[] = 1;
 
So broader scope then. $foo = 1; $foo[] = 2;
 
I'm talking about when $foo is completely undefined
which right now won't add an error for this case, because it's an existing inconsistency
 
2:05 PM
That'll definitely be interesting. I bet a ton of code inadvertently does it now
 
2:24 PM
Where's that script again that Nikita used for analysis of the top n GitHub repos?
 
@IluTov Can't help with that, but I must say that GitHub's new code search is pretty good: cs.github.com/…
And sorry if my remark regarding the encoding appeared several times and that's what you were hinting at with your reply. GitHub's borked: githubstatus.com
 
cmb
Don't know where that script is (likely in a GH repo or Gist), but it is not about top n GH repos, but rather about top n packages on packagist.org.
 
@TimWolla Can it do structural search? Regex will have limited accuracy. (I tried with sourcegraph.com)
The problem is something like "foo" . ${'baz'} will be hard to exclude.
@TimWolla Yeah I noticed too, no problem ;)
 
It understands the concept of symbols, but I don't think it can understand the contents of strings.
 
3:26 PM
@Danack The new version of Docker Mac added a toggle to use Monterey's new VirtioFS for file sharing. The performance is vastly improved.
 
I saw the article on that - they claim 80/90% reduced time!
 
3:39 PM
That seems about right. Scanning the entire project used to take around 5s now takes about 1s.
Well, maybe 2. Still, much better.
More noticeable is the reduced CPU utilization of the new virtualization framework vs. hypervisor.
 
3:59 PM
Morning
 
o/
 
it's based on Packagist, rather than Github
 
@IMSoP Thanks!
 
4:49 PM
@ramsey @PatrickAllaert 8.1.4 announcing soon?
 
@Derick Yes, it's Ben's turn, so should happen probably bit later
Timezone diff you see... Someone told me you know about that kind of stuff
 
It's 1pm where he is...
 
I think he's not doing that kind of things during working hours
 
5:10 PM
\o
just finished 3 hours of meetings 😵 have 30 minutes before going into another meeting
 
6:23 PM
Pop quiz: What is the result of $foo = 'foo'; echo "\{$foo}";? PHP is so weird.
 
@SaifEddinGmati story of my work life.
 
@IluTov Based on the wording of the question: $foo?
 
@TimWolla No
 
Yeah, checked myself already. But as it was a quiz I wanted to give my answer first :-)
 
user17161735
Is it possible to use symbolic links to provide access to javascript and CSS files that are not in the public directory?
can you give me an example?
 
6:28 PM
@TimWolla :D An escaping character that gets printed when escaping, genius.
 
@IluTov I think the behavior in modern PHP versions is the expected behavior, though. Invalid backslash sequences always print the backslash itself: 3v4l.org/T9UGV.
That's also something you commonly see used in regex strings.
 
@TimWolla That's fine, but when escaping it should not also be printed, because then how are you gonna escape things without also getting the escaping character in your output?
The thing is, for "{$foo}" the {} are parts of the interpolation. Adding the backslash escapes the { which makes the interpolation fall back to $foo only. So the {} are printed literally. That's cool, but why the hell is the backslash also there?
 
@IluTov 3v4l.org/C3nNS? For your example I don't think that the backslash is in "escaping position". That's why I answered "based on the wording of your question".
 
@TimWolla 3v4l.org/IOTZc This is what I'd expect.
 
@IluTov Ah, indeed. It should either be \foo or {foo}.
The former if the backslash does nothing to {$foo}.
 
cmb
 
7:20 PM
wiki.php.net/rfc/arbitrary_string_interpolation In case anybody wants to proof read
 
> Status: Darf

There's the first bug :-)
 
@TimWolla Lol
@TimWolla Refresh :)
 
You should remove "?expand=1" from the implementation link, so you don't get the pull request UI
 
@SaifEddinGmati Good to know, adjusted.
 
> Statis method calls
Typo
> The proposed syntax works in double quoted strings (“”), heredoc (<<<TXT TXT) and the execution operator (``).
Is that equivalent to "anywhere where variable interpolation happens"? Then I'd make that explicit. And wasn't the execution operator deprecated? Or was there just some proposal for that. Also in that sentence the heredoc example is not `<code>`ified and `“”` should likely be `""` (and everywhere else where those fancy quotes appear)
Other than that, LGTM. I'd vote yes if I was allowed to vote :-)
 
7:30 PM
@TimWolla "Is that equivalent to "anywhere where variable interpolation happens"? " Yes, I'll clarify.
@TimWolla Done and done, thanks!
 
@IluTov Now that GitHub's working again: Are you qualified to review this github.com/php/php-src/pull/7921? You previously commented on it and I've like to get this across the finish line.
For me as a newbie in Internals it's hard to tell who can do what and when to ping where.
 
@TimWolla I can look at it later tonight or tomorrow at the latest.
I've just stopped working and I need a break.
 
When Nikita was working full time it was somewhat easy to know who to ping
 
@IluTov Yeah, that's fine. As long as it's on your / someones radar.
 
8:18 PM
OMG, I think we should propose random upper/lower case single letters of header names. At least that way there would be no complaints about inconsistent capitalization. PHP is consistently inconsistent and this is set in stone for a long time now.
cOnTEnt-tYpe: application/json
ContENT-TYPE: application/json
 
That also serves as a good fuzzing test for consumers :-)
 
each time different, so no consumer may rely on capitalization anymore :D pure evil I know
 
You're joking, but that would actually be a good thing if that would've happened since D1.
 
At least PHP could hold the gem of being consistently inconsistent by not sticking to any known capitalization conventions :D
 
never knew consistently inconsistent was something good
 
8:22 PM
And actually force downstream consumers to read the RFC instead of making assumptions. I'm pretty involved in HAProxy and recent HAProxy versions simply downcase all header for consistency with HTTP/2. Unfortunately that actually broke clients, so now there's option h1-case-adjust-bogus-client that allows you to override the casing of specific headers with a casing of your choice.
 
8:38 PM
@SaifEddinGmati LOL... you post this? i.redd.it/m884jv7l8kn81.png
 
no lol
i remember seeing it in twitter
 
By the way, I have heard that PHP functions are case-insensitive because HTML tags are so, but then why are variables case-sensitive?
Is it because attribute values are case-sensitive in HTML, and in PHP the contents of form requests used to be automatically expanded into variables?
 
8:56 PM
@TimWolla We had a similar situation with Amp. We used to lowercase all the headers in the HTTP server and client packages until we got reports that some servers would reject certain headers if not cased "correctly."
 
@Trowski Servers even? I'd understand client, because there's so much outdated stuff out there. But for servers I would've assumed that the vast majority converged to a few well-written implementations.
Or rather not "outdated", because case-insensitivity is in the spec since always. Let's say "toy implementations".
 
It really hurts to see that additional code needs to be added to support that :-(
And I'm not sure if it's making it better that apparently Apple is getting it wrong.
 
I think that may be a coincidence of the example. I doubt Apple is getting that wrong.
Oh, he did say it's specifically Apple. WTF…
I suppose, leave it to Apple to implement something outside of spec…
 
On the email end we had Plesk support tell a customer of our software that we were doing email wrong, because the from: header needed to read From:.
We eventually "fixed" that to capitalize each word in the header name, because I also was concerned about spam filters finding lowercase headers "odd" and rejecting the emails for bogus reasons.
 
9:21 PM
.... ugh. I just cut myself on the edge where stderr is closed before extensions' mshutdown trigger, at least for PHP CLI. Grr...
 
 
2 hours later…
10:55 PM
@IluTov another choice would be to possibly outright break the existing ${} style interpolation and use it for arbitrary interpolation. I.e. change the meaning of ${foo} from accessing variable $foo to fecthing constant foo. While this is an definite BC break, a) there's always an alternative form you can transform it into (i.e. {$foo}), which works on all versions, b) ${1 + $foo} looks much nicer than inserting a colon there, c) it's trivially detectable using static analysis to fix
and d) it almost certainly will spew useful errors after the upgrade
Doing the proposed {$:} starts to feel syntax-soup-y to me, and I'm not sure whether I shall support that.
Like ... {$:$foo + 1} ... wtf?
 
@SaifEddinGmati .... you can do that outside a string and use <? ?> as context switchers...
 
Then the comments with be written to STDOUT
:p
 
11:11 PM
/me opens /dev/null below @Saif feet
 
but then your print statement will not be printed to STDOUT ;)
programming inside a string is the new meta.
 
I finally got the PHP 8 elephant.
 
@SalOrozco congratulations!
 
@SaifEddinGmati ... I'll go back to reading up about the exact semantics of __attribute__ in C...
 
@brzuchal something something referer
 
11:21 PM
huh, just noticed PHP doesn't have file attributes.
what i mean by file attributes: 3v4l.org/JUcCe
 
@ramsey Still no announcement?
 
@SaifEddinGmati why would it have them, attributes only got introduced in 8.0 and we didn't add built-in ones at all x)
 
No, i mean you can't place attributes that are not related to a symbol in PHP, i thought that was possible
 
I don't get it then, you just want a docstring?
 
this is way i thought it was a thing in PHP 😓 : docs.hhvm.com/hack/reference/class/ReflectionFile, but i was just confusing the two, i have used them before in Hack.
 
11:29 PM
Or more I don't get what's the point of such an attribute
 
the example i linked, you can have them hold metadata about the file itself, and it's content.
 
:thinking:
Maybe it's just that I don't grok attributes, but why would you want to use an attribute instead of a docstring for that?
 
easier to parse/read for a testing framework for example.
same reason we introduced attributes in the first place :p
i don't actually have a use case for them right now, i was just messing around :p
 
Yeah no, still don't get it, but then again I don't understand attributes in general
 
@bwoebi Sure, I've thought about that. But 1. This would have to wait at least for PHP 9 2. Even then making valid syntax mean something else seems very controversial.
 

« first day (4170 days earlier)      last day (778 days later) »