3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<!DOCTYPE html> <html> <body> <?php $a1=(object) array("flagname"=>"LTV Under 50","b"=>"green"); $a2=(object) array("flagname"=>"blue","b"=>"yellow"); $a1 = array_merge((object)$a1,(object)$a2); print_r($a1); ?> </body> </html>
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
<!DOCTYPE html> <html> <body> Warning: array_merge(): Argument #1 is not an array in /in/JXZF0 on line 8 </body> </html>
Output for hhvm-3.10.0 - 3.12.0
<!DOCTYPE html> <html> <body> Warning: array_merge() expects parameter 1 to be array, object given in /in/JXZF0 on line 8 </body> </html>
Output for 5.0.0 - 5.2.17
<!DOCTYPE html> <html> <body> Warning: array_merge(): Argument #1 is not an array in /in/JXZF0 on line 8 Warning: array_merge(): Argument #2 is not an array in /in/JXZF0 on line 8 </body> </html>
Output for 4.3.0 - 4.4.9
<!DOCTYPE html> <html> <body> Array ( [flagname] => blue [b] => yellow ) </body> </html>