Hi,

What happened to this RFC? This is a really great idea for php.

For example this function:

function getIdByTitle($title, $insert = false) {
        // find record
        // If no record find and $insert === true, insert new record and return 
the id
        // Return false
}

Reading over some old code, this way it would be a lot easier to understand 
what that second parameter boolean = true is: 
        getIdByTitle('sample', insert = true)

than this way: 
        getIdByTitle('sample', true)


Also great for skipping default parameters.


About syntax: $insert => true seems kind of confusing: 
        $insert = true;
        getIdByTitle('sample', $insert => $insert)

My preference would be either - getIdByTitle('sample', insert = $insert) or 
getIdByTitle('sample', insert: $insert) with no parameter name prefixes.

—---
Gints Murāns

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to