php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70528 assert() with instanceof adds apostrophes around class name
Submitted: 2015-09-18 21:07 UTC Modified: -
From: php-bugs at majkl578 dot cz Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 7.0.0RC3 OS: Linux x86_64
Private report: No CVE-ID: None
 [2015-09-18 21:07 UTC] php-bugs at majkl578 dot cz
Description:
------------
In the script below there is a Foo\Bar class used in instanceof test inside assert().
When this assertion fails, warning/error is produced, but the class name is surrounded by apostrophes.

Test script:
---------------
<?php

namespace Foo;
class Bar {}

assert(new \stdClass instanceof Bar);

Expected result:
----------------
Warning: assert(): assert(new \stdClass() instanceof Bar) failed

Actual result:
--------------
Warning: assert(): assert(new \stdClass() instanceof 'Bar') failed

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-09-20 02:51 UTC] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=bb07905a4a34e3e7d6f1ebe94818dd88ba951dcb
Log: Fixed bug #70528 (assert() with instanceof adds apostrophes around class name)
 [2015-09-20 02:51 UTC] laruence@php.net
-Status: Open +Status: Closed
 [2015-09-20 02:52 UTC] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=bb07905a4a34e3e7d6f1ebe94818dd88ba951dcb
Log: Fixed bug #70528 (assert() with instanceof adds apostrophes around class name)
 [2015-09-29 13:10 UTC] ab@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=bb07905a4a34e3e7d6f1ebe94818dd88ba951dcb
Log: Fixed bug #70528 (assert() with instanceof adds apostrophes around class name)
 [2016-07-20 11:36 UTC] davey@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=bb07905a4a34e3e7d6f1ebe94818dd88ba951dcb
Log: Fixed bug #70528 (assert() with instanceof adds apostrophes around class name)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 10:01:29 2024 UTC