Polyglot array_extend() function for Javascript and PHP
You may want to replace object key access notation with dot notation.

For example, instead of the following.

$object['keys']($elem);


Write this.

Object.keys($elem);


This works, because Object is interpreted as a constant, dot as concatenation, and keys($elem) as function call. Use of undefined constant doesn't warn if the code with it is not executed. Unknown functions don't error if they aren't called.