- iPhone (2)
- Learning (42)
- Linux (4)
- Debian (1)
- Mac Terminal / Linux (5)
- Other Stuff (1)
- Programming (67)
- Slim Framework (1)
- WordPress (5)
$arr = [ 'foo' => 'bar', 'faz' => 'baz' ]; array_multisort(array_column($arr, 'value'), SORT_ASC, $arr);
You can sort an associative array with one line of code as I did above. As a result, the array becomes sorted by the keys:
[ 'faz' => 'baz', 'foo' => 'bar' ]
If you’re like me, you have probably had this happen. You go to click on one of the many tabs you have open in PHPStorm, only to accidentally click the X, and close it. ARGH!
Today I found a way to alleviate that pain. You can turn off the X!
Now, to close a tab, you must either hit the keyboard shortcut, or right-click it. Either of those will be a deliberate action.