add_002.phpt 307 B

12345678910111213141516171819
  1. --TEST--
  2. adding objects to arrays
  3. --FILE--
  4. <?php
  5. $a = array(1,2,3);
  6. $o = new stdclass;
  7. $o->prop = "value";
  8. $c = $a + $o;
  9. var_dump($c);
  10. echo "Done\n";
  11. ?>
  12. --EXPECTF--
  13. Notice: Object of class stdClass could not be converted to int in %s on line %d
  14. Fatal error: Unsupported operand types in %s on line %d