php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74169 php still can't do anything right: unable to change types in overridden methods
Submitted: 2017-02-26 06:13 UTC Modified: 2017-02-26 12:10 UTC
From: deadlymark at usa dot com Assigned:
Status: Duplicate Package: Scripting Engine problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: deadlymark at usa dot com
New email:
PHP Version: OS:

 

 [2017-02-26 06:13 UTC] deadlymark at usa dot com
Description:
------------
i am so pissed by it. we were so excited to write php 7 only code, but yet again php failed to provide a feature complete result and we are still forced to use annotations. changing the return type to a sub-type or parameter types to super types (aka type variance) in overridden methods is one of the most basic features of a decent type system, but it still isn't there!! it's been actual decades and the language it's still basically the same. i have heard good things about php7 and i couldn't wait to use it but again it's still the same old f****g piece of s**t. you are fooling yourselves, in the real world nobody gives a s**t about "group use declarations". are you aware that the vast majority don't care about performance improvements and that they just want a language that is consistent and pleasant to work with? wake up and get your s**t together, please

Test script:
---------------
class A{ public function method(): A{} }
class B extends A{ public function method(): B{} }

Expected result:
----------------
expected result: i expect php to not s***k

Actual result:
--------------
actual result: php s***s

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-02-26 12:04 UTC] spam2 at rhsoft dot net
some feedback from a user:

you are not capable to write a bugreport, in no way

> expected result: i expect php to not s***k

if you are too stupid to at least give the exact error message creep away!

> are you aware that the vast majority don't care about performance improvements

*you* are *not* the majority
 [2017-02-26 12:10 UTC] nikic@php.net
-Status: Open +Status: Duplicate
 [2017-02-26 12:10 UTC] nikic@php.net
Duplicate of bug #73010.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 06:01:28 2024 UTC