« first day (3487 days earlier)      last day (1444 days later) » 

2:47 AM
So I'm starting to get a grasp of callables in the engine, so I made ReflectionParameters::_construct() use a fast ZPP macro by adding a new flag, but I'm getting a ZPP mismatch error when using the callable type hint in the stubs :( github.com/php/php-src/compare/…
 
 
2 hours later…
4:52 AM
@StatikStasis your camera covers up what you're getting :(
 
 
1 hour later…
6:11 AM
@Girgias i believe you are facing this issue: github.com/php/php-src/pull/4883
 
 
4 hours later…
10:10 AM
@MátéKocsis maybe? I mean in some sense the failure makes sense as I'm trying to make some non static methods pass a callable check, so it's not totally unsurprising but I would have thought ZPP mismatches are based on what the specfic ZPP check let's through :/
 
10:45 AM
\o
 
o/
 
\o
 
@Girgias Hmm, probably you are right, and it's a different issue. The "callable, method, ZPP, problem" keywords just automatically rang the bell to me, and I didn't really check your exact problem :S
 
Well it's maybe related tbh but I'll need to dive a bit deeper into it to try to understand
 
 
3 hours later…
1:44 PM
@Danack Good to know people are still talking about this 10 years later.
Haven't heard a good "twice colon" flame in a while.
 
2:32 PM
Hey guys! Had a peculiar issue.
1
Q: PHP's Execution Operator not displaying g++ error

Jaideep ShekharI am making a code editor for my website, which should take a user's code, compile and run it, and give the user a success or a failure by matching the code's output with the correct predetermined output. Let's say I have a file editor.php: <?php echo `dir` ?> this displays the contents of ...

Can anybody help me out? Any help appreciated!
 
@JaideepShekhar You're probably missing a 2>&1
 
Missing a what?
 
oh, i just answered that on SO
 
@JaideepShekhar It redirects STDERR to STDOUT
 
Ahhh... Yes, if I change stdout to stderr, it doesn't work! Thanks!
 
2:44 PM
As I said in my answer, you need to use proc_open with the pipes config
 
So how do you redirect? I didn't understand "2>&1".
That's an option. :-)
@NikiC can you post that as an answer. Many thanks to you and Derick!
 
 
2 hours later…
4:40 PM
Is anyone working on a typed variables RFC?
 
I think Sara posted a draft RFC on the Wiki
 
@Girgias Indeed, thanks!
 
:)
 
5:17 PM
@Tiffany Before it covered up what actions I was taking in battle and the dialogue of people on the street. I figured it was less invasive to have in the right and I just say what is.
 
Good evening. Question about PHP internals, please...
I see that when one allocates a zend_string in an extension, the refcount of the new string is automatically set to 1..
Do I need to explicitly decrement the refcount when I don't need the object any more?
(Hmm... after asking the question, it seems kind of obvious... maybe I should have asked a rubber duck first)
 
rubber ducks are fine.
 
Other VMs which I've worked on before scan stack/registers to find references... but the very fact that PHP uses refcounting strongly implies that I need to explicitly decrement the refcount in a C extension when dropping references to an object...
Please tell me if I'm off base
 
6:04 PM
@Girgias shouldn't we move to the voting phase?
 
@brzuchal Probably, but I don't really have the time currently due to exams, so if you want to lead the charge fine by me :)
@AlexD you should use zend_string_release as this will handle automatically the refcount decrementation and the removal if it reaches 0
 
@Girgias OK
 
There is a similar macro for HashTables too
 
I'm surprised that GC_DELREF doesn't free the object if the refcount goes to zero
Does that mean that memory will never be freed if you just use GC_DELREF?
 
Can't help you on that front, I don't know how the GC works in all honesty, just what I need to use to not have memory leaks being shouted at me by Zend's memory allocator :D
 
6:17 PM
@AlexD as you're finding, the documentation for people trying to get into internals is kind of hard to find/read. have you seen phpinternalsbook.com/php7/internal_types/strings/… + phpinternalsbook.com/php7/memory_management.html ?
 
@AlexD GC_DELREF is a low-level API just for decrementing the refcount. There are higher-level APIs for releasing values
 
@NikiC OK. Got it
 
For zvals that's zval_ptr_dtor, which handles refcount decrement, potential destruction and potential GC rooting
The strings, it's zend_string_release.
 
Got it.
 
Btw @NikiC mind clarifying what you said on the ReflectionParameter::__construct PR? I didn't get the bit were you said that a literal comparison still needs to be done
 
6:28 PM
@Girgias literal = "foobar"
sizeof(char*) == 8
Not the length of the string it points to
 
@NikiC just to be sure I understand it correctly (because I am currently quite confused), I need to dereference the char* pointer accessed via ((zend_internal_arg_info*)arg_info)[i].name ?
 
7:16 PM
@GabrielCaruso I can't imagine typed variables from making it in, because the performance impact is too high
@Girgias / @brzuchal / @MarkR — came to a conclusion about the namespaces, and who would like to be on the podcast about it?
 
@Derick I don't think we did, and I mostly got exams for the next 3 weeks so until then it won't be me
 
7:32 PM
k
 
I'm currently buried too at the moment. Joy to working in an education livestreaming company during the time of covid.
 
7:51 PM
@Derick Yeah, my idea was more related to play with it as a study about the internals, but thanks for the hint
 
@Girgias No, the problem is that you simplify cannot use zend_string_equals_literal if the other side is not a value of the form "foo". It cannot come from a variable.
The existing strcmp usage there was right
 
Ah, okay it's doing some macro magic
Do you have an idea of a test case which would cover this branch?
 
Is that known that we don't have space left on Travis?

https://travis-ci.org/github/php/php-src/jobs/682548308
 
Yes, we've been joking about this a bit here, but it only happens on S390X, so I imagine it's something on Travis's side
 
morns
 
8:10 PM
Sorry, didn't follow that.

https://travis-ci.community/t/no-space-left-on-device-for-system-z/5954
 

« first day (3487 days earlier)      last day (1444 days later) »