ID:               24100
 Updated by:       [EMAIL PROTECTED]
 Reported By:      waxmop at sarcastic-horse dot com
-Status:           Open
+Status:           Wont fix
 Bug Type:         Feature/Change Request
 Operating System: linux
 PHP Version:      4.3.2
 New Comment:

The "endif;" stuff is old legacy syntax and is definitely not the
recommended way of doing things. For my part if can be removed for PHP
5... anyway, definitely not something we will add.


Previous Comments:
------------------------------------------------------------------------

[2003-06-09 13:21:18] waxmop at sarcastic-horse dot com

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 this bug report at http://bugs.php.net/?id=24100&edit=1

Reply via email to