diff options
author | Davey Shafik <me@daveyshafik.com> | 2015-12-04 01:00:27 -0500 |
---|---|---|
committer | Davey Shafik <me@daveyshafik.com> | 2015-12-04 13:13:01 -0500 |
commit | f8a7029e0de2240328b956340d07df417ab0232d (patch) | |
tree | 8d74b874d121774aa94b2c20474c880d45d129a5 /README.md | |
download | php7-mysql-shim-f8a7029e0de2240328b956340d07df417ab0232d.zip php7-mysql-shim-f8a7029e0de2240328b956340d07df417ab0232d.tar.gz php7-mysql-shim-f8a7029e0de2240328b956340d07df417ab0232d.tar.bz2 |
Initial commit of ext/mysql shim for PHP 7
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..8abfae5 --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +# PHP 7 Shim for ext/mysql + +This library attempts to create a drop-in replacement for ext/mysql on PHP 7 using mysqli. + +For the most part, it should _just work_, although you either need to prefix all calls with a `\` (only internal functions will fallback to the global scope) +or import the functions into every file (e.g. `use function \mysql_connect`). + +## Installation + +To install, either add `dshafik/php7-mysql-shim` to your `composer.json`: + +```sh +$ composer require dshafik/php7-mysql-shim +``` + +or, clone/download this repo, and include `mysql.php` in your project. + +## Usage + +Once the file is included, it will create `mysql_*` function if they don't already exist. + +## Caveats + +The only things that should break are calls to `is_resource()` on MySQL connections and results, as these +are now their `mysqli` equivalents. + +Additionally, some errors are now from `ext/mysqli`, and others are `E_USER_WARNING` instead of `E_WARNING`. |