Bug #70698 [Opn->Dup]: Inline method invocations as parameter to non-existant constructors are ignored

From: Date: Mon, 12 Oct 2015 20:44:56 +0000
Subject: Bug #70698 [Opn->Dup]: Inline method invocations as parameter to non-existant constructors are ignored
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196569@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70698&edit=1 ID: 70698 Updated by: requinix@php.net Reported by: sisve at devhost dot se Summary: Inline method invocations as parameter to non-existant constructors are ignored -Status: Open +Status: Duplicate Type: Bug -Package: Unknown/Other Function +Package: Class/Object related Operating System: All PHP Version: 7.0.0RC4 Block user comment: N Private report: N New Comment: bug #54162 bug #67829 http://marc.info/?l=php-internals&m=140799767430981 Currently it's intended behavior - an optimization. Previous Comments: ------------------------------------------------------------------------ [2015-10-12 13:09:33] sisve at devhost dot se Description: ------------ Inline method invocations whose return values are passed to a non-existant constructor seems to be optimized away. This happens for PHP 5.4.8 to 7.0.0RC4 (all versions hosted by 3v4l.org). Reference: https://3v4l.org/GrZ9p Test script: --------------- <?php class MyClass { } new MyClass(die('Death!')); Expected result: ---------------- Script execution should end with "Death!" Actual result: -------------- Nothing is outputted. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70698&edit=1

« previous php.bugs (#196569) next »