|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-02-18 10:49 UTC] cmb@php.net
-Status: Open
+Status: Verified
-Type: Bug
+Type: Documentation Problem
[2021-02-18 10:49 UTC] cmb@php.net
[2021-02-22 09:18 UTC] nikic@php.net
[2021-02-22 09:30 UTC] cmb@php.net
[2021-04-19 17:54 UTC] git@php.net
[2021-04-19 17:54 UTC] git@php.net
-Status: Verified
+Status: Closed
[2021-04-20 02:04 UTC] git@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 03:00:01 2025 UTC |
Description: ------------ In PHP 7, `assert` became a language construct and cannot be redefined as a user function. Typically language constructs can't be imported via use statements, however, it seems that `assert` can be imported via a use statement. I'm not sure if this is intentional or not for BC purposes. PHP throws a ParseError when trying to import other language constructs, such as `isset`, so I would expect importing `assert` to throw as well. Test script: --------------- // Works, unexpectedly namespace Foo { use function assert; } // Doesn't work, as expected namespace Foo { use function isset; }