Instead of directly writing to stdout. This allows doing a print_r
into a string, without using output buffering.
The motivation for this is bug #67467: print_r() in return mode
will still dump the string to stdout (causing a potential information
leak) if a fatal error occurs.
Squashed commit of the following:
commit e05d3b6732
Author: Andrea Faulds <ajf@ajf.me>
Date: Wed Mar 30 01:43:35 2016 +0100
UPGRADING and NEWS
commit 6caf1d4585
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Mar 20 21:18:33 2016 +0000
Fixes
commit 6dadb1b0ef
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Feb 14 02:15:01 2016 +0000
Add test for numeric string errors in assignment
commit bd5f04e8dd
Author: Andrea Faulds <ajf@ajf.me>
Date: Sat Feb 13 23:53:05 2016 +0000
Add test for numeric string errors
commit c72e92f16d
Author: Andrea Faulds <ajf@ajf.me>
Date: Tue Jan 26 23:28:33 2016 +0000
Add test for scientific notation in integer operations
commit d94c08852d
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Feb 14 01:25:57 2016 +0000
Disable optimiser evaluation for numeric string errors
commit 30ee954ed1
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Feb 14 01:46:25 2016 +0000
fixup
commit a6403b79e0
Author: Andrea Faulds <ajf@ajf.me>
Date: Sat Feb 13 22:00:27 2016 +0000
Do not convert error-causing numeric strings ahead-of-time
commit f9dc354014
Author: Andrea Faulds <ajf@ajf.me>
Date: Sat Feb 13 19:15:38 2016 +0000
Disable compile-time evaluation for numeric string errors
commit e05b0cc849
Author: Andrea Faulds <ajf@ajf.me>
Date: Fri Feb 5 11:42:26 2016 +0000
Make _zval_get_long_func_noisy function for inlining
commit 84d66321a5
Author: Andrea Faulds <ajf@ajf.me>
Date: Tue Jan 26 23:10:00 2016 +0000
Update tests
commit 5ac4a0cc4b
Author: Andrea Faulds <ajf@ajf.me>
Date: Tue Jan 26 22:08:19 2016 +0000
Use is_numeric_string_ex for zval_get_long etc.
commit c21f088485
Author: Andrea Faulds <ajf@ajf.me>
Date: Thu Jan 7 21:13:04 2016 +0000
Update tests
commit 63e214cf81
Author: Andrea Faulds <ajf@ajf.me>
Date: Wed Jan 6 00:28:01 2016 +0000
Warn on non-/bad numeric strings in arithmetic
Squashed commit of the following:
commit f11ca0e7a5
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Dec 8 12:38:42 2015 +0300
Fixed test expectation
commit 211f873f54
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Dec 8 12:28:38 2015 +0300
Embed zend_class_constant.flags into zend_class_constants.value.u2.access_flags
commit 51deab84b2
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Dec 7 11:18:55 2015 +0300
Fixed issues found by Nikita
commit 544dbd5b47
Author: Dmitry Stogov <dmitry@zend.com>
Date: Sat Dec 5 02:41:05 2015 +0300
Refactored immplementation of https://wiki.php.net/rfc/class_const_visibility
@reeze created an RFC here and I emailed internals here and didn't get any responses positive/negative.
of course we can try to refactor the current flow to make this error can
be catched safly.
but as 7.0.0 is releasing, I don't think a refactor is safe now. and
actually I don't see any gain to make this catchable.
so let's keep this be consistent with 5.6 and safe for now
This fail has nothing together with any changes in run-tests.php
Using run-tests.php from the 5.5 branch brings the same result. So
merely it is about how PHP7 handles and buffers errors.
We currently don't show the argument at which the error actually
occured in the trace - should probably either add it or don't
display args on incomplete frames altogether, otherwise this'll
probably be confusing.
This implements a reduced variant of #1226 with just the following
change:
-Fatal error: Uncaught exception 'EngineException' with message 'Call to private method foo::bar() from context ''' in %s:%d
+Fatal error: Uncaught EngineException: Call to private method foo::bar() from context '' in %s:%d
The '' wrapper around messages is very weird if the exception
message itself contains ''. Futhermore having the message wrapped
in '' doesn't work for the "and defined" suffix of
TypeExceptions.
TypeException stays as-is for now because it uses messages that are
incompatible with the way exception messages are displayed.
closure_038.phpt and a few others now show that we're generating
too many exceptions for compound operations on undefined properties
-- this needs to be fixed in a followup.