summaryrefslogtreecommitdiff
path: root/tests/lang/compare_objects_basic2.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lang/compare_objects_basic2.phpt')
-rw-r--r--tests/lang/compare_objects_basic2.phpt24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/lang/compare_objects_basic2.phpt b/tests/lang/compare_objects_basic2.phpt
new file mode 100644
index 0000000..7e4786c
--- /dev/null
+++ b/tests/lang/compare_objects_basic2.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Test object compare when object handler different
+--FILE--
+
+<?php
+
+//Set the default time zone
+date_default_timezone_set("Europe/London");
+
+echo "Simple test comparing two objects with different compare callback handler\n";
+
+class X {
+}
+
+$obj1 = new X();
+$obj2 = new DateTime(("2009-02-12 12:47:41 GMT"));
+
+var_dump($obj1 == $obj2);
+?>
+===DONE===
+--EXPECTF--
+Simple test comparing two objects with different compare callback handler
+bool(false)
+===DONE===