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/…
@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 :/
@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
I 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 ...
@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.
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...
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
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
@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 ?
@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.