The PHP language files should support declaring a function like function processData() using the funky phrase. Possible solutions:
- Use a code function modifier like
global funky process data to print function processData().
- Change default behavior for the
funky process data phrase in PHP to match JavaScript's default behavior for the same phrase, which prints function processData().
PHP is most commonly used in an object-oriented way, so it may be more useful for the default behavior for funky process data to remain global function processData(). PHP developers may write something like public function processData() more often day-to-day than function processData().
One downside to keeping this current default behavior is that it is not the default behavior for JavaScript, so users may not be expecting different default behavior between two languages. Another reason to go with option 2 is that there is already support for the public modifier using pub funky.
I am open to suggestions. I've been writing PHP for 13 years and I think Option 2 is the more intuitive choice, so I will submit a pull requested for this issue next month that implements Option 2.
The PHP language files should support declaring a function like
function processData()using thefunkyphrase. Possible solutions:global funky process datato printfunction processData().funky process dataphrase in PHP to match JavaScript's default behavior for the same phrase, which printsfunction processData().PHP is most commonly used in an object-oriented way, so it may be more useful for the default behavior for
funky process datato remainglobal function processData(). PHP developers may write something likepublic function processData()more often day-to-day thanfunction processData().One downside to keeping this current default behavior is that it is not the default behavior for JavaScript, so users may not be expecting different default behavior between two languages. Another reason to go with option 2 is that there is already support for the
publicmodifier usingpub funky.I am open to suggestions. I've been writing PHP for 13 years and I think Option 2 is the more intuitive choice, so I will submit a pull requested for this issue next month that implements Option 2.