|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70698 Inline method invocations as parameter to non-existant constructors are ignored
Submitted: 2015-10-12 13:09 UTC Modified: 2015-10-12 20:44 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: sisve at devhost dot se Assigned:
Status: Duplicate Package: Class/Object related
PHP Version: 7.0.0RC4 OS: All
Private report: No CVE-ID: None
 [2015-10-12 13:09 UTC] sisve at devhost dot se
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

Test script:

class MyClass {

new MyClass(die('Death!'));

Expected result:
Script execution should end with "Death!"

Actual result:
Nothing is outputted.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-10-12 20:44 UTC]
-Status: Open +Status: Duplicate -Package: Unknown/Other Function +Package: Class/Object related
 [2015-10-12 20:44 UTC]
bug #54162
bug #67829

Currently it's intended behavior - an optimization.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Dec 03 19:05:55 2022 UTC