Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment Re:So... (Score 1) 307

With the argument ordering stuff, they could just do what they did with microtime() where they added the extra argument so you could call microtime(true) instead of that list($sec, $usec) = microtime() crap.

Can't remember one of the backwards ones off the top of my head, but using in_array as an example,
bool in_array ( mixed $needle, array $haystack [, bool $strict] )
can become
bool in_array ( mixed $needle, array $haystack [, bool $strict, bool $swapNeedleAndHaystack] )

and a PHP warning can be raised if you don't pass the $swapNeedleAndHaystack argument warning that functionality for this method will switch in PHP 7 and will throw an error if it isn't passed, then in PHP 8 it can be removed entirely so it looks like this:
bool in_array ( mixed $haystack, array $needle [, bool $strict] )

Again, I'm not sure if in_array() is one of the backwards ones and I can't think of one off the top of my head, it's just an example.

Slashdot Top Deals

Suggest you just sit there and wait till life gets easier.

Working...