File tree Expand file tree Collapse file tree 6 files changed +44
-4
lines changed Expand file tree Collapse file tree 6 files changed +44
-4
lines changed Original file line number Diff line number Diff line change 29
29
(Laruence)
30
30
. Fixed bug #68252 (segfault in Zend/zend_hash.c in function
31
31
_zend_hash_del_el). (Laruence)
32
+ . Fixed bug #65598 (Closure executed via static autoload incorrectly marked as
33
+ static). (Nikita)
34
+ . Fixed bug #66811 (Cannot access static::class in lambda, writen outside of a
35
+ class). (Nikita)
36
+ . Fixed bug #69568 (call a private function in closure failed). (Nikita)
32
37
. Added PHP_INT_MIN constant. (Andrea)
33
38
. Added Closure::call() method. (Andrea)
34
39
. Implemented FR #38409 (parse_ini_file() looses the type of booleans). (Tjerk)
Original file line number Diff line number Diff line change 1
1
--TEST--
2
- Accessing self::FOO outside a class
2
+ Accessing self::FOO in a free function
3
3
--FILE--
4
4
<?php
5
- var_dump (self ::FOO );
5
+ function test () {
6
+ var_dump (self ::FOO );
7
+ }
6
8
?>
7
9
--EXPECTF--
8
10
Fatal error: Cannot use "self" when no class scope is active in %s on line %d
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ self etc. can be used in eval() in a class scope
3
+ --FILE--
4
+ <?php
5
+
6
+ class C {
7
+ const FOO = 1 ;
8
+ private static $ bar = 2 ;
9
+ public static function f () {
10
+ eval (<<<'PHP'
11
+ var_dump(self::FOO);
12
+ var_dump(self::$bar);
13
+ var_dump(self::class);
14
+ var_dump(static::class);
15
+ PHP
16
+ );
17
+ }
18
+ }
19
+
20
+ C::f ();
21
+
22
+ ?>
23
+ --EXPECT--
24
+ int(1)
25
+ int(2)
26
+ string(1) "C"
27
+ string(1) "C"
28
+
Original file line number Diff line number Diff line change @@ -1325,6 +1325,11 @@ static inline zend_bool zend_is_scope_known() /* {{{ */
1325
1325
return 0 ;
1326
1326
}
1327
1327
1328
+ if (!CG (active_op_array )-> function_name ) {
1329
+ /* A file/eval will be run in the including/eval'ing scope */
1330
+ return 0 ;
1331
+ }
1332
+
1328
1333
if (!CG (active_class_entry )) {
1329
1334
/* Not being in a scope is a known scope */
1330
1335
return 1 ;
Original file line number Diff line number Diff line change @@ -1636,7 +1636,7 @@ zend.assertions = 1
1636
1636
1637
1637
[mbstring]
1638
1638
; language for internal character representation.
1639
- ; This affects mb_send_mail() and mbstrig .detect_order.
1639
+ ; This affects mb_send_mail() and mbstring .detect_order.
1640
1640
; http://php.net/mbstring.language
1641
1641
;mbstring.language = Japanese
1642
1642
Original file line number Diff line number Diff line change @@ -1636,7 +1636,7 @@ zend.assertions = -1
1636
1636
1637
1637
[mbstring]
1638
1638
; language for internal character representation.
1639
- ; This affects mb_send_mail() and mbstrig .detect_order.
1639
+ ; This affects mb_send_mail() and mbstring .detect_order.
1640
1640
; http://php.net/mbstring.language
1641
1641
;mbstring.language = Japanese
1642
1642
You can’t perform that action at this time.
0 commit comments