« first day (3567 days earlier)      last day (1372 days later) » 
01:00 - 20:0021:00 - 00:00

9:11 PM
And my cat is on top of my kitchen cupboards, looking down at me.
 
mine is getting extra fusses tonight because I have to take her to the vets tomorrow
 
@MarkR oh boy. Routine visit or something wrong?
 
When I took her for her annual vaccinations on Monday they told me she might have a tooth problem and they needed her back to anaesthetise and inspect.
 
My cats hate going to the vet. I try not to bring them if I can help it because they go crazy.
 
Mine is fine with it, she sees it as an opportunity to get more fusses off someone else
 
9:25 PM
@MarkR oh no :( hopefully it's nothing bad.
Fusses = attention?
 
yup
 
May I move this RFC to declined wiki.php.net/rfc/make_ctor_ret_void? It's listed under wiki.php.net/rfc#in_voting_phase
 
If it's marked as declined sure
 
@Girgias @MátéKocsis Have you applied to github.com/sponsors?
 
I did not
 
9:34 PM
I'm going to try to learn C.
 
I give it 10 years before PHP goes Rust
 
@Girgias You should :D
 
Well I'll have a look at it a bit alter :p
 
Goes Rust?
 
Gets re-written using the Rust programming language.
 
9:37 PM
ohh
 
@MarkR The source code? And all the infrastructure?
 
@MarkR is that even... possible?
 
Sure. It would be an absolute ton of work but it certainly seems like Rust is going to be the successor for high-security high-performance applications.
 
Have little experience in other languages. Have nothing to compare PHP with. What would you change if you had a chance to start from scratch?
 
@Tiffany Sure. Rust and C can also interoperate so theoretically we could start writing new stuff in Rust today. Now whether that would be practical is a different question.
 
9:39 PM
@SalOrozco It wouldn't change how PHP itself operates on the outside.
 
@IluTov Same compilers and everything?
 
What you mean by the outside.
 
The outside being how .php code executes in userland.
The inside, the php internals if you will, being how it's actually done
 
@GabrielCaruso Yeah I don't see why not. But it would be rather tedious as you'd mostly be calling C API which means you'd lose a lot of the Rust benefits.
I'm assuming Rust can target all the same architectures we're supporting.
 
Create PHP 8.1 milestone on GitHub ・ *General Issues ・ #79886
 
9:44 PM
@IluTov Oh, interesting, I didn't know that. Because I believe the biggest arguments against rewriting PHP's core in some other language than C is not even its internals, but the tooling around it to compile.
 
@GabrielCaruso Rereading that question, what do you mean by same compiler? If we had parts C and parts Rust we'd require gcc/clang and rustc.
 
@IluTov If I type make, would it work? :D
Or ./configure and other scripts that lots of extensions use it
 
@GabrielCaruso Haha ok. So I'm an absolute noob when it comes to the php-src build system but I'm pretty sure we could make rustc emit object files and link them together just like we currently do.
 
Gotcha. I'm asking for the same reason, I have 0 idea how it gets compiled :(
 
10:12 PM
Minor Service Outage ・ Gists has Partial Outage
Incident on 2020-07-22 22:18 UTC ・ Gists has Partial Outage
 
10:53 PM
I have this SQL statement that works when I execute it manually in sqlite, but doesn't work with PDO
select contacts.*,
GROUP_CONCAT(teams.name ORDER BY teams.name asc SEPARATOR ', ') as team_names,
(SELECT count(team_contacts.id) FROM team_contacts where contact_id = contacts.id) as teams_count
from contacts
join team_contacts on contacts.id = team_contacts.contact_id
join teams on team_contacts.team_id = teams.id
where contacts.account_id = '38ee284b-192f-4288-9927-8dc48bbed9a7'
group by contact_id
order by teams_count desc, team_names asc;
That works perfectly
 
@GabrielCaruso Great I don't even know how I'm meant to fill in this W-8BEN form D:
 
triggers.
 
But I put in the same thing in PDO and it says "PDOException: SQLSTATE[HY000]: General error: 1 near "ORDER": syntax error"
I've been trying to debug this for two hours I'm clueless
I know it's the order by inside the group concat because of capitalization
 
I had something similar happen to be recently I fixed it by binding the param.
 
It happens while binding too :/
I stopped binding it just so I would know that there are absolutely no differences
Just straight $pdo->exec(...)
 
10:59 PM
I don't know if this is the issue, but I'm curious what happens, have you tried with the native sqlite functions? ... assuming there is one for PHP
 
yeah doing it straight from pdo->exec was causing the problem for me.
 
@SalOrozco It happens while I prepare it as well though
@Tiffany sqlite? I'm using MySQL
 
@Alesana you said manually in sqlite?
> I have this SQL statement that works when I execute it manually in sqlite
If it's MySQL, do you have emulated prepared statements on or off?
 
Oh
You're right
I have no idea why I said that
I'm tired haha
 
11:08 PM
Take a break.
 
I meant MySQL
 
Try turning emulated prepared statements off, if it's currently on or if you're not sure (it's on by default)
 
I have to get this done today though :/
 
does the query work in the MySQL console?
 
Okay I will try that
 
11:10 PM
And if that fixes it, going to add it to my list for "reasons to turn emulated prepared statements for pdo_mysql off by default" ... if I can find enough reasons, I may unshelf my RFC
 
Yes it does, that's what's weird
I put it in sequel pro and it works perfectly
 
Show us the entire query with PDO
 
I think I meant to say sequel pro instead of sqlite lol
 
Try emulated prepared statements first, before anything else
 
I've removed the parameter from it altogether and I have...
        $query = <<<QRY
            select contacts.*,
            GROUP_CONCAT(DISTINCT teams.name ORDER BY teams.name asc SEPARATOR ', ') as team_names,
            (SELECT count(team_contacts.id) FROM team_contacts where contact_id = contacts.id) as teams_count
            from contacts
            join team_contacts on contacts.id = team_contacts.contact_id
            join teams on team_contacts.team_id = teams.id
            group by contact_id
            order by teams_count desc, team_names asc
Which does not work
But if I take the same exact text in the middle there it works fine
when manually executed in my mysql program
 
11:12 PM
try doing it with "" instead of QRY;
 
Same result
 
PDO::setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
or whatever the variable is for your database connection
 
I did that it didn't fix it :(
 
$dbConnection->setAttribute
balls
 
    $pdo->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false);
I can't find anyone else trying to use order by inside of a group_concat with pdo online lol
 
11:14 PM
is the preceding \ necessary?
 
What \?
 
because you're setting an attribute, not calling something namespaced
 
In front of the apostrophe's?
 
$pdo->setAttribute(**\**PDO::ATTR_EMULATE_PREPARES, false);
 
Oh I am in a namespace though
 
11:15 PM
try it without
 
It says class PDO not found
 
blargh
 
I'm done with it lol they're not getting it sorted
 
I was hoping it was related to prepared statement emulation :P
 
lol would've been convenient
 
11:17 PM
I would really like to turn it off by default but there's only one or two reasonable arguments for turning it off by default, and one major reason for not turning it off... that I'm not comfortable enough with for pushing for the change...
 
var_dump($query) see if anything is changing your query string
 
@SalOrozco or just use a debugger...
 
yes
 
@bwoebi What do you mean?
Is the way I'm doing it not a part of the group_concat statement?
 
@Alesana misread, nvm
 
11:19 PM
All good!
 
@StatikStasis not sure but I suspect you may be susceptible to bring obsessed with this like I am open.spotify.com/track/4x5WbFaTTCexxBKbUyfBcG
 
omfg
It's the name part
I guess that's a reserved keyword or something
 
lol
don't feel bad, I've encountered something similar a couple years ago, I don't remember how much time I spent debugging it
 
I think lol
I don't even know at this point
lol I have too idk if that makes it worse or better
No it wasn't nevermind
 
it was the alias name?
 
11:29 PM
No, I don't know what it was. I thought it was only happening with the order by so I took it out and now it's saying the SEPARATOR is unexpected
 
Incident on 2020-07-22 22:18 UTC
All issues have been resolved!
 
Okay actually now I do really feel stupid
I forgot that in my tests the driver actually is sqlite
lmao
 
lol
 
IDK how to test this one
but it still seems like it should be supported
Okay yeah nvm sqlite just doesn't accept ordering inside group concat
 
01:00 - 20:0021:00 - 00:00

« first day (3567 days earlier)      last day (1372 days later) »