From c22281225d04ebc374f87c96f5cf3a069c546535 Mon Sep 17 00:00:00 2001 From: Johannes Bader Date: Mon, 30 Apr 2018 09:49:21 -0700 Subject: [PATCH 1/2] inc dec testcase --- .../Postfix_Operators/post_increment_and_decrement.php | 2 +- .../Postfix_Operators/post_increment_and_decrement.php.expect | 2 +- .../Expressions/Unary_Operators/pre-increment_and_decrement.php | 2 +- .../Unary_Operators/pre-increment_and_decrement.php.expect | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Expressions/Postfix_Operators/post_increment_and_decrement.php b/tests/Expressions/Postfix_Operators/post_increment_and_decrement.php index a80319f..9c33c19 100644 --- a/tests/Expressions/Postfix_Operators/post_increment_and_decrement.php +++ b/tests/Expressions/Postfix_Operators/post_increment_and_decrement.php @@ -17,7 +17,7 @@ function main(): void { echo "\n=== int 0x80000000 ===\n"; - $v = 0x8000000000000000; var_dump($v++); var_dump($v--); + $v = 0x8000000000000000; var_dump($v--); var_dump($v++); echo "\n=== float 12.345 ===\n"; diff --git a/tests/Expressions/Postfix_Operators/post_increment_and_decrement.php.expect b/tests/Expressions/Postfix_Operators/post_increment_and_decrement.php.expect index b533a50..d8cd70c 100644 --- a/tests/Expressions/Postfix_Operators/post_increment_and_decrement.php.expect +++ b/tests/Expressions/Postfix_Operators/post_increment_and_decrement.php.expect @@ -7,8 +7,8 @@ int(9223372036854775807) int(-9223372036854775808) === int 0x80000000 === -int(9223372036854775807) int(-9223372036854775808) +int(9223372036854775807) === float 12.345 === float(12.345) diff --git a/tests/Expressions/Unary_Operators/pre-increment_and_decrement.php b/tests/Expressions/Unary_Operators/pre-increment_and_decrement.php index 11953b9..2cc52c9 100644 --- a/tests/Expressions/Unary_Operators/pre-increment_and_decrement.php +++ b/tests/Expressions/Unary_Operators/pre-increment_and_decrement.php @@ -17,7 +17,7 @@ function main(): void { echo "\n=== int 0x80000000 ===\n"; - $v = 0x8000000000000000; var_dump(++$v); var_dump(--$v); + $v = 0x8000000000000000; var_dump(--$v); var_dump(++$v); echo "\n=== float 12.345 ===\n"; diff --git a/tests/Expressions/Unary_Operators/pre-increment_and_decrement.php.expect b/tests/Expressions/Unary_Operators/pre-increment_and_decrement.php.expect index 4255a2a..1045dd4 100644 --- a/tests/Expressions/Unary_Operators/pre-increment_and_decrement.php.expect +++ b/tests/Expressions/Unary_Operators/pre-increment_and_decrement.php.expect @@ -7,8 +7,8 @@ int(-9223372036854775808) int(9223372036854775807) === int 0x80000000 === -int(-9223372036854775808) int(9223372036854775807) +int(-9223372036854775808) === float 12.345 === float(13.345) From 1937939c67fd4271e817debf07adadd77a34ab75 Mon Sep 17 00:00:00 2001 From: Johannes Bader Date: Mon, 30 Apr 2018 10:46:27 -0700 Subject: [PATCH 2/2] typo --- spec/05-types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/05-types.md b/spec/05-types.md index 9921918..b4ae386 100644 --- a/spec/05-types.md +++ b/spec/05-types.md @@ -603,7 +603,7 @@ A *closure* is an object that encapsulates a function with a given argument list and return type. The function can then be called through that object by using the [function-call operator](10-expressions.md#function-call-operator). -Note: The library functions [`class_meth`](http://www.php.net/class_meth), [`fun1](http://www.php.net/fun), [`inst_meth`](http://www.php.net/inst_meth), and [`meth_caller`](http://www.php.net/meth_caller) allow a string constant containing the name of +Note: The library functions [`class_meth`](http://www.php.net/class_meth), [`fun1`](http://www.php.net/fun), [`inst_meth`](http://www.php.net/inst_meth), and [`meth_caller`](http://www.php.net/meth_caller) allow a string constant containing the name of a function to be turned into a closure. **Examples**