oci_define_by_name

FunctionRemoved in PHP 8.4

Associates a PHP variable with a column for query fetches.

PHP 5
PHP 7
PHP 8.0
Improved
PHP 8.1
PHP 8.2-8.3
PHP 8.4
Removed
PHP 8.5
PHP 8.6

oci_define_by_name Function synopsis

oci_define_by_name(
    $statement,
    string $column,
    mixed &$var,
    int $type = 0
  ): bool

Parameters

$statement
$column

Typestring

The column name used in the query.

$var

Passed by referenceTypemixed

The PHP variable that will contain the returned column value.

$type

OptionalTypeintDefault value0

The data type to be returned. Generally not needed. Note that Oracle-style data conversions are not performed. For example, SQLT_INT will be ignored and the returned data type will still be SQLT_CHR.

Note that the parameter $var is passed by reference, and contains additional/updated context data that may be useful.

Return value

Typebool

Returns true on success, false on failure

Changes to the oci_define_by_name Function

PHP 8.4

  • Function removed

PHP 8.0

  • Return type added: bool
  • Parameter name of parameter #1 changed: $statement_resource to $statement
  • Parameter name of parameter #2 changed: $column_name to $column
  • Parameter type added for parameter #2 ($column): string
  • Parameter name of parameter #3 changed: $variable to $var
  • Parameter type added for parameter #3 ($var): mixed
  • Parameter type added for parameter #4 ($type): int
  • Parameter default value added for position #4 ($type): 0
  oci_define_by_name(
-     $statement_resource,
+     $statement,
-     $column_name,
+     string $column,
-     &$variable,
+     mixed &$var,
-     $type
+     int $type = 0
-   )
+   ): bool

oci_define_by_name Function Availability

PHP VersionAvailability
PHP 8.6Upcoming Release No
PHP 8.5Supported (Latest) No
PHP 8.4Supported No
PHP 8.3Security-Fixes Only Yes
PHP 8.2Security-Fixes Only Yes
PHP 8.1Unsupported Yes
PHP 8.0Unsupported Yes
PHP 7.4Unsupported Yes
PHP 7.3Unsupported Yes
PHP 7.2Unsupported Yes
PHP 7.1Unsupported Yes
PHP 7.0Unsupported Yes
PHP 5.6Unsupported Yes
PHP 5.5Unsupported Yes
PHP 5.4Unsupported Yes
PHP 5.3Unsupported Yes