« first day (4277 days earlier)      last day (654 days later) » 

8:52 AM
@LeviMorrison do you mean to allow & before variables in assignment, like fn () { &$a = 1; } ?
 
 
2 hours later…
10:51 AM
I'm working on adding the "This will become an error in PHP 9.0" for undefined vars warnings and all the normal ones seem fine, but I can't seem to figure out where the error message for variable-variables is being generated.
 
cmb
@Derick IIRC, you have access to the pecl.php.net database. Could you please check whether protobuf-packages@google.com is already registered there (the UI doesn't show it, but some emails are hidden). For context: news-web.php.net/php.pecl.dev/17476. Stanley is registered with a personal email address.
 
11:05 AM
pecl and php don't share the same account database
@cmb It was already in the "to approve queue" from 2017 - i've opened it now: pecl.php.net/user/protobufpackages
 
cmb
11:27 AM
Ugh, thank you!
 
11:49 AM
@LeviMorrison I presume you were thinking of this? wiki.php.net/rfc/explicit_send_by_ref It seems like Nikita brought it up for discussion twice (externals.io/message/101254 and externals.io/message/108699), but never took it to a vote
I'd love it if someone came up with a good implementation of out/inout params instead, but I'm not sure where that would then leave us for by-reference capture
 
12:17 PM
@ramsey I've tried it now, and it is because you're calling a function from CPP, but which is a C function. I've made you a PR: github.com/ramsey/ext-ecma_intl/pull/31
 
 
3 hours later…
3:36 PM
@Derick Thanks! So, I don't need that .so file at all?
 
3:56 PM
@Derick Thanks so much for helping me get over that hump. The next thing I'd like to figure out (though not related to making cpputest work) is how to get CLion to recognize the tests as project targets. To me, the generated Makefile has targets for the tests just like it has targets generated from config.m4 for all the other source files, but CLion isn't detecting properly for the tests, though it is for the other source.
It would help me navigate/understand the code better if I could get CLion to recognize the targets. I'm not sure if you have any experience with that. If anyone else here does, I'd love your help. :-)
BTW, I uploaded the screenshot not to share code (I would have used a pastebin for that). I uploaded it to show that CLion doesn't recognize the symbols
 
 
4 hours later…
7:30 PM
@ramsey I don't think so. I didn't see the reason why you would want one?
@ramsey I have never even started CLion, so not sure how I can help there.
 
JRL
@ramsey as far as i know, everyone here who knows how to make php-src work with CLion learned it from you
i shared the article you wrote on how to do that and it was news to basically everyone here
If the CMake project that was started back in December ever comes through though, I imagine that CLion will work much better
 
8:16 PM
Mornings / evenings
 
8:42 PM
General Error:
SQLSTATE[HY093]: Invalid parameter number: parameter was not defined
I get this error when trying to post a form parameters
$sql =  "UPDATE `t_accounts`
   SET `Account_Balance` = :Account_Balance,
       `Updated_at` = :Updated_at
        WHERE `Account_ID` = :Account_ID";
        $stmt = $connection->prepare($sql);
        $Account_Balance = $_POST['Account_Balance']  ;
        $Updated_at = $_POST['Updated_at']  ;
         $Account_ID = $_POST['Account_ID']  ;
        $stmt->bindParam(1,$Account_Balance);
        $stmt->bindParam(2, $Updated_at);
        $stmt->bindParam(3,$Account_Id);
I checked that number of params is 3
 
@PHPFan looking at the example, on the page php.net/manual/en/pdostatement.bindparam.php I think you're mixing and matching different parameter placeholders:
> Parameter identifier. For a prepared statement using named placeholders, this will be a parameter name of the form :name. For a prepared statement using question mark placeholders, this will be the 1-indexed position of the parameter.
so either $stmt->bindParam(':Account_Balance',$Account_Balance); or SET Account_Balance` = ?,`
 
JRL
was about to say, you're using named params mixed with ? params
also, just be aware that bindParam binds as a reference
so it's value is only determined at the line that calls execute, not at the line where it is bound
 
 
1 hour later…
10:07 PM
@JRL Haha! After I posted that, JetBrains added Makefile project support to CLion. So, now, if you build conf and configure first, then load the project in CLion, it'll detect that and use it, without the need for the JSON compilation database
 
JRL
oh huh
and it'll know how to do the symbols correctly?
 
seems to
 
JRL
interesting. i've been using your db setup on my box
 
if you load the project in CLion before there's a Makefile, though, it'll assume it's not a Makefile project, and you'll have to rm -rf .idea and reopen in CLion to get it to detect it, after you generate the Makefile
 
JRL
how does that work with debug? that'll result in the makefile changing potentially
building a new executable and such that is
 
10:11 PM
I'm not sure... every time the Makefile changes, it reloads the project automatically
 
JRL
oh fancy
i do have to give my thanks for the article though, it's the only reason i was able to get involved in internals at all
 
My point is that, if it doesn't exist the first time you load it, there's no way (that I've found) to tell CLion it's a Makefile project
Awesome! You're welcome!
 
JRL
was not interested in working on a project like php-src without the ability to do full project symbol resolutions and in IDE debuging
 
It's made a big difference for me
 
JRL
yeah, i (apparently) know more than many of the people who work on RFCs now about how Zend works, just because i have been debugging the VM in order to trace where things go to make changes, lol
which is kind of terrifying, tbh. because i know almost nothing about how Zend works
 
10:14 PM
:-)
 
@ramsey Huh, glad you mentioned that. I was about to set that up tomorrow
 
I kinda stumbled on it recently. jetbrains.com/help/clion/makefiles-support.html
Ah... here's more info about what CLion does to detect the type of project: jetbrains.com/help/clion/gnu-autotools.html
 
@JRL when I started with php-src lxr and nano were my friends :-D
 
JRL
yeah, and any time i need to know the zval as part of debug i still can't use CLion for that
since i don't see a way in CLion to import the correct macros for the debugger
 
@bwoebi that kind of implies you were friends, but now you've had a falling out. What happened that caused this rift?
 
10:27 PM
switched to vim
 
@JRL I'm able to see the zval when step-debugging in CLion. Is that what you're trying to do?
 
I'd cry without my IDEs. My productivity would drop and i'd need to spend 25 hours per day working instead of 15
 
I didn't start using a proper IDE until about 2.5 years ago
And I'm now in my 27th year of programming
 
I couldn't even estimate the amount of time phpstorm saves me even for something as simple as moving a class.
 
I won't count using Dreamweaver as an IDE ;-)
 
10:35 PM
Oh man, dreamweaver, those were the days. Where using a button was forbidden and it had to be a rollover gif.
I started on dreamweaver, then through uni I used Netbeans, then I finally tried phpstorm and it was like an awakening
 
I tried Eclipse and Zend Studio, but neither worked well for me. At least, not at the time.
 
JRL
i see the zval struct in the step-debugging, but not what the values of them are in PHP terms. just the garbled stuff they are in memory
if i knew more about zval's themselves in memory, or honestly more about C maybe, i might be able to work with that
but the macros for external debugging allow me to just see that this is a PHP int 5 or something like that
 
11:23 PM
@MarkR simple: don't move things too much… refactoring utilities are nice, but if you don't have them thing tend to stay more in place where they are
 
@JRL I've never seen the macros for external debugging, so I didn't know I could get a better view of the zvals
 
JRL
@ramsey it was some macros for GDB, i dont remember where i saw them though
actually, might have been something that someone in this room linked me
 
@JRL you mean the .gdbinit in the repo root?
Yeah these are sometimes nice
 
JRL
@bwoebi yes, that might be it
 
I never used the clion integration for debugging and just using gdb directly on the cli.
 
JRL
11:31 PM
right. any time i want those macros, i can't use the clion debugger either
but i dunno how to do step debugging with gdb either, so i end up having to use both
 
@JRL doesn't the clion interface have a window to directly issue cli commands to gdb?
 
JRL
@bwoebi maybe. im honestly not sure.
 
@bwoebi The projects I work on rarely stay static, code gets moved around as business considerations get moved a round
 
I tried it like once or twice… but feeling more comfortable with only cli.
 
JRL
same with me, only in reverse, lol
 
11:34 PM
@MarkR yeah, it's very nice for more … "business code" containing repos
like if you write code for php-src or generally libraries, most things tend to stay static.
 
Is there a quick way to rebuild zend_vm_execute.h?
nm seems I had to make clean first
 
JRL
nothing quick about rebuilding zend_vm_execute.h
at least in my experience
 
I've been hunting for the undefined variable-variable message for hours >.>... it was hiding because it was "undefined %svariable" and there's a ternary to add "global" or not
 
JRL
lots of unexpected optimization stuff in the VM that make it difficult to debug, for sure
 
I'm kinda dreading the work I signed myself up for with the vars
 
JRL
11:47 PM
at least you know enough to feel the dread
when i first looked at how to separate the > operator from the < operator, i didn't know enough about Zend to even know how it built the op code sections as part of the build from the VM definitions
took me almost a month before i realized what was happening
 
I just hope my job calms down a bit in the next year so I've got time to properly investigate, I can't keep doing 15 hour days and work on PHP
 
IGP
I've got a dumb question. Are named arguments and variable arguments incompatible?

function stuff(int ...$param): void { var_dump($param); }

stuff(param: 1) // works
stuff(param: 1, 2) // fails
stuff(param: [1, 2]) // fails
stuff(param: ...[1, 2]) // fails
 

« first day (4277 days earlier)      last day (654 days later) »