Jump to content

Globals and Valid Use...


mem0ri

Recommended Posts

Right...my big question is on the: function myFunction($y = $x) part...

...because the global hasn't been declared within the function yet...and is operating as the default value of information passed into the variable...


...additional...slightly related question...let's say I have:

function myFunction($y = $x, $b = "string", $n = 1)

...and I want to call the function with somethin' like a myFunction("string")...where it will only change the default value of $b...leaving $y and $n alone...

...basically...is there a way to explicitly address to which value a function call sends its arguments?
Link to comment
https://forums.phpfreaks.com/topic/4219-globals-and-valid-use/#findComment-14665
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.