|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-11-15 01:37 UTC] johannes@php.net
-Status: Open
+Status: Bogus
[2011-11-15 01:37 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 17:00:01 2025 UTC |
Description: ------------ There is no way to create an "unset" function in a class even if the class is in it's own namespace. This should be corrected/changed. myObject->unset() should not conflict with unset() Examples: <?php class unsetTest{ function unset($whatever){ } } //Parse error: syntax error, unexpected 'unset' (T_UNSET), expecting identifier (T_STRING) in E:\_www\x.php on line # ============================================== <?php namespace whatever; class unsetTest{ function unset($whatever){ } } //Parse error: syntax error, unexpected 'unset' (T_UNSET), expecting identifier (T_STRING) in E:\_www\x.php on line # Test script: --------------- <?php class unsetTest{ function unset($whatever){ } } Expected result: ---------------- A happy function in my class that will do what it is told. Actual result: -------------- //Parse error: syntax error, unexpected 'unset' (T_UNSET), expecting identifier (T_STRING) in E:\_www\x.php on line # Seemingly conflicting with the native PHP unset.