Annotation of embedaddon/php/ext/reflection/tests/bug64936.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: ReflectionMethod::getDocComment() uses left over doc comment from previous scanner run
! 3: --INI--
! 4: opcache.save_comments=1
! 5: opcache.load_comments=1
! 6: --FILE--
! 7: <?php
! 8:
! 9: function strip_doc_comment($c)
! 10: {
! 11: if (!strlen($c) || $c === false) return $c;
! 12: return trim(substr($c, 3, -2));
! 13: }
! 14:
! 15: token_get_all("<?php\n/**\n * Foo\n */"); // doc_comment compiler global now contains this Foo comment
! 16:
! 17: eval('class A { }'); // Could also be an include of a file containing similar
! 18:
! 19: $ra = new ReflectionClass('A');
! 20: var_dump(strip_doc_comment($ra->getDocComment()));
! 21:
! 22: token_get_all("<?php\n/**\n * Foo\n */"); // doc_comment compiler global now contains this Foo comment
! 23:
! 24: include('bug64936.inc');
! 25:
! 26: $rb = new ReflectionClass('B');
! 27: var_dump(strip_doc_comment($rb->getDocComment()));
! 28:
! 29: ?>
! 30: ===DONE===
! 31: --EXPECT--
! 32: bool(false)
! 33: bool(false)
! 34: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>