php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #14405 strict type control ability
Submitted: 2001-12-10 10:38 UTC Modified: 2010-12-29 11:53 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: foobardotcom at poczta dot onet dot pl Assigned:
Status: Wont fix Package: *General Issues
PHP Version: 4.1.0 OS: all
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: foobardotcom at poczta dot onet dot pl
New email:
PHP Version: OS:

 

 [2001-12-10 10:38 UTC] foobardotcom at poczta dot onet dot pl
Now:

define("E_TYPE", "Invalid type of argument");
function dbexec($connObject, $query) {
  if (is_object($connObject)) {
    if (get_class($connObject) == "dbconn") {
      if (is_string($query)) {
        return $connObject->execute($query);
      } else {
        trigger_error(E_TYPE, E_USER_ERROR);
      }
    } else {
      trigger_error(E_TYPE, E_USER_ERROR);
    }
  } else {
    trigger_error(E_TYPE, E_USER_ERROR);
  }
}

I want to be:

function dbexec((dbconn) $connObject, (string) $query) {
  return $connObject->execute($query);
}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-29 11:53 UTC] jani@php.net
-Status: Open +Status: Wont fix -Package: Feature/Change Request +Package: *General Issues
 [2010-12-29 11:53 UTC] jani@php.net
See http://wiki.php.net/rfc/typechecking for more information.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC