Conversation
Member
Author
|
the invalid free one has been fixed in 98a36c8 |
Contributor
|
👍 Also consider this syntax: |
Member
Author
|
invalid reads and invliad free must be fixed.. |
Contributor
|
On windows all tests pass for me, mazeltov! :) |
Member
Author
|
@weltling thanks :) |
|
Will this allow for immediately calling closures from require/include calls as well? Something like this: <?php
// getItem.php
return function(MongoDB $db) {
return function($name) use($db) {
return $db->findOne(['name' => $name]);
};
};
?>
<?php
// test.php
$db = (new Mongo())->myDatabase;
$getItem = (require 'getItem.php')($db); // This is the the line relevant to the question
$item = $getItem('test');
?> |
Member
|
@nubs Yes. |
|
Awesome, I wasn't sure if this would apply to a language construct or not, glad to hear that it would. |
Contributor
|
Good job guys, have you already written a RFC and proposed it? |
Member
Author
|
Nope, since this PR is based on @nikic 's , I assume he will write a RFC. then I will merge this PR into his proposal :) |
Contributor
|
What happened to this amazing feature? |
Member
Author
|
hmmm, I closed it by accident..... .:< |
Conflicts: Zend/zend_vm_execute.h
Member
Author
|
close this as it will be implemented in uniform variable style by @nikic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This will allow such syntax:
this patch is refactored, in order to based on the @nikic 's instance call one(#291). maybe we can merge them together..
btw: there are some invalid reads report while run with valgrind,, but it seems introduces by nikic's patch,
I will keep looking them.