From: waxmop at sarcastic-horse dot com
Operating system: linux
PHP version: 4.3.2
PHP Bug Type: Feature/Change Request
Bug description: Please add "endclass", "endfunction" keywords
I really like this alternative syntax:
<?php if($a): ?>
<h1>A is true.</h1>
<?php endif; ?>
I thought I was free from using curly brackets "{}", until I realized that
I'd still have to define classes and functions in the old style:
<?php
class Old
{
var $val;
function Old($num=0)
{
print "<p>Created an object";
if ($num > 0):
print "this is mismatched syntax!";
endif;
}
}
?>
It seems a little jarring to have to switch back and forth between the
"{}" and the alternative style in a class definition.
It would be nice to be able to create an object with the alternative style
syntax rather than with curly brackets. It could look a little like
this:
<?php
class Noo:
var $val;
function Noo():
print "<p>Created a noo object";
endfunction;
endclass;
?>
Wouldn't that be great? My apologies if this is a redundant submission.
I searched for endclass and endfunction, but couldn't find them.
--
Edit bug report at http://bugs.php.net/?id=24100&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=24100&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=24100&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=24100&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24100&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=24100&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=24100&r=support
Expected behavior: http://bugs.php.net/fix.php?id=24100&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=24100&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=24100&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=24100&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24100&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=24100&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=24100&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=24100&r=gnused