A weird looking assignment operator

While digging through some Wordpress PHP, I found this:

=&

I’ve never seen that one before. In case you need more context, here was the function in question:

$pdfs =& get_children($args);

get_children(), as I’m sure you already guessed, is a preibuilt WP function.

So what does ‘=&’ do anyways?

Thanks for that!

So if I read this correctly, based on my example, ‘$pdfs’ and ‘get_children($args)’ are now two names for the same thing, by using =&

It means the function is returning by reference. You may want to take a look the php manual on references.