Commit:    212cfb95d1c7eb7202e1386294808eceef386b78
Author:    Xinchen Hui <larue...@php.net>         Mon, 13 Aug 2012 11:03:35 
+0800
Parents:   be818e7ea7a7627ab12faa70d9e70a85c823f738
Branches:  PHP-5.4

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=212cfb95d1c7eb7202e1386294808eceef386b78

Log:
more test script for #62328

Bugs:
https://bugs.php.net/62328

Changed paths:
  A  ext/spl/tests/bug62328.phpt


Diff:
diff --git a/ext/spl/tests/bug62328.phpt b/ext/spl/tests/bug62328.phpt
new file mode 100644
index 0000000..33a8aee
--- /dev/null
+++ b/ext/spl/tests/bug62328.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug #62328 (cast_object takes precedence over __toString)
+--CREDITS--
+leight at gmail dot com
+--FILE--
+<?php
+
+class SplFileInfo62328 extends SplFileInfo
+{
+    public function __toString()
+    {
+        return '__toString';
+    }
+}
+
+$fi = new SplFileInfo62328(__FILE__);
+
+echo (string)$fi . PHP_EOL;
+echo (string)$fi->__toString() . PHP_EOL;
+
+?>
+--EXPECT--
+__toString
+__toString


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to