com php-src: Added test. Invalid usage doesn't affect escape_satte of arrays/objects and shouldn't prev ent SCCP on "proper" paths.: ext/opcache/test
s/opt/sccp_022.phpt

From: Date: Wed, 13 Sep 2017 21:09:28 +0000
Subject: com php-src: Added test. Invalid usage doesn't affect escape_satte of arrays/objects and shouldn't prev ent SCCP on "proper" paths.: ext/opcache/test
s/opt/sccp_022.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-99427@lists.php.net to get a copy of this message
Commit: 0a86f159f435b7f9c34105516a80a30db534d23a Author: Dmitry Stogov <dmitry@zend.com> Thu, 14 Sep 2017 00:09:28 +0300 Parents: 8e2842c30648c9f553702beb51e828176059b029 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0a86f159f435b7f9c34105516a80a30db534d23a Log: Added test. Invalid usage doesn't affect escape_satte of arrays/objects and shouldn't prevent SCCP on "proper" paths. Changed paths: A ext/opcache/tests/opt/sccp_022.phpt Diff: diff --git a/ext/opcache/tests/opt/sccp_022.phpt b/ext/opcache/tests/opt/sccp_022.phpt new file mode 100644 index 0000000..64ff8dd --- /dev/null +++ b/ext/opcache/tests/opt/sccp_022.phpt @@ -0,0 +1,39 @@ +--TEST-- +SCCP 022: Invailid types +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.optimization_level=-1 +opcache.opt_debug_level=0x20000 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function foo(int $x) { + $a[0] = $x; + $a[1] = 5; + echo $a[1]; + $a->foo = 5; + echo $a[1]; +} +?> +--EXPECTF-- +$_main: ; (lines=1, args=0, vars=0, tmps=0) + ; (after optimizer) + ; %ssccp_022.php:1-10 +L0: RETURN int(1) + +foo: ; (lines=11, args=1, vars=2, tmps=1) + ; (after optimizer) + ; %ssccp_022.php:2-8 +L0: CV0($x) = RECV 1 +L1: ASSIGN_DIM CV1($a) int(0) +L2: OP_DATA CV0($x) +L3: ASSIGN_DIM CV1($a) int(1) +L4: OP_DATA int(5) +L5: ECHO int(5) +L6: ASSIGN_OBJ CV1($a) string("foo") +L7: OP_DATA int(5) +L8: V2 = FETCH_DIM_R CV1($a) int(1) +L9: ECHO V2 +L10: RETURN null \ No newline at end of file

« previous php.cvs (#99427) next »