Skip to content

u/philig

In this archive from Apr 2010 to May 2012

0
posts
6
comments
0
media
6
score

Regarding array_merge, If your input array has numerical keys they will be destroyed and replaced with zero-indexed keys.

From the manual

$array1 = array();
$array2 = array(1 => "data");
$result = array_merge($array1, $array2);

Array
(
    [0] => data
)
1 points

If you are concerned about making many objects and only using them once or something, make the function static. This will allow you to write something like Thread::getPosts($threadid); and you will not have to instantiate a new Thread object

2 points

End of this list.

Back to top

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.