Skip to content

u/vihil

In this archive from Jun 2010 to Mar 2025

1
posts
29
comments
0
media
99
score

Top posts

Top comments

You talk confidence but prove otherwise with being bitter about less expensive gear.

I bet you think everyone that asks what you are shooting with is an asshole trying to belittle you because he is better due to his gear. You shouldn't. There are people that are interested in your gear (even if theirs is more expensive) and curious what you are doing with it. Mostly just socializing. No need to get all defensive.

24 points

This one also has the often forgotten and nasty side effect that after the foreach is over, the very last element of the array is now actually a reference to the $string variable.

$strs = array('one', 'two', 'three');
foreach ($strs as &$s) {
   // …
}
var_dump($strs);
// array(0 => string 'one', 1=> string 'two', 2=> &string 'three');

So whenever you assign anything to $s somewhere in the same scope again, it will change your last item of the $strs array. Most prominently this happens if you decide to reuse it as iterator variable, for example in foreach (array(1,2,3) as $s) {}.

$strs[2] equals now &int 3.

17 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.