« first day (3735 days earlier)      last day (1213 days later) » 

12:10 AM
Was that even a combo?
 
implements ICombo
 
I've almost forgotten interfaces exist
Worked with so much code that uses abstract classes and traits.......................
Mostly abstract classes
 
Curl fail with specific url and post ・ cURL related ・ #80595
 
1:02 AM
^ @cmb is that not more about server behaviour than PHP? also, does PHP actually control that? is it not just what curl decided to do?
 
 
1 hour later…
2:12 AM
PGSQL is an utter mess as an extension wth
 
Even compared to the others?
 
2:32 AM
Yeah, all functions are basically overloaded
 
 
4 hours later…
6:04 AM
Hi, I had this problem of frequent caching (as I might understood) of files in my website. Since the old CSS and JS files were there even after updating them. So I referred this answer, stackoverflow.com/a/2068407/13833218. Is this a safe approach in regarding performance? I mean my doubt is that bootstrap is best recommended to be used via cdn for better performance due to caching of files as I remember. Will this imapct the loading mobile phones?
 
Wes
6:57 AM
have you ever seen an API with a typo folks?
like a method name with a typo. first time ever for me. it's not the documentation, it's the actual API, and it's an API from google. it's amazing
in fact they even went ahead and made it "standard" and firefox had to copy the typo
it's absolutely hilarious
how much you don't have to give a damn not to bother to fix 1 letter
 
7:50 AM
morns
 
mornings
 
Wes
\o
 
8:21 AM
@wes happens to me all the time. We have a bunch of variants of the word occurrence in our api sadly
 
mornings
 
Wes
8:32 AM
@beberlei when i was doing graphics stuff at my previous job we had this little game consisting in finding paper products of competitors like flyers and leaflets with typos in them. considering that flyers have like 30 words tops, we found extremely funny to find typos in them. our best find was some dude that had to pay 5000 business cards all with a typo
another hilarious one was a calendar with wrong months length, like some months had 30 days rather than 31
 
Wes
8:53 AM
can phpstorm reorder methods alphabetically? and maybe keep constructor on top, and something like that?
 
@cmb Looks like a skipif is missing in the requires_hash test: dev.azure.com/phpazuredevops/PHP/_build/…
 
 
1 hour later…
10:11 AM
Hi all, and Happy New year!
 
Happy new year :D
 
@NikiC I saw a question about libmysqlclient (twitter), IMHO, better to drop its support, License is incompatible and should not be used anymore by anybody (was used in the past in Linux distro thanks to FOSS exception on GPL for libmysqlclient). Especially as not really maintained.
(similar issue with libreadline vs libedit)
 
10:39 AM
Hey folks. Are there possibilities to edit some of the comments of the documentation? I find some really outdated and dangerous infos in there that perhaps should be removed or at least altered or set into context...
 
@heiglandreas master.php.net/login.php and then you should be able to delete and edit notes
(And yes, the "secure connection failed" warning is ... totally normal ... it's php)
 
Ha. Awesome! Thanks for the insight :-)
 
@NikiC Can I tie you down to chat about serializable and globals for the podcast?
@Trowski Can I interest you (or @kelunik) for a chat about Fibers for the podcast?
@MateKocsis And thirdly, would you like to chat with me about the wall-clock time RFC?
@Crell And how did I forget about Enums? Would you want to chat about that?
 
11:44 AM
@NikiC am I doing something wrong or for changing the HashMap from char* to zend_string* I need to go through each PDO Statement Driver implementation? As they reference bound_param_map a bunch of times
 
Is this sentence meaningful?
> Interested in working accorse.
 
No
across ?
 
well, I meant "out of Iran (out of my country)"
 
Hello people, hope you are all well. I'm trying to extract some query data from a string: "PhalconRest\\Models\\Subjects.location IN ('pool', 'box', 'alt') OR PhalconRest\\Models\\Subjects.location IS NULL" I need to pull out the classname and the condition in this case IN (..), OR, IS NULL. I tried to explode by " " and "." but that's very messy and didn't work. any suggestions?
 
"across" doesn't mean so?
 
11:52 AM
Can you make a full sentence?
oh, maybe abroad ?
 
oh yes exactly .. I was looking for "abroad"
Interested in working abroad.
is this right?
 
sounds right to me
 
thanks
 
@Shafizadeh yes
 
@Shafizadeh yes
 
11:58 AM
thanks guys
 
@Wes This is actually how it should work.
\o
 
@Girgias It looks like only pgsql directly uses it
Feel free to leave the bound_param_map part out though
 
12:17 PM
Invalid union type TypeError in anonymous classes ・ Scripting Engine problem ・ #80596
 
@NikiC Well turns out I didn't test just dropping the freeq, and part of my issues stem from that
Valgrind is yelling at me with:
==11486== Invalid read of size 4
==11486== at 0x391354: zend_string_release_ex (zend_string.h:320)
==11486== by 0x392D24: pdo_parse_params (pdo_sql_parser.re:416)
==11486== by 0x39AB0B: pgsql_handle_preparer (pgsql_driver.c:269)
==11486== by 0x3820F3: zim_PDO_prepare (pdo_dbh.c:565)
And GDB too:
Program received signal SIGSEGV, Segmentation fault.
0x0000000008289354 in zend_string_release_ex (s=0x0, persistent=false) at /mnt/c/Dev/php-src/Zend/zend_string.h:320
320 if (!ZSTR_IS_INTERNED(s)) {
(gdb) bt
#0 0x0000000008289354 in zend_string_release_ex (s=0x0, persistent=false) at /mnt/c/Dev/php-src/Zend/zend_string.h:320
#1 0x000000000828ad25 in pdo_parse_params (stmt=0x7ffff84851c0, inquery=0x7ffff8403540, outquery=0x7ffffffe9f10)
at ext/pdo/pdo_sql_parser.re:416
Looks like the string gets released somehow before
which is interesting
 
12:38 PM
funzione include e require ・ *General Issues ・ #80597
Instanceof does not evaluate expressions in second operand ・ Compile Failure ・ #80598
 
12:54 PM
@Jeeves I don't understand the reasoning behind this person's justification for "it should just work" ... then remove the parentheses? Am I missing something?
 
Morning
 
1:32 PM
Learned something new, thanks @cmb
 
1:59 PM
does anyone know what I'm missing here? 3v4l.org/fIHXM
must be something stupid, but I guess I'm looking over it
 
Incident on 2021-01-06 14:06 UTC
 
@Derick Yes, I think we're close enough to a final version to do a podcast on enums.
 
2:16 PM
All issues have been resolved!
 
is there a way to see the prepared statement and it's bound values that get send to the server in php just before the execute?
 
2:33 PM
@Naruto You are using public outside of class.
@Naruto Just display them at the time of binding. After all you are in control of these values. Can you be more specific, please?
 
@Naruto Does this answer?
 
@Dharman it's inside a class, I just copied the function alone
thing is: call_user_func_array(array(&$statement, 'bind_param'), makeValuesReferenced($params)); this should work, used in in another project aswell
but for some reason, my query doesn't return any results, when i dump the query and the parameters manually, it works, so I'm just wondering where it might go wrong
 
@Naruto Why are you using call_user_func_array()? That's a very cumbersome way.
Have you got mysqli error reporting enabled? How to get the error message in MySQLi?
 
no clue, prob once found this piece of code and just kept using it, no errors, just no results
 
Also, why are you using mysqli? I assume this is some kind of legacy project, correct?
 
2:47 PM
yes
 
In PDO this could be just 2 lines of code.
 
it's just not making any sense to me atm why this doesn't work
 
I think you might have forgotten to include type string
 
wait a sec, i'll update my fiddle to what it 'working' but not showing result
 
I mean this is difficult to read, but I would advice, remove the call_... function and replace it with this line $stmt->bind_param(str_repeat("s", count($params)), ...$params);
Keep it simple
and of course, if possible try to switch to a database abstraction library. Don't use mysqli on its own. It's not suitable for this.
 
2:50 PM
@Dharman updated: 3v4l.org/5NrFe
 
@Naruto Here, this is what it should look like 3v4l.org/sQPoi
 
well it's not all strings, in this case it is, but this is just the first example, next parameters that are going to be added can be sometihng else than strings
 
Yes, it is
Everything is a string unless you need to cast it explicitly. These are only 0.01% of cases where the type matters. e.g. ORDER BY ?
@Naruto I have always bound everything as string. I never had any major problems.
 
3:13 PM
well what's the point of using diff types then?
 
I always use proper types in my prepared statements. I don't know what @Dharman is talking about. :-)
 
Hi, I'm using preg_replace on a string which contains words in single quotes, the output keeps escaping the single quotes, how can I prevent this from happening? I've tried str_replace and stripslashes, but neither did as expected.
 
Or... actually never mind, the whole point of prepared statements is that it figures out the type. (It's been a while since I was dealing with SQL directly. :-) )
 
@Naruto You use them when you need to. In certain situations you can't bind a string because MySQL will misunderstand it.
So the functionality is there to use it if you need to, but most of the time you don't need it.
 
@KerrialBeckettNewham preg_replace by itself doesn't do any escaping
 
3:20 PM
@NikiC I literally found that out as you replied :) seems it's php storm. Thanks
 
@KerrialBeckettNewham Escaping in what manner? preg_replace doesn't produce any output
 
@Dharman seems php storm is automatically escaping the string, for example like this: ` (\'pool\', \'box\', \'alt\')`
 
@Dharman i see, well, even with your tweaks, I'm still stuck for now, have put it aside for a sec and will take a look at it again later today, it got under my skin that I can't find the problem ^^
 
3:49 PM
@IluTov Thoughts on Nikita's suggestion to replace is_enum with enum_exists(Suit::class) and is_enum_case(mixed)? It makes sense to me.
 
4:10 PM
@Crell Monday recording?
 
@Crell Not too fond of is_enum_case. object_is_enum? Similar to the recently suggested array_is_list.
 
@IluTov Well, that would presume it's passed an object. If it's passed an int or string or something it should return false, not type error. At least I'd imagine so.
@Derick I'm free any US time other than 10:30-11:30 Chicago.
 
@Crell Yes, like array_is_list would throw if you pass a non-array.
 
@IluTov Is that the use case we want though? Not to allow a "is this mixed var an enum case"?
 
@Crell What's that in UTC?
 
4:23 PM
@Derick 4:30-5:30 pm UTC, according to Google. So, we could meet at 3pm UTC / 9 am Chicago? Start the week off that way?
 
@Crell I don't care too much either way. But I can't think of a good name for mixed that makes it clear it doesn't accept the enum name. is_enum_case could also be interpreted as is_enum_case(string $enum, string $caseName)
 
That sounds great, 15:00 UTC/09:00 CST. I'll email
 
@Derick Spiffy. If you are making a google invite, use my gmail account. :-)
 
or even string concatenated with :: for that matter.
 
@Crell Not sure what that is?
 
4:25 PM
@Derick lgarfield at
 
@Crell I mean, I don't do Google Invites as I don't use google calendar
 
@IluTov Hum. What we really need here are actual use cases to solve. I don't know what the usage patterns are going to be on this, really.
@Derick Oh. Well, never mind then. :-)
 
Honestly an interface would solve this in a better way. Then you could even use it as a type hint 🤷🏻‍♂️
 
Can you remove that? It makes me dizzy
 
@IluTov What's the purpose of that function anyway?
 
4:29 PM
1 message moved to Trash can
 
I though I could do that too, but couldn't find the ways to do that?
 
@Derick ^ you can do that as well, if you click "room" at the top right and "move messages"
 
If only we had interfaces we could rely on... ;-)
 
@Crell Don't you?
 
@Derick yeh it's not easy to find
 
4:30 PM
$foo instanceof UnitEnum does seem to serve about the same purpose?
 
ah, ta.
 
@Derick Yeah, moving to trash is preferred. Chat flags are... clunky
 
@NikiC Yes, I was being highly sarcastic.
Though instanceof also presumes the lhs is already an object.
Another argument for the is RFC? :-)
 
@Crell no, an argument to just drop the function and use instanceof :P
 
@NikiC While you're around, can I pick a date/time to chat about the globals and serialize things?
 
4:31 PM
@NikiC Porque no los dos...
 
@NikiC True, at the moment that's enough. If we introduce ADTs that would mean not all objects are UnitEnums as they currently are though.
 
@Machavity oh I forgot you got modified, howdy
 
@DaveRandom Thanks :)
 
@IluTov Would they still implement some interface?
 
@DaveRandom Are gifs against the rule or something? :P
 
4:33 PM
no, just it's not great, esp during day, for people at work
 
@NikiC Can't think of any useful automatic methods on ADTs. So unless we add a marker interface, no.
 
that's why you often see the "dot hack"
 
@DaveRandom It's always "during the day" for somebody in R11 ^^
 
true, but europe/north america working day covers pretty much everyone :-P
what we generally do is this:
so post the image and then edit a dot on the end so it doesn't render as an image
if the conversation is going very fast and it will be pushed off the scrollback quickly it matters less as well
just don't like to leave an endlessly repeating gif stuck on people's screens forever
it would matter much less if you could pause them as well :-/
 
@DaveRandom Makes sense. Will keep that in mind.
 
4:38 PM
Unpausable gifs are the devil.
 
this chat system was written largely by one guy in about 2010 and has barely changed since
SE just don't care about it enough, they see it as a necessary evil I think
 
That applies to so, so much of the Internet's core infrastructure.
 
true, though I'm not sure I would describe this as "core internet infrastructure" :-P
 
@DaveRandom It's essential to the development of PHP, a core internet technology :P
 
cheap european lager is also core internet infrastructure, by that logic
 
4:51 PM
Fact check: True
 
5:46 PM
o/
 
I have been reading about quantum internet. Is that a real thing?
 
Depends what you have read about it.
\o
 
That data would be instant.
 
@SalOrozco You must not have installed PHP 8 yet. New feature. Just call load_real_quantum_internet_processing();
 
lol
 
5:49 PM
Good luck with that.
I mean what, where, how, any details you read.
@Machavity declare(quantum_internet=1);
 
@Tpojka Don't have to be so strict...
 
In PHP7 if you want to invoke it, this is the way.
 
6:29 PM
Hey peoples. I made some examples of what the various immutable options would look like on PSR-7. Before I post it to the list, am I missing anything here? gist.github.com/Crell/2c4c35bbfe3b431b07d09cc730ceb310
 
7:12 PM
Wrong type signature for DOMElement methods ・ DOM XML related ・ #80599
 
@Crell gist.github.com/Crell/… For this one we technically don't need new clone syntax, right? You can just adjust the variable after the clone in the wither method.
 
Yes, it's optional in that case. I included it more to show what the combination looks like.
 
For asymmetric visibility, I'm wondering if we should just go with public $foo { get; private set; } right away, to avoid two syntaxes that do the same thing at a later point in time (get:public set:private or what have you).
Also, Swift already has syntax like this, public private(set), might be worth considering as well.
I think asymmetric visibility should be relatively straight forward, apart from reflection stuff which could be a headache. Like, does isPublic still return true?
 
7:30 PM
The specific syntax is up for debate. It's just a conceptual exploration at the moment.
 
7:48 PM
Trump supporters just breached the Capitol
...
 
wut lol
Actual breached it?
 
so... nuke DC?
seems like an opportune moment
 
Democracy at its finest :D
 
what, on fire?
 
@PeeHaa Yes, actually breached it
 
7:55 PM
DOMChildNode::remove() doesn't work on CharacterData nodes ・ DOM XML related ・ #80600
 
There are armed rioters inside the Capitol building, armed, carrying the battle flag of the Army of Northern Virginia.

We are watching an active coup in progress. We are watching treason.
 
hands up who is even slightly surprised by this
no, no, keep them up I want to count
 
FFI is much slower on PHP 8 than PHP 7.4 ・ *General Issues ・ #80601
 
Well I certainly have nowhere near enough booze for this.
 
8:11 PM
@Danack may need to switch to the harder stuff...
 
@cmb Is it possible that the ext/dom methodsynopses change was not deployed yet? According to bugs.php.net/bug.php?id=80599 , it is. BTW: I build the docs today via phd, and there were a few warnings (I think) which I caused. I'll try to fix them in the not closer future. :)
 
Where I watch for to understand how it's implemented the union-type (php-src). zend_string, class, object, handler they are well documented... also some hint to query search, in source code
 
Wes
\o
 
@BruceStackOverFlow heap.space to navigate code easily
 
8:23 PM
@Derick I'm very sorry, but my dev time is very limited nowadays, and I needed significant amount of time to prepare for even the 1 minute of speech that Sebastian asked for. :( So I appreciate, but can't accept the invitation.
@NikiC :51309854 Aha, so it is not yet merged. Thank you for the link, I assumed that this issue had been resolved.
 
@DaveRandom Poorman's "Designated Survivor".
 
@NikiC P.S. I do hope that you will be around PHP for more than 10 years ;) :D
 
Segfault when using DOMChildNode::before() ・ DOM XML related ・ #80602
 
Wes
8:38 PM
how do i tell phpstorm to force me to import root scope symbols? ie i want it to force me to write use function strlen; rather than relying on fallback to root scope
 
@Girgias yes, the same on my editor, I think for specific branch if I find the related branch for union-type
 
@Wes I'm not aware of that, I think there's a setting for force fqns at the point of invocation though
fully fully qualified names - you know that baby is qualified
 
Wes
is that the setting?
truly fully deeply qualified names
 
8:53 PM
well I can't not pick you up the random Savage Garden reference, wtf is going on there? :-P
I mean I like some shit pop music but srsly...
 
Wes
did i reference something by accident
no idea what savage garden is. i know a gardener though
 
9:52 PM
 
Wes
thank you :B
police just allowed the "protesters" to enter the capitol
imagine if black people tried to enter the capitol like that
 
Wes
multiple deaths reported
 
people have died?
 
Hi @Tiffany, how are you doing?
 
Wes
10:05 PM
hold on, could be bullshit
 
cmb
@MateKocsis there is already a PR regarding these warnings. I would prefer a "clean" solution, though.
 
10:24 PM
@SalOrozco not very informative either through facts, or reporting who is behind those nebulous claims.
 
By the way, this should make you wary of basically all reporting. When news reports in a field you are knowledgeable about are so blatantly wrong/misleading, there's no reason to think it's any different for all the other fields.
 
blog.jetbrains.com/blog/2021/01/06/… - tl:dr we have no idea what you are even talking about.
 
@Danack My understanding is it's a bit like reporting that Apple would be under investigation for someone using Xcode to build compromised software, no?
 
10:43 PM
@Trowski in my random guess, it's probably more deliberately misleading than that. Giving out false information that attacks a company that isn't russian mafia owned, to blame them for the actions of Russian state hackers, is pretty in line with how the Russian operate....
 
Wes
> Russian company, based in the Czech Republic
immediately smells like bs
 
Also......not joking, I believe the NYTimes may have some senior people in it who are effectively white supremecists and quite happy with todays events.
 
There's been a non-trivial amount of 'odd' reporting from them that has dismissed Trump's links with the russian mafia.
 
11:03 PM
user image
2
 

« first day (3735 days earlier)      last day (1213 days later) »