PHPackages                             jpina/oci8 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. jpina/oci8

ActiveLibrary[Database &amp; ORM](/categories/database)

jpina/oci8
==========

Oracle database wrapper for PHP oci8 functions

1.0.1(10y ago)1714.0k↓74.3%3[3 issues](https://github.com/jpina/oci8/issues)MITPHPPHP &gt;=5.3.0

Since Feb 14Pushed 10y ago5 watchersCompare

[ Source](https://github.com/jpina/oci8)[ Packagist](https://packagist.org/packages/jpina/oci8)[ Docs](https://github.com/jpina/oci8)[ RSS](/packages/jpina-oci8/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

Oci8
====

[](#oci8)

Package information:

[![Latest Version on Packagist](https://camo.githubusercontent.com/2b637eef43206b09881758195be2092797691565505760932e9d4c326228227a/68747470733a2f2f706f7365722e707567782e6f72672f6a70696e612f6f6369382f762f737461626c65)](https://packagist.org/packages/jpina/oci8)[![Software License](https://camo.githubusercontent.com/4fc6538ded72843e26a272d300ce4c95da083ce92576e10e4fdd505d579a8125/68747470733a2f2f696d672e736869656c64732e696f2f3a6c6963656e73652d6d69742d626c75652e737667)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/77415c3bfec0a07c3a1a13e2416e8480c17b5976fcd961c6e198522d40ae2adc/68747470733a2f2f7472617669732d63692e6f72672f6a70696e612f6f6369382e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jpina/oci8)[![Dependencies Status](https://camo.githubusercontent.com/78aa82ce21c6b37f42870f9980a6a338fcc6639c0dec344c62cfc96aedf484dd/68747470733a2f2f67656d6e617369756d2e636f6d2f6a70696e612f6f6369382e737667)](https://gemnasium.com/jpina/oci8)[![PHP 7 ready](https://camo.githubusercontent.com/264421b6606318151d6898392c52ff4558b2a619608407dfd51dbc7bc06e04e4/687474703a2f2f7068703772656164792e74696d6573706c696e7465722e63682f6a70696e612f6f6369382f62616467652e737667)](https://travis-ci.org/jpina/oci8)[![Total Downloads](https://camo.githubusercontent.com/0b4c4e4ac5277952903d4362e20338bfd04395b89e2928f8e45da6dd41bcf87d/68747470733a2f2f706f7365722e707567782e6f72672f6a70696e612f6f6369382f646f776e6c6f616473)](https://packagist.org/packages/jpina/oci8)

Code Information:

[![Code Coverage](https://camo.githubusercontent.com/d7a282b87bde1ff6419290ea1e0bc1d64ddce37f2e90bfd2a43b66071631ec2e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a70696e612f6f6369382f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/jpina/oci8/?branch=master)[![Scrutinizer Score](https://camo.githubusercontent.com/964e452a1f8bd12c9fc45dfad1b1b7af074e0c0c47c72673cce23785932ef11d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a70696e612f6f6369382f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/jpina/oci8/?branch=master)[![Code Climate Score](https://camo.githubusercontent.com/8868d7ca6140d33643d254cbac1e33affc4c36ca1a7d29b7c40463741bfc3a98/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6a70696e612f6f6369382f6261646765732f6770612e737667)](https://codeclimate.com/github/jpina/oci8)

[![SensioLabsInsight Score](https://camo.githubusercontent.com/5c85f8aa844e5b2146cd2809e1e41946ccf2d326e0f54ce6ff245f69bd090d86/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f38653534323839352d353466622d343265362d616135392d3834306238616363333234312f736d616c6c2e706e67)](https://insight.sensiolabs.com/projects/8e542895-54fb-42e6-aa59-840b8acc3241)

Oci8 is a wrapper for the PHP [Oracle OCI](http://php.net/manual/en/book.oci8.php) functions that allows interaction with Oracle databases by using objects in place of the regular `oci_*` functions.

Oci8 converts the warnings thrown by the `oci_*` function into `Oci8Exceptions` for better error handling.

Install
-------

[](#install)

Via Composer

```
$ composer require jpina/oci8
```

Usage
-----

[](#usage)

Connect to a database, execute a query and fetch a row:

```
$db = new Jpina\Oci8Connection('username', 'password', '//localhost:1521/XE');
$statement = $db->parse('SELECT * FROM dual');
$statement->execute();
$row = $statement->fetchAssoc();
```

Handing errors

```
try {
    $db = new Jpina\Oci8Connection('username', 'password', '//localhost:1521/XE');
    // Closing database to force an error on next statement
    $db->close();
    // This statement will throw an Oci8Exception since there is no active connection
    $statement = $db->parse('SELECT * FROM dual');
} catch (Jpina\Oci8Exception $ex) {
    // Handle the Exception
}
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

In order to run the tests you will need access to an Oracle Database and copy the `.env.example` to `.env`, then you can provide your own values within the `.env`, these values will be used by the tests to connect to the database.

You can run the tests with composer once you have your `.env` file configured properly.

```
$ composer test
```

If you don't have access to an Oracle Database server, you can also run a docker container like [wnameless/oracle-xe-11g](https://hub.docker.com/r/wnameless/oracle-xe-11g) and then connect to it to run the tests against a containerized Oracle Database.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Josué Piña](https://github.com/jpina)
- [All Contributors](https://github.com/jpina/oci8/graphs/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 95.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

3

Last Release

3768d ago

Major Versions

0.1.0 → 1.0.02016-02-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/7902e2e6e067e72d449d996f0ef8abaa45e072009c9b91ad892cbd1661d81856?d=identicon)[jpina](/maintainers/jpina)

---

Top Contributors

[![jpina](https://avatars.githubusercontent.com/u/1448241?v=4)](https://github.com/jpina "jpina (43 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (2 commits)")

---

Tags

databaseoracleoci8oci

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/jpina-oci8/health.svg)

```
[![Health](https://phpackages.com/badges/jpina-oci8/health.svg)](https://phpackages.com/packages/jpina-oci8)
```

###  Alternatives

[doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.

9.7k595.8M6.5k](/packages/doctrine-dbal)[catfan/medoo

The lightweight PHP database framework to accelerate development

4.9k1.5M203](/packages/catfan-medoo)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8723.1M23](/packages/yajra-laravel-oci8)[nette/database

💾 Nette Database: layer with a familiar PDO-like API but much more powerful. Building queries, advanced joins, drivers for MySQL, PostgreSQL, SQLite, MS SQL Server and Oracle.

5436.9M255](/packages/nette-database)[dibi/dibi

Dibi is Database Abstraction Library for PHP

5013.9M129](/packages/dibi-dibi)[envms/fluentpdo

FluentPDO is a quick and light PHP library for rapid query building. It features a smart join builder, which automatically creates table joins.

923530.0k13](/packages/envms-fluentpdo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
