rfc:catchable-call-to-member-of-non-object

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:catchable-call-to-member-of-non-object [2014/04/29 07:26] – Add inner workings thekidrfc:catchable-call-to-member-of-non-object [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 4: Line 4:
   * Date: 2014-04-26   * Date: 2014-04-26
   * Author: Timm Friebe <thekid@php.net>   * Author: Timm Friebe <thekid@php.net>
-  * Status: Under Discussion+  * Status: Accepted
   * First Published at: https://wiki.php.net/rfc/catchable-call-to-member-of-non-object   * First Published at: https://wiki.php.net/rfc/catchable-call-to-member-of-non-object
 +
 +**Note: This RFC has been superseded by the [[https://wiki.php.net/rfc/engine_exceptions_for_php7|engine exceptions]] proposal.**
  
 ===== Introduction ===== ===== Introduction =====
Line 113: Line 115:
   - In case the script continues, all the oplines are skipped until we find the ''FCALL_BY_NAME'' opcode. This is comparable to jumping forward just as, e.g., the ''ZEND_JMP'' instruction would.   - In case the script continues, all the oplines are skipped until we find the ''FCALL_BY_NAME'' opcode. This is comparable to jumping forward just as, e.g., the ''ZEND_JMP'' instruction would.
   - The return value is set to ''ZVAL_NULL()''.   - The return value is set to ''ZVAL_NULL()''.
-  - The control is handed back to the executor, which then continutes with the ''ASSIGN'' opcode. +  - The control is handed back to the executor, which then continues with the ''ASSIGN'' opcode 
 +  - The engine is again in full control; if an exception was raised by the handler, that leads to the known behavior.
  
 ===== Other Impact ===== ===== Other Impact =====
Line 143: Line 145:
  
   * Also allowing to catch and handle other fatal errors   * Also allowing to catch and handle other fatal errors
 +
 +===== Vote =====
 +Voting started 2014-06-29 and ended 2014-07-30. 
 +
 +<doodle title="Catchable Call to a member function bar() on a non-object" auth="thekid" voteType="single" closed="true">
 +   * Yes
 +   * No
 +</doodle>
 +
  
 ===== References ===== ===== References =====
Line 149: Line 160:
   * HHVM [[https://github.com/facebook/hhvm/blob/master/hphp/test/quick/method-non-object.php.expectf|throws a BadMethodCallException]] in these situations    * HHVM [[https://github.com/facebook/hhvm/blob/master/hphp/test/quick/method-non-object.php.expectf|throws a BadMethodCallException]] in these situations 
   * [[http://news.php.net/php.internals/73814|Mailing list announcement]]   * [[http://news.php.net/php.internals/73814|Mailing list announcement]]
 +  * [[rfc/returntypehinting|Return type hinting RFC]] - related work: Some fatal errors can be prevented by setting return types.
rfc/catchable-call-to-member-of-non-object.1398756367.txt.gz · Last modified: 2017/09/22 13:28 (external edit)