« first day (3699 days earlier)      last day (1233 days later) » 
00:00 - 19:0019:00 - 00:00

12:01 AM
github.com/php/doc-base/pull/5 eeee, we're so close...
 
12:30 AM
uhm, just to make sure, I'll ask... you don't need to recompile the source at all (if you didn't make a change that is) when you just want to try out your .phpt, right? you just run php run-tests.php
pretty sure that's right, but it's also 3:30am, so :-P
 
cmb
yes (you need to set some env variables manually, in this case)
 
@cmb is that documented somewhere? I don't remember anything about env variables
 
I am wondering why when I inner joining some views I get some repeated records without using group by
 
do you mean the --INI-- section perhaps?
 
any idea
 
12:36 AM
oh, maybe you're talking about TEST_PHP_EXECUTABLE et al
 
cmb
you need to set TEST_PHP_EXECUTABLE at least, but run-tests.php should remind you of that, I think
 
cool, thank you! I'll try it out and see where that takes me :-)
btw, this PR might be ready, or not, depending on my last commit being acceptable
 
SELECT v_moca.Paying_Date,v_moca.Transaction_Id, v_moca.Student_Name,v_moca.Room_Name,v_moca.Level_Name,v_moca.Student_Id,v_moca.Amount, v_moca.Amount_Written,installments.Installment_Name,v_maradona.Installment_amount_num,v_maradona.remaining,v_maradona.Last_Date from v_moca inner join v_maradona ON v_moca.Student_Id=v_maradona.Student_Id inner join installments ON v_maradona.Installement_Id = installments.Installement_Id
this is my query
 
Wes
1:06 AM
start by formatting properly, then use SELECT * FROM
there is no significant gain in select only the fields you need
 
ok
 
Wes
i'm not being a dick, it's just that making code more readable actually helps
the formatting goes usually like this:
SELECT
    *
FROM
    table...
JOIN
    foobar ON ...
LEFT JOIN
    baz ON
 
clear
 
@Wes a single statement per block ^^
 
SELECT v_moca.paying_date,
       v_moca.transaction_id,
       v_moca.student_name,
       v_moca.room_name,
       v_moca.level_name,
       v_moca.student_id,
       v_moca.amount,
       v_moca.amount_written,
       installments.installment_name,
       v_maradona.installment_amount_num,
       v_maradona.remaining,
       v_maradona.last_date
FROM   v_moca
       INNER JOIN v_maradona
               ON v_moca.student_id = v_maradona.student_id
       INNER JOIN installments
               ON v_maradona.installement_id = installments.installement_id
 
1:29 AM
table aliases ftw.
what is your question @PHPFan ?
 
55 mins ago, by PHPFan
I am wondering why when I inner joining some views I get some repeated records without using group by
 
yeah
@Tiffany
@Tiffany Sorry I am wondering why when I inner join some views I get some repeated records if I don't use group by?
 
please don't ping me, I don't know, and I'm too tired to try to understand
 
ok
 
1:45 AM
@Crell bought your book because of the discount, and I love the surprise of learning that mathematics has far from a consistent terminology
Because even "basic" things will have slightly different definitions depending on the author lol
 
2:12 AM
@Girgias US English versus UK English?
 
@Tiffany Not at all, for example some author will define a Ring as an Additive Group with a commutative multiplication operation, others will define it with a non commutative multiplication operation
So you then get the fun thing where "Commutative Ring" might or might not be nonsense
 
Ahh, thought you were going to make a jab at math versus maths :P no matter how many Britishisms I pick up, that's one my brain cannot
 
Nah :p
I mean the definition of what Natural Numbers are is already contentious
Does one include 0 or not?
 
I need to find the enjoyment in math again. Depending on how it's taught, it's either a subject I immensely enjoy and I'm endlessly fascinated by, or I feel like a cavewoman going "wat, brain no work"
 
I feel you lol
 
2:20 AM
When you have time, could you have a look at my PR to doc-en? It requires another PR I made to doc-base though.
 
Wes
@PeeHaa i think trowski tried to tell me to use asyncCall, but i couldn't understand it
still can't
it just... rethrows?
whatever that means :B
 
@Tiffany The oop5 one? Had a brief look through the email, sadly more files than I wished are affected :(
 
@Girgias is it something I should revise? Or just something that makes it harder for translators? :/
 
@Tiffany Well makes it a bit harder for us, but not much you can really do about if it's linked from that many places
 
I shouldn't say "just" cause it's not "just"...
 
2:23 AM
Tbh I prefer a patch like that which is rather straight forward for me with French because it's mostly up to date
And I can apply the diff onto SVN and look through all the files affected
Could even do a global search and replace for .oop5. to .oop.
 
FWIW, the change wasn't too hard, I did find "language.oop5" and replace "language.oop" in PhpStorm and replaced one-by-one, scanning to make sure It was something that should be changed
 
Well I imagine, it just the bloody revision tag
I really need to think about that more
 
Ah :( yeah
 
It mostly didn't bother me, but what vrana did and the following revert basically made me think about that again
 
I also learned how to use local gitignore, which is something I actually need for my job cause I kept committing .gitignore files with .idea/ 😅
No one has corrected me yet 😅
 
2:27 AM
Because if one figures out a way to ignore typos from EN and whitespace changes it would by extension allow us to revert changes without translations needing to be updated
Ouch
Well brain can't think cause vibing to:
https://youtu.be/6C5RYMyxEhE?t=151
 
Lolol
This has been stuck in my head like the past four days youtu.be/Ix2H5te3eeM
Those guitar riffs are so catchy
 
Bretty Good
 
@Tiffany committing those is correct
 
@user3942918 normally, you would be correct, but we're in an intermediary phase where some devs are switching to PhpStorm and I was instructed to add .idea/ to local gitignore specifically. But I did it wrong.
30-day trial is almost over and my manager is going to push for licenses for devs who requested it, so committing the .gitignore with .idea/ will probably move forward... soon...
 
2:44 AM
@Tiffany gratz on getting him to buy PHPStorm licences
 
Next step is getting approval from higher-ups :D fingers crossed it goes through
 
oh
On that note, I'm off playing some Fire Emblem before going to bed...
 
I really, really do not want to go back to Eclipse and its kludgy UI
@Girgias have a good night!
 
@Tiffany Understandable :p
And thanks :D
 
@Tiffany nuuuuuuuuuuuu, fight! sabotage! hell take your manager hostage
okay maybe that's too over the top, but im glad you're at least part of the way to getting the right tools :)
 
2:58 AM
I really wish JetBrains would just scrap all the language-specific apps, say "IDEA is our IDE" and then work out whatever pricing they need to based around which first party language plugins are supported.
well either that, or allow each language-specific IDE to use the other language plugins, so which one you buy is just about which one it defaults to supporting.
having to buy an IDE that's focussed on Java, just so there's semi-OK support for other languages is kinda stupid.
 
@Stephen that's what they originally did, and you could use language-specific plugins to alter the environment, but I like that PhpStorm is geared primarily for PHP dev (and technically JS, HTML/XML, CSS...) plus it's cheaper than IDEA
 
@Tiffany right, but if you want to e.g. support PHP and say Ruby, you can't do it in either PHPStorm or RubyMine. Same for PyCharm. They're prevented from running the other language plugins. That's my beef.
 
I may have misread your message, which is a good indication I need to go to sleep
 
3:13 AM
@PHPFan effect of the basic cross-table join. T1 x T2 (inner|left|right) only reduce, but if there are "duplicates" across the join, you still get them. blog.codinghorror.com/a-visual-explanation-of-sql-joins
@Stephen just buy intelij idea and go for it. it comes with all languages. it perhaps by price is not worth for two languages, but for three certainly.
 
@hakre i do use IDEA. The problem is, while it supports all the language plugins, it very much assumes you're doing Java work. Like a lot.
that's the whole point of what I'm saying.
the only tool that supports all the languages, is still very heavily skewed to a single language.
 
@Stephen yes, it does not have the same workspace concept like Eclipse. But then. You may get one package where you have all the flavoured IDEs. Have you tried to contact support?
 
@hakre ... I dont know what you're talking about with eclipse, I think I opened it once as a student... 20 years ago in a 'into to java' class.
 
I think they market it under the Toolbox label.
 
the problem isn't bugs - although there are those
it's just the way it assumes you're working with Java - the same way phpstorm assumes you're working with php.
and yes I know there is a licence package that includes them all
but thats stupid
 
3:22 AM
Yeah, just open by name and have it pre-configured. The package is IDEA Ultimate or something.
 
I HAVE IDEA ULTIMATE PLEASE STOP TELLING ME TO BUY IT
forget it.
 
urgs.
 
you're not reading what im writing so just please stop responding to me.
 
you're really pushy.
 
thank shit this thing has ignore.
 
 
3 hours later…
5:58 AM
10
Q: How to remove index.php in codeigniter on Windows Server and IIS?

ianHow to remove index.php in codeigniter on Windows Server and IIS? I found this when i search for answer How to rewrite the index.php of Codeigniter on Windows Azure but when i try my CI still need index.php to run whre the web.config file must be add and is there any other step before i ed...

I am using this answer but my js and css files are not loading now.... Any help plz
 
6:34 AM
PHP.net website currently returning "502 - Bad Gateway" (from CDN) ・ Website problem ・ #80448
 
7:07 AM
morning
 
7:19 AM
morning
 
7:46 AM
morns
 
7:59 AM
Morning :)
 
8:32 AM
setcookie doc improvement ・ HTTP related ・ #80449
 
9:04 AM
hi. I'm using api platform and have set up functional tests. now I want to run a separate test DB to not always have my local db reset. are there best practices on how to configure that? create multiple pgsql schemas and somehow configure one for testing? have another db container in docker-compose for testing?
 
@PhilippeGerber I don't think there are best practices for this.....it's tradeoffs all the way down. What I like doing is having my DB be fully re-createable from scratch, so when I bring up a dev set of containers, one of the things that happens is that the DB is created and seeded with a small set of data.
That's not always possible though....some people create snapshots from their live DB with appropriate amounts of data deleted, and use for testing...
"now I want to run a separate test DB to not always have my local db reset." - out of curiosity, why do you say you want that?
 
I guess it's exactly because of what you just mentioned. I usually have a partial live DB in use locally for development, analysis, etc., but for testing I use a DB seeded from fixtures. I'd like to run tests without having to import the partial live dump again.

I've solved this issue by having different databases in other applications, but was wondering if there are best practices in the Symfony/API platform ecosystem.
 
"I'd like to run tests without having to import the partial live dump again." - why do you feel you have to do the import again?
 
Tests currently reset the database and import the test fixtures.
 
Ah, k. I normally write my tests to create the test fixtures as part of the test suite. e.g. If I needed product to exist in the DB, so that the test for fetching product by ID could run, I'd create that product as part of the setup for that test.
Yeah, it results in quite a bit of redundant data in the DB, but that's not really a problem.
 
9:22 AM
Morning!
 
@GabrielCaruso Mrning.
 
I'm looking for PHP's 8.0 release schedule for the following patch versions. Does that exist?
 
I think I'll look into using different postgres schemas. this way I won't have to run multiple database containers. if I can figure out a way to automate the creation of the schema I'd just have to run SET search_path = tests; in the bootstrapping of the tests and all queries should go to that schema instead of the default one.
 
@PhilippeGerber imo, the thing to be optimising for is developer time, over a reasonable length of time....although setting this stuff up is time consuming, not having people wait for tests, will add up over the next couple of years...so as long as whatever you choose works reasonably well, then that's 'best practice' for you.
 
true. thanks for your input!
 
9:47 AM
it's shocking how many people apparently use Docker without having the slightest clue how it works or what it's doing.
the number of posts I've seen today (because of an AWS announcement about Mac dedicated EC2 option, and a Linux kernel hacker starting a Patreon to fund development of M1 support in Linux) talking about Docker and macOS as if they can coexist without virtual machines is ridiculous.
 
thats what abstraction layers are for, abstract away any knowledge you need (also, any security implications or consequences)
also.. docker:php 8.0.0 images seem to be out.. wohooo
 
@makadev I can't tell if you're being sarcastic or not.
 
I'd like to think I'm sarcastic, but probably am both.. unintentionally.
 
10:03 AM
@Stephen is it really so shocking?
 
10:15 AM
 
10:33 AM
Btw. is there any reason to prefer docker images with php on alpine versus php on debian, except image size?
 
@makadev Masochistic tendencies, maybe?
 
@makadev That's for people who don't have enough problems to deal with.
 
lol
ok
 
10:57 AM
JIT config in PHP-FPM ・ *Configuration Issues ・ #80450
translation error ・ Translation problem ・ #80451
 
11:10 AM
@FlorianMargaine the equivalent to what I've read today would be "developers" who expect the JVM to run php code. so yes, it is quite shocking.
or ruby to run python code. or what have you.
 
well I guess that sounds about as well planned as docker.
> We don’t plan to implement the zend runtime libraries (e.g. Curl, PRCE, etc.) for JPHP.
 
so you get the weird-because-BC standard library of php, with none of the runtime libraries.
sounds fantastic.
 
Null Coalesce Operator Swallow warning error ・ *General Issues ・ #80452
 
11:20 AM
Hello :)
 
11:53 AM
ehmagawd the docker images finally landed \o/
 
12:17 PM
Documentation example error ・ Documentation problem ・ #80453
 
@cmb i feel a bit lot on docs procedure for the attributes PR, would i add the reflection changes to my PR as well, how would this get merged and such, do you have some guideance? (i believe you are the person to ask, but redirect if necessary)
 
cmb
@beberlei I suggest to keep individual PRs as simple as possible; the reflection changes could be provided as separate PR; my reasoning: better to have of it documented ASAP, then having to wait for full-fledged docs for weeks or months :)
 
@cmb yeah i agree. I feel i have documented the most important parts of the Reflection API in the "refenrece" part of the docs. That should be enough to use it
 
cmb
on a very quick look, github.com/php/doc-en/pull/254 looks good; I'll try to do a thorough review this evening
 
Morning @Stephen
 
12:23 PM
not here it isn't :P
 
Oh no. Whats going on?
@Stephen weather or IT issues?
 
@cmb thank you in advance for reviewing :)
 
@JukEboX neither it's just not morning.
 
@Stephen Ohhh ok. So continue from yesterday so I had the LDAP connection working and then we implemented a stronger connection to the A/D so now I am guessing I need to use a stronger connnection per the error. I am guessing LDAPS'
 
12:32 PM
Did you see the link I sent you?
 
@Tiffany yes I just sat down. Trying to catch up. bare with me :P
 
12:53 PM
@JukEboX if the warning about the connection security is gone I’d suggest you’ve satisfied it. I left a comment on the answer after you said it errors, did you read it?
Essentially what are you using in the first argument to bind()
 
@Tiffany the link assumes we are using OpenSSL yes? Per step 1? Because OpenSSL does not come with XAMPP as I know.
@Stephen yes I did. I am going through @Tiffany link first.
 
What’s the link?
 
1:08 PM
... if you're able to connect, and startTLS ok, I dont think you need to do any of that, because it sounds like the machine already has the cert for the AD CA
 
@JukEboX to be clear, are you using xampp as a development environment?
Also just another reason why not to use xampp... less control over what you're able to do...
 
@Tiffany yes.
@Stephen I haven't tried the startTLS yet
@Tiffany plus I have tried running my own apache instance in the past without success so XAMPP is helpful
 
Nginx is nice
 
@JukEboX ... huh? you commented on the answer I posted for you, and said you were now getting a different error.
 
But, FWIW, for personal projects, I load up a Linux VM in virtualbox. Others use docker.
 
1:14 PM
@Tiffany don't have linux here and a lot harder to spin that stuff up here.
 
@JukEboX that's why I use virtualbox ;) my home desktop is Windows 10.
If you have somewhere between 8 and 16 GB of RAM, a VM doesn't require much for a dev environment
But, you do you... I won't be able to offer any help from this point on
 
o/
wsl2 is surprisingly good these days too
 
@Tiffany much apprecitaed. If I were home I would but work environment is completely different
 
Highly recommend WSL2, so long as you mount most your projects on the WSL2 filesystem otherwise it's painfully slow
 
@Danack I can get behind it because it starts out as "UG" which is a sound I can relate to.
 
1:55 PM
@Stephen checking yoru answer. I am getting "Cannot start TLS". Should I export the CA Cert and point to it using the Option?
 
yes.
 
The one on the server that is running XAMPP or the one one from the CA DC?
 
... you need the CA Cert that signed the certificate the AD DC is using
as opposed to the ACDC, which uses a guitar.
 
@Stephen exportinig the CA cert need to be DER or Base-64 ?
 
you need it as a PEM format, so base64 encoded
 
2:02 PM
Ok I will try and import it into the local store after I piont it to make sure it works
@Stephen when you export from the certificate manager it comes out as a .cer
 
user14596741
guys can we build a website like linkedin, facebook , youtube,
But not using javascript at clientside.
2
 
@Derick thank you for the stickers :D
 
Type mismatch error ・ *Programming Data Structures ・ #80454
 
@JukEboX that's fine, the pem/cer extensions are interchangeable
 
@Stephen sent you a PM :)
 
2:08 PM
@edward who is we. do you mean can it be done technically? Sure. Are you asking those in the room to do it? No.
 
2:18 PM
@Girgias Ha! Yeah, that was one of the most frustrating things in my research for it. "Wait, you mean not only can programmers not agree on naming things, but the vaunted mathematics fails at it, too? No WONDER the tutorials all suck! They're teaching Haskell, not math."
 
@Wes Ping me tonight and I can write a stupid simple example for you :)
Need to do some work first :(
 
@Tiffany That's me as well. Finally getting into category theory was an experience of "OK, that makes sense. OK. OK. I'm still with you. Wait, where'd that come from? Wait, that doesn't... how are you... but that... WHAT ARE YOU EVEN SAYING???"
 
2:34 PM
@Stephen really? you aren't interested in getting in at ground level on such an original, modern and obviously practical idea?
 
@Stephen I have no idea about Docker and I only use it with GitLab CI, so I let someone else do the heavy lifting and I just use an image :|
@Crell Basically, also Category theory is rather recent, really should look into it some friends shared some books and one is publishing his study notes
 
Well, "fairly recent" as in the 1980s...
 
not only was @Girgias not alive in the 1980s, I presume he was not alive in the 1990s either
god that's depressing
 
@DaveRandom Technically I was in the 90s, born in 98
 
well at least that's something
 
2:49 PM
I had no idea you were that fresh. :-)
 
@Crell You know we consider Galois theory recent mathematics and that is from the 19th century lol
 
@edward Yes, just use PHP on client-side as well :P
 
we have not yet reached the point where I know people who are cleverer than me who were born after 2000, though it can't be far off now
 
soon
 
@Girgias you are the same age as me :D
 
2:51 PM
god damn it
grow older, the pair of you
thanks
 
Well we do every second :p
 
How would one perform reversed in-order search in AVL tree?
 
Nov 26 '12 at 0:07, by DaveRandom
Damn kids with their logic.
 
Sorry not sorry :p
 
you were like 14 when I wrote that
 
2:54 PM
I was indeed
 
and now you're even older
 
well, I'm just off to throw myself in the canal, laterz
 
ciao
 
Okay have fun, just be back for dinner
 
:-P
 
2:57 PM
You're older than you've ever been and now you're even older. And now you're even older. And now you're even older. </TMBG>
 
Nginx 404 on manual page ・ Website problem ・ #80455
 
@eminem feel free to continue to ask about AVL trees, but at the same time....you're aware this room is mostly PHP developers, right?
 
Yea, but no room for Data structure, so...
 
cmb
@girgias, the new IMAP test fails on 8.0 because the test helpers are not in the setup folder (only in master)
 
Oh that makes sense
 
3:00 PM
@DaveRandom I assume we are to you what you are to @Danack :P
 
I was trying to figure it out
Wonder if I should cherry pick that commit into PHP 8.0 branch...
 
cmb
not 100% sure; maybe do a PR?
 
Yeah will do
Would make it easier as I need to backport some changes due to me introducing another regression so having different test setups is kinda annoying
 
cmb
3:13 PM
anybody ideas what happened to the php5 doc archives: doc.php.net/archives
 
php-8: undefined function openssl_cipher_iv_length ・ *General Issues ・ #80456
 
@eminem do you live in a country that blocks wikipedia?
just out of curiousity, since the anwser is totally on wikipedia
 
@mega6382 yes, you are all neophytes in my eyes.
 
I am reading this but I fail to see the benefit of it. wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg
Why would we want to disallow this?
 
@Dharman other than fewer silent errors?
 
3:26 PM
I don't think it does cause any silent errors
Maybe I am missing a more concrete example.
 
str_contains("foobar", null);
 
false
 
that code looks valid to you?
 
yes
 
well, we disagree then.
 
3:28 PM
:)
 
stream_get_contents() fails with maxlength=-1 or default ・ Filesystem function related ・ #80457
 
What would be a valid reason to pass null as an argument to a standard function? Only when a default value is specified?
why can't the function str_contains default the last parameter to an empty string and we document that?
 
@Dharman I don't understand either question there. The RFC is for when users are passing null to an internal function that silently converts it to the appropriate type, rather than generating an error. e.g. echo strlen(null);
 
@Dharman Consistency between internal and userland functions
@Dharman That is the case, thus the point of deprecating implicit type coercion for null for internal functions
 
nullability depending on the strict_types setting is weird is the point I think
 
3:33 PM
tbf it wasn't just nullability prior to PHP 8.0 which depending on strict_types
 
Ok, I'll dig through my projects and see in how many places I rely on this behaviour. Maybe then I'll understand it.
 
3:58 PM
@Tiffany They stopped making the one with chocolate chips. I've drank expired ones because they didn't sell, so I'm not surprised.
The chips sounded good, but weren't good in practice.
 
@DaveRandom no.
@Girgias right but you aren't then making claims as if you understand the technology
 
Oh not at all
 
right
 
I've got 0 understanding about it, and I probably should learn it but cannot be bothered
 
4:37 PM
@Tiffany You're welcome :-)
 
Incident on 2020-12-01 16:40 UTC ・ GitHub Pages has Partial Outage
 
Is it an oversight that php.ini-* does not have any of the opcache/jit settings commented or defaults picked?
 
cmb
likely
 
4:52 PM
Typing "JIT" in the search box on php.net doesn't do anything either
 
cmb
never really understood how that search box works exactly, but we should set up direct URL support at least for the most relevant JIT settings
 
I expected php.net/jit to show me a page that explains how to enable and set it up.
 
cmb
could probably set up something here; or have a fake doc page
 
5:27 PM
@cmb Someone broke the soft link between /local/Web/sites/doc.php.net (apache document root) and /local/src/docweb (the regularly rsynced copy of doc web), so the former wasn't being updated.
Anyway, it should be fixed now.
 
cmb
@salathe thanks for restoring! :) Do you have any idea, whether that happened due to some automation?
 
So back to not being here. ;)
 
@Girgias hm, i used the generator docs as an example and they use "you" as well ;)
 
@cmb Unlikely, probably human error at some point (e.g. when we recreated/restored the machine a while ago).
 
@salathe hi salathe! Bye salathe!
 
cmb
5:31 PM
okay, we can't prevent manual mistakes, so fine. And of course, wish you all the best. :)
 
I hope you're doing well :)
 
@beberlei Something something mistakes were made, the style guide does explicitly mention this: doc.php.net/tutorial/style.php but teh generator should probably be fixed then...
 
cmb
Ah, wiki.php.net/systems/php-web2 lists people with access to the machine. So I'll write to ??? next time. ;)
 
@beberlei one of my first major doc contributions addressed the audience a few times and I had to go back and formalize the wording
 
cmb
5:35 PM
ta!
@Tiffany that is because there is no audience; nobody is supposed to RTFM :p
 
We don't need no stinkin' docs
 
i reworked the chapter to not use "you" anymore ;)
 
no no no, rework them to all use "you" - make it a choose-your-own-adventure book
 
that would give "go update to PHP 8" a new meaning
 
cmb
5:55 PM
that page is an exception[TM]
 
Can it be caught?
 
@user3942918 We need to introduce a talent tree in the language … where you need to unlock functions - where each function has specific requirements - and the number of functions possible to unlock is limited.
 
@bwoebi have you started playing WoW again? :P
 
cmb
"The PHP 8 is terrible, are we sure we're OK with it?" ;)
 
@Tiffany lol, but wasn't thinking about that :-D
@Tiffany also why again? Have I ever mentioned that I had been playing it?
 
6:13 PM
Bruh internals, wonder how to reply to that thread again
 
@Girgias i'm right here if you want to talk about it
 
cmb
"okay, lets change the behavior of is_dir() and is_file() back; and while we're at it, we should also change is_writeable() and is_readable(); now there is no reason to also change file_get_contents(), fopen() etc., so we can drop ValueError. But we should remove TypeError as well – hey, we're back at PHP 7.4.0!"
 
I don't even think it should be changed back - it shouldn't warn either
 
cmb
that was ironic; I wonder where these NUL bytes even come from
 
the world's an imperfect place, bits fall off bytes all the time
 
6:20 PM
that's surely not the reason :-)
the primary issue is that a lot of these error changes made code throw which previously had just the desired result and could safely terminate
 
@bwoebi Does changes were going to be TypeErrors initially because of the ZPP consistent TypeError RFC
 
hm tricky, it is an is_* function, returning false is sort of the idea whatever you throw at it or not?
ah it threw a warning before because of tha tnull byte, intresting. i didnt know about hte distinction of path vs string.
 
Like I said, I don't care, I just don't get why it's an issue now, people should have been complanning about that like 8 years ago
 
cmb
and it returned NULL
 
@Girgias yeah I know … it's just the whole thing, I'm really fixing issues every day thanks to int string issues being un-silenceable now :-/
 
6:32 PM
@bwoebi I mean that's my fault, and maybe if we would have made that change earlier (instead of days before feature freeze) this could have been made less painful
Sadly Andrea told me she'll look into it again before telling me she didn't have time :(
 
@Girgias I wished I could just "log and continue"
 
Which I get tbh, those ones got changed the last under time constraint because I've been pointed out the inconsistency with other parts of the proposal, so I just made it throw because it needed the least changes
 
IMO still need a shorthand for try / catch with a default value
 
@Girgias null is falsey, userland code still behaved as expected. I don't get why you're arguing about this.
 
Buenos Tardes!
 
6:42 PM
hell it could have been throwing this entire time and it'd still be right to fix it now
 
@user3942918 Null might be falsey but has very different semantics (look at userland/internal function handling of nullability), so I'm arguing that it not returning a bool is still rather unexpected and could lead to other bugs.
@user3942918 Sure, but that's something which people should have been complanning years ago
@MarkR Tbh I need to look back at making @ do that so that we can move fopen and co from warnings to exceptions
 
@Girgias cool, so like I said - I don't even think it should be changed back. Take the opportunity to give it sane obvious behavior that makes it more difficult for a developer to misuse. The timing of it is completely irrelevant. The best time to plant a tree was 20 years ago, the second best time is today and all that.
 
@Girgias $expr @ $default
 
I was thinking something more kinda like match where it was possible to assign a value to it.

$x = attempt fopen('badfile.txt', 'r') else 0;
 
@user3942918 Thing is this might need an RFC, so this wouldn't be changed before 8.1, or we just go ahead and that needs RM approval and we could still miss some functions making it inconsistent
 
6:49 PM
Would be nice if it could shorthand match against types:

$x = attempt fopen('badfile.txt', 'r'), FileNotFound => 0;

FileNotFound exception gets caught and converted to a value of 0, everything else throws. I think that option would be superior because of potentially unexpected throws in the expression itself i.e. an exception in a function call in a parameter
 
There is a process to change stuff, you can't just go willy nilly, so if people would have, I dunno complained like 8 months ago, we could have done that probably without issues, but we just released a GA, sure we could change it in 8.0.1, but that has a bunch of other implications
@MarkR That would be idea, but it would allow seemless upgrades :-/
That's why I want to hack around it by extending the capabilities of @
 
@Girgias which rfc changed them to valueerrors?
 
@user3942918 They were TypeErrors until like August because it's a ZPP change made by wiki.php.net/rfc/consistent_type_errors
 
In a chunk of the test cases I wrote in 8.0 I had a function that called the function and returned it, using short closures to make it more readable:

$x = tryCatch(fn() => fopen('badfile.txt', 'r'));

Could potentially be added as a built-in function, but IMHO long term a language construct would be better
 
@Girgias i don't see any mention of null bytes in there
 
6:54 PM
@user3942918 It's irrelevant that there is a no mention of null bytes, path handling was done by ZPP (Zend Parse Parameters) which would warn and return null on type errors in weak mode, this is what has been changed to throw always TypeErrors
 
@MarkR To do what? I can't tell what the intended behavior is
 
function tryCatch(callable $test) {
try { return $test(); }
catch (Throwable $e) { /* some testcase logging, but could potentially have a different return value */ */
}
 
@user3942918 it used to at the end but the end got stripped off because of the null bytes
 
@Crell It saves a metric ton of boilerplate - github.com/php/php-src/blob/master/ext/gd/tests/…
 
@Girgias don't you think that if this were mention in the BC section it'd have received some push-back then? "A TypeError will be thrown instead of a warning if incorrectly typed parameters are passed to a function, which is a backwards incompatible change." is pretty weak considering is_file et al claim to accept strings rather than internal-type-only "paths"
 
6:59 PM
@MarkR It's the contents of the catch that get tricky. :-)
 
@user3942918 Nope, because people using strict_types already hit this behaviour
This was just about making coercive and strict mode consistent
 
cmb
is_file() "never" accepted NUL bytes; it returned NULL in that case, because
 
and people not using it didn't. it's optional remember?
 
cmb
> If the parameters given to a function are not what it expects, such as passing an array where a string is expected, the return value of the function is undefined. In this case it will likely return NULL but this is just a convention, and cannot be relied upon.
 
00:00 - 19:0019:00 - 00:00

« first day (3699 days earlier)      last day (1233 days later) »