Submitted by Jozsef on January 11, 2011 - 10:50pm function foo($year = date('Y')) { // this is invalid} So, how should do it? define('THIS_YEAR', date('Y'));function bar($year = THIS_YEAR) { // this is valid}Blog categories: Programming Web developmentBlog tags: programming PHP web Add new comment Your name * E-mail * The content of this field is kept private and will not be shown publicly. Homepage Subject Comment * More information about text formats Text format Full HTMLFiltered HTMLPlain text Full HTMLCode snippets in <code>...</code> or <source>...</source> automatically will be pretty printed.Lines and paragraphs break automatically.Filtered HTMLAllowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <br> <h1> <h2> <h3> <h4> <h5> <h6> <img>Lines and paragraphs break automatically.Plain textNo HTML tags allowed.Web page addresses and e-mail addresses turn into links automatically.Lines and paragraphs break automatically. By submitting this form, you accept the .Preview
Add new comment