« first day (3676 days earlier)      last day (1271 days later) » 

12:06 AM
I assume this comes from the compiler built-in not being aware of assertions
 
 
1 hour later…
1:17 AM
Imagecolorat and imagecreatefrompng glitch ・ *Graphics related ・ #80335
 
 
6 hours later…
6:53 AM
morning.
 
7:41 AM
o/
 
\o
 
 
3 hours later…
10:52 AM
morns
 
o/
 
11:25 AM
\o
 
o/
 
\o
 
11:58 AM
@Trowski How far is fiber-ext from being ready for real world usage? I want to rewrite an old project and would love to start with fibers …
 
Wes
stupid question, how do i exit from amphp's Loop::run? i just use exit() rn, is that the right way to do it?
also hi everybody
 
@Wes It's not wrong to do that, but usually Loop::stop() is the way to go
 
Wes
12:14 PM
nice. thanks
 
12:28 PM
How to check whether a character (not a string, a character) is alphanumeric (including UTF-8 characters of other languages such as Slovenian)?
 
Is the string you're working from ALWAYS a UTF-8 string?
 
@Girgias I am not sure what you mean? I mean it doesn't necessarily need to contain letters from other languages (that are in the UTF-8 set) but it may. I read the string from a csv file that is UTF-8 encoded, so I guess it is.
@cmb Thanks, I'll use that as a last hope as I don't really want to write the regex myself :D
 
@Silidrone Then use a PCRE regex as sent by cmb
 
@Girgias Is there an already written regex for alphanumeric checking of a UTF-8 string?
 
12:35 PM
Because if you are not working with a utf-8 (or unicode) encoding you're going to have way moer trouble
 
I used this from SO answer but it didn't seem to work: '/\w/u'
 
\w is a word
\p{LN} should do the trick
Honestly it ain't hard to write a very simple regex like that for one char
 
@Girgias Yeah you're right, I'm just a lazy fellow xD
@Girgias Thank you :)
 
12:56 PM
Fatal error: Uncaught ValueError: strrpos(): Argument #3 ($offset) must be con ・ Testing related ・ #80336
 
 
1 hour later…
2:02 PM
Maybe try a char class [\p{L}\p{N}] ?
 
The problem is it seems to think it isn't valid, I get the error: preg_match_all(): Delimiter must not be alphanumeric or backslash
@Girgias I'll try that
 
Well because I didin't put the delimiter
I was hoping you knew how a regex works
 
@Girgias No I don't really.
 
Well then learn that, cause it's a useful thing to know anyways
 
@Silidrone / ... /, # ... #, regex must be surrounded in something
And must also be a string literal for use in preg_match, etc
 
2:10 PM
Well for the Unicode classes you'll need to add the u flag
 
@Silidrone having at least a basic understanding of regex is an important skill as a developer
 
$mysqli->init() always returns NULL for me. Does anyone know why?
 
user14466490
HI people
 
user14466490
is there anbody
 
@ShayanKanwal if you have a question, just ask your question
Don't beat around the bush
 
cmb
2:24 PM
 
user14466490
I came over here to collect some up vote if my question deserves it here the question
 
user14466490
2
A: Why the event blur is not working with the function name blur?

guyaloniThere is a much elegant solution for it - instead of using javascript, use css pseudo-class focus: The :focus CSS pseudo-class represents an element (such as a form input) that has received focus. It is generally triggered when the user clicks or taps on an element or selects it with the keyboar...

 
@ShayanKanwal no
 
I can downvote it if you'd like
 
@ShayanKanwal read the rules
 
user14466490
2:26 PM
ok by
 
Stack Overflow main rules
 
Wes
@Danack @DaveRandom should i watch Utopia (Channel 4, 2012)?
 
@cmb Ahh yes, We should find a better fix github.com/php/php-src/commit/…
What's the point of having the stupid method if it always returns NULL
For the past 6 years it didn't do anything useful and no one complained?
I am not sure if this ever did anything useful...
 
2:47 PM
@Crell I have a working (and barely tested) implementation for overloading === (github.com/php/php-src/compare/…), how do we proceed? We could announce our enum RFC in the mailing list and ask for opinions but the last few months have kind of reinforced my belief that the mailing list is a bad tool for gathering this kind of information.
 
@Tiffany Yeah I know, although I do know senior developers that do not know it. It's not that complicated to learn, I am just lazy to learn it tbh, but I will, one day.
Thanks for the help though.
 
cmb
@Dharman I assume mysqli::init() was supposed to be called statically.
 
What is the point of mysqli_init()/mysqli::init() at all? We can just call mysqli_connect() or new mysqli() without any parameters
 
cmb
3:02 PM
Well, these return an object, but mysqli_init() "returns a resource for use with mysqli_real_connect()" ;) (that is a total mess)
 
Resource?
mysqli doesn't use resources
 
@bwoebi I think it's ready. Most of the Amp libraries have been upgraded, with the notable exception of amphp/mysql because I was hoping you'd fix the compatibility issue with Mysql 8.
 
cmb
@Dharman but that's what the function summary states. And according to the docs, mysqli_refresh() expects a resource. Like I said, a big mess. I'm going to fix the resource nonsense.
 
@Silidrone "senior" developer not knowing regex... I would question how they became "senior"
Or by what definition they are senior
 
cmb
I think that depends on the programming language as well. :)
 
3:17 PM
True
 
cmb
What is "Initializes MySQLi and returns a resource for use with mysqli_real_connect. [Not called on an object, as it returns a $mysqli object.]" in php.net/manual/en/mysqli.summary.php supposed to mean?
 
@cmb Creates mysqli object without performing the database connection
 
cmb
yeah; but that "[Not called on an object, as it returns a $mysqli object.]" gives E_PARSE for me.
 
No idea.
This function is literally an alias of mysqli::__construct() with no arguments
 
If I have 2 db rows in MySQL using id for auto increment and I want to change the id of row 2 to row 1 and row 1 to row 2, what would be the best approach? I know this isn't PHP related, but pretty sure you guys have an idea on how to go about this, haha
id column is unique of course, that's what's giving me some trouble here. Otherwise it would be easy
 
3:27 PM
you need to change one to a third number first, then change the other to the first one's original id, then the first to the other's original id
e.g
1, 2
 
@icecub IDs are not changable. You should never ever change IDs
 
1 > 999999999; 2 > 1; 999999999 > 2
 
Is there something I can set in zend_op_array to label the call in the backtrace as [internal function] (or perhaps something settable?) rather than zend_op_array.filename + zend_op.lineno?
 
@Dharman I'd say "changing IDs is usually not the best way to solve a problem", but to say that (a) they can't be changed and (b) that you never ever should, is both technically incorrect and overstates the seriousness
 
I was talking from logical point of view, not technical
 
3:30 PM
I mean foreign key constraints even have support for following changed PK
and from a logical point of view, I'm saying that while it's generally not the best solution, that doesn't mean it's impossible, or that it should never be done
 
@Dharman Ye I was thinking about that as well. Would it be a better approach to create a sorting column instead that's not unique and then use PHP to deal with accidental double entries?
 
@icecub Definitely
 
@Stephen Ye I had this idea as well, but it would mess up the auto increment straight away the moment you start making indexes yourself
 
@icecub reset the auto increment after?
I mean it sounds like you want a column to sort on rather than to change the PK
but changing a PK is not rocket science either
 
Please don't change PK. There's absolutely no reason. You need a separate column. IDs are used to uniquely identify a row, not provide a sorting order
 
3:34 PM
Ye. It's just about convenience. This specific table holds chatrooms. The idea is to let admins sort them in order to appear to users. Would be more convenient if the sorting was done directly in the database.
 
Then you definitely need a column that will allow you to store this information
 
But I can deal with PHP doing the sorting instead based on another column
Thanks guys :)
 
3:53 PM
@cmb This should fix the problem: github.com/php/php-src/pull/6409
 
cmb
@Dharman thanks! That should probably be added to wiki.php.net/rfc/deprecations_php_8_0.
 
win7 ・ OpenSSL related ・ #80337
 
4:32 PM
@Trowski The first member of zend_function contains the type of the function indicated. It would be 1, ZEND_INTERNAL_FUNCTION if the function is an internal function. github.com/php/php-src/blob/…
 
4:48 PM
@sj-i Thank you, Now I have a couple tests failing that throw exceptions with a bad access on this line: heap.space/xref/php-src/Zend/zend_exceptions.c?r=1748b811#151 Any idea why that might happen?
 
@Trowski Though I don't know what happens if you set it to ZEND_INTERNAL_FUNCTION in some violent way when it isn't actually an internal function.
 
5:01 PM
@Trowski I don't have any idea. What is the purpose of doing it?
 
@sj-i So this can be [internal function] instead of [fiber function](0)
@sj-i Here is where the zend_op_array is defined.
 
5:23 PM
@Trowski Aha, I see. So it has been made as a user function in the extension. If the same functionality can be made as an actual internal function, it would be labeled as internal.
 
5:38 PM
@Wes no idea, haven't even heard of it. Think I wasn't in the UK when it was on...
 
5:50 PM
@sj-i yes, though I don’t understand what the line is between user function and internal functions. It’s not what I would have assumed.
 
cmb
6:03 PM
@beberlei, thoughts on bugs.php.net/bug.php?id=80332? Shouldn't we support accessing members of DOMNamedNodeList by name via []?
 
@cmb Please don't do that: bugs.php.net/bug.php?id=80336&edit=1
 
cmb
You mean referring to internals@? I think everybody should be able to raise their voice (unless they misbehave).
 
Fair enough
FWIW everyone is able, but we can pick who we encourage to do so ;)
 
cmb
fair enough as well :) (although not all are allowed to post to internals, although they appearently find still ways to circumvent that)
 
Yes, I noticed that as well :)
Though they did write something sensible this time around...
 
cmb
6:15 PM
Anybody interested in helping with the PHP 8.0 migration guide? We still need documentation for several of the new features (e.g. union types, attributes, match expression).
 
@cmb Well union types should be done when the new type page is merged
I might have time depending on what I'm doing this year, actually thinking of pausing uni for this year as I'm seemingly incapable of learning anything and I'm wasting my time :|
 
6:40 PM
@Girgias huh, why's that?
 
@Girgias you're plenty capable :)
 
see reported bug in another thread that was closed ・ *General Issues ・ #80338
 
@NikiC Don't know, just the format of online learning just really doesn't suit me... struggling on some relatively basic stuff and not being able to just bug someone in a common room/library is very frustrating.
 
Also, not being able to meet people and go socialising defeats half the point of going to uni...
 
Also that^
 
6:48 PM
fatal error on calling strrpos ・ *General Issues ・ #80339
 
so.....we should probably require people to sign in at some point...
 
yeah
 
7:01 PM
@Girgias Is suspending your place and resume it next year (assuming the situation is a bit less pandemicy) something your university allows?
 
That's basically what I have a meeting tomorrow for with the Undergrad relations officer
 
cool. probably quite a few people having that discussion...
 
And she knows I was already not very keen on doing this year remotely back in June/July when we talked, but at the time it was well it looks like it's gonna be better in November or so and Spring term would be back to normal
But that seems very unlikely now :|
 
Also, morons going to moron. Something that I've been meaning to add to RFCCodex is a list of why some stuff has been decided as it is. Obviously will need to use short words....but pointing people to that would be better than having to explain it to each of them individually..
 
Feel like I'm going to point to Christopher Jones blog article in the intersection type thread
Cause calling for someone else to implement something is ... not great
 
7:23 PM
Depends if you also say "here is an amount of money for someone to work on it for a few months or not."
Obviously you face a difficult choice @Girgias good luck with it. But my guess is that suspending your course for a year is the choice for the year would be the one that is less likely to be regretful.
 
@Danack I've talked it over with my Mum yesterday, because turns out I'm struggling quite a bit and postponing the year is probably the best route to go, just depends if Imperial will let me
 
Tell them you'll start a 'dirty protest' if they don't.....
 
I mean, I'm on first name basis with the officer because I talk to her a lot, and she did tell me that it can be an option just that they don't recommend it, for obvious reasons, but will know more tmr so until then it's a bit of who knows
 
PDO incorrectly parses string literals for platforms other than MySQL ・ PDO Core ・ #80340
 
 
1 hour later…
8:56 PM
@Jeeves could emulation have any effect on this?
 
9:26 PM
$sql = <<<'SQL'
SELECT '\'', ?'
SQL;
how does that even balances, the single quotes do not match
 
@FélixGagnon-Grenier single quotes are escaped by doubling them
 
@Tiffany yes, most likely
depending on the sql mode (for mysql) or target the allowed quoting types differ
and PDO probably is fully unaware here
 
@bwoebi I'm wondering if it's even a bug if emulation is turned off
Assuming it is a bug, that is
Ah, cmb marked it dupe
 
cmb
yes; IMHO that's an annoying behavior of PDO, but a general fix appears difficult; it might be possible to solve that for each affected driver individually, though
 
9:48 PM
@Crell Sorry, I don't like the asymmetric visibility feature.
 
10:01 PM
It seems like all the open source contributors have really short lowercase handles
So I am now known as scorgn :P
 
@scorgn plausible anonymity.
Though I consider mine a proper noun, so gets a capital.
 
Heh, it works though
If I wanted plausible anonymity I probably should have not made it resemble my real name so much
I just want to fit in :p
 
What's wrong with Alesana?
 
It's a band name lol
I will never come up first on a google search for alesana
 
Ahhh
Meh, neither will I
 
10:12 PM
You can find a string of unused random lowercase letters
 
I don't really care if I do or don't
 
@scorgn same reason I don't go by "Dan A" - youtube.com/…
 
10:32 PM
Yeah I don't blame you
 
Wes
11:31 PM
@Derick got this on windows, maybe it interests you to know i.imgur.com/rLgo9qj.png
 
cmb
I think he already knows. :)
It's not a threat (unless the resource could be reached publicly).
 
Wes
does php8 require vc...16?
 
@Wes report it as invalid ?
 
cmb
Kalle did that for a closely related issue in the docs; that appears to have been accepted, but after a few weeks, the same (or very similar) issue was reported again.
@Wes It's not supposed to (vc15 should work as well), but I haven't checked for a long time
 
Wes
can't compile php8 on windows
i think i need to update the deps, but phpsdk doesn't support php8 yet, it seems
 
cmb
11:43 PM
@Wes ah, yes updating the deps may indeed be required; PHP-8.0 and master should be supported
 
Wes
ok no there is an entry, but it's vc16
 
cmb
oh, indeed, fetching the deps in a vc15 env wouldn't work
this is ... suboptimal :(
 
Wes
that looks to be working, sort of
i just want unions. NOW.
:D
 
cmb
@Wes download a binary package from windows.php.net/qa#php-8.0?
 
Wes
getting the same error i got with vc15
strlcpy.c
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64\cl.exe"' : return code '0x2'
Stop.
@cmb that would work if there's also xdebug
looks like it does
 

« first day (3676 days earlier)      last day (1271 days later) »