Annotation of embedaddon/php/Zend/tests/closure_015.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Closure 015: converting to string/unicode
                      3: --FILE--
                      4: <?php
                      5: set_error_handler('myErrorHandler', E_RECOVERABLE_ERROR);
                      6: function myErrorHandler($errno, $errstr, $errfile, $errline) {
                      7:   echo "Error: $errstr at $errfile($errline)\n";
                      8:   return true;
                      9: }
                     10: $x = function() { return 1; };
                     11: print (string) $x;
                     12: print "\n";
                     13: print $x;
                     14: print "\n";
                     15: ?>
                     16: --EXPECTF--
                     17: Error: Object of class Closure could not be converted to string at %sclosure_015.php(8)
                     18: 
                     19: Error: Object of class Closure could not be converted to string at %sclosure_015.php(10)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>