xref: /PHP-8.0/Zend/tests/bug77627.phpt (revision cfd4d3df)
1--TEST--
2Fix for #77627 method_exists on Closure::__invoke without object returns false
3--FILE--
4<?php
5var_dump(method_exists(Closure::class, "__invoke"));
6var_dump(method_exists(Closure::class, "__INVOKE"));
7
8$closure = function(){};
9
10var_dump(method_exists($closure, "__INVOKE"));
11?>
12--EXPECT--
13bool(true)
14bool(true)
15bool(true)
16