php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #73992 unable to compare closures
Submitted: 2017-01-25 12:56 UTC Modified: 2021-01-03 04:22 UTC
From: markrashi at mail dot com Assigned: cmb (profile)
Status: No Feedback Package: Scripting Engine problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
18 - 8 = ?
Subscribe to this entry?

 
 [2017-01-25 12:56 UTC] markrashi at mail dot com
Description:
------------
Would it be possible to add support for comparison operators on closures?

$a == $b would check if $a and $b will execute the same code and if they are both bound to the same $this and class scope?

thanks


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-12-23 16:55 UTC] cmb@php.net
-Status: Open +Status: Feedback -Type: Bug +Type: Feature/Change Request -Package: *General Issues +Package: Scripting Engine problem -Assigned To: +Assigned To: cmb
 [2020-12-23 16:55 UTC] cmb@php.net
> $a == $b would check if $a and $b will execute the same code […]

That's not possible in the general case, but may be possible for
userland function by comparing the opcode arrays; however, what is
the use case?
 [2021-01-03 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 11:01:28 2024 UTC