Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98806 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72227 invoked from network); 15 Apr 2017 15:25:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Apr 2017 15:25:12 -0000 Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Received: from [82.113.146.227] ([82.113.146.227:47480] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 92/70-61625-45B32F85 for ; Sat, 15 Apr 2017 11:25:08 -0400 Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id F3B3010C64B; Sat, 15 Apr 2017 16:25:04 +0100 (BST) Date: Sat, 15 Apr 2017 16:25:04 +0100 (BST) X-X-Sender: derick@singlemalt.home.derickrethans.nl To: Nikita Popov cc: PHP Developers Mailing List Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Inconsistency in line numbers. From: derick@php.net (Derick Rethans) Hi Nikita, Through Xdebug bug #1413 (https://bugs.xdebug.org/view.php?id=1413), I noticed that behaviour with class constants changed between PHP 7.1.3 and PHP 7.1.4. I *believe* it is because of the fix for issue #69676 (https://bugs.php.net/bug.php?id=69676) that got fixed in PHP 7.1.4. With OPcache loaded, the INIT_ARRAY and further opcodes are relisted as being on line 15 instead of line 17. Although, I would probably argue that INIT_ARRAY should really be on line 13 (the opening [). Without OPcache loaded, in PHP 7.1.3, FETCH_CLASS_CONSTANT is on line 15, and the INIT_ARRAY and further opcodes are on line 17. In PHP 7.1.4, they are all on line 15 - with 17 no longer showing up. I believe, the behaviour with and without OPcache should be the same, and I would argue that the correct result would need to be that FETCH_CLASS_CONSTANT (if still present, OPcache optimises it out) should be on line 15, the INIT_ARRAY on line 13, and the SEND_VAL_EX and further, are on line 17. Code ==== 1 true 16 17 ], $params); 18 } 19 } PHP 7.1.3 (no OPcache) ====================== filename: /tmp/xdebug-bug-1/lib/Required2.php function name: normalize_params number of ops: 14 compiled vars: !0 = $params line #* E I O op fetch ext return operands ------------------------------------------------------------------------------------- 11 0 E > EXT_NOP 1 RECV !0 13 2 EXT_STMT 3 INIT_NS_FCALL_BY_NAME 4 EXT_FCALL_BEGIN 15 5 FETCH_CLASS_CONSTANT ~1 'OPTION_STOP_ON_ERROR' 17 6 INIT_ARRAY ~2 , ~1 7 SEND_VAL_EX ~2 8 SEND_VAR_EX !0 9 DO_FCALL_BY_NAME 10 EXT_FCALL_END 11 > RETURN $3 18 12* EXT_STMT 13* > RETURN null PHP 7.1.3 (OPcache) ====================== filename: /tmp/xdebug-bug-1/lib/Required2.php function name: normalize_params number of ops: 11 compiled vars: !0 = $params line #* E I O op fetch ext return operands ------------------------------------------------------------------------------------- 11 0 E > EXT_NOP 1 RECV !0 13 2 EXT_STMT 3 INIT_NS_FCALL_BY_NAME 4 EXT_FCALL_BEGIN 17 5 INIT_ARRAY ~1 , 'stop_on_error' 6 SEND_VAL_EX ~1 7 SEND_VAR_EX !0 8 DO_FCALL 0 $1 9 EXT_FCALL_END 10 > RETURN $1 PHP 7.1.4 (no OPcache) ====================== filename: /tmp/xdebug-bug-1/lib/Required2.php function name: normalize_params number of ops: 14 compiled vars: !0 = $params line #* E I O op fetch ext return operands ------------------------------------------------------------------------------------- 11 0 E > EXT_NOP 1 RECV !0 13 2 EXT_STMT 3 INIT_NS_FCALL_BY_NAME 4 EXT_FCALL_BEGIN 15 5 FETCH_CLASS_CONSTANT ~1 'OPTION_STOP_ON_ERROR' 6 INIT_ARRAY ~2 , ~1 7 SEND_VAL_EX ~2 8 SEND_VAR_EX !0 9 DO_FCALL_BY_NAME 10 EXT_FCALL_END 11 > RETURN $3 18 12* EXT_STMT 13* > RETURN null PHP 7.1.4 (OPcache) ====================== filename: /tmp/xdebug-bug-1/lib/Required2.php function name: normalize_params number of ops: 11 compiled vars: !0 = $params line #* E I O op fetch ext return operands ------------------------------------------------------------------------------------- 11 0 E > EXT_NOP 1 RECV !0 13 2 EXT_STMT 3 INIT_NS_FCALL_BY_NAME 4 EXT_FCALL_BEGIN 15 5 INIT_ARRAY ~1 , 'stop_on_error' 6 SEND_VAL_EX ~1 7 SEND_VAR_EX !0 8 DO_FCALL 0 $1 9 EXT_FCALL_END 10 > RETURN $1 cheers, Derick -- https://derickrethans.nl | https://xdebug.org | https://dram.io Like Xdebug? Consider a donation: https://xdebug.org/donate.php twitter: @derickr and @xdebug