-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Milestone
Description
<?php
require 'vendor/autoload.php';
$config = new \Doctrine\DBAL\Configuration();
//..
$connectionParams = array(
'dbname' => 'XE',
'user' => 'autotest',
'password' => 'owncloud',
'host' => '10.0.0.7',
'port' => 1521,
'driver' => 'oci8',
);
$conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config);
$conn->connect();
$conn->executeUpdate('DROP TABLE TEST');
$conn->executeUpdate('CREATE TABLE TEST(A VARCHAR2(4000) NOT NULL, B VARCHAR2(4000) NOT NULL, C VARCHAR2(4000) NOT NULL)');
$conn->insert('TEST', [
'A' => '1',
'B' => '2',
'C' => '3']);
$all = $conn->fetchAll('select * from TEST');
var_dump($all);deepdiver@alien:~/Development/ownCloud/php7-mysql$ php --version
PHP 5.6.12-1 (cli)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
with Xdebug v2.3.3, Copyright (c) 2002-2015, by Derick Rethans
with blackfire v1.1.0, https://blackfire.io/, by SensioLabs
deepdiver@alien:~/Development/ownCloud/php7-mysql$ php test.php
XDebug could not open the remote debug file '/tmp/xdebug.log'.
array(1) {
[0] =>
array(3) {
'A' =>
string(1) "1"
'B' =>
string(1) "2"
'C' =>
string(1) "3"
}
}
deepdiver@alien:~/Development/ownCloud/php7-mysql$ phpenv local 7.0.0beta3
deepdiver@alien:~/Development/ownCloud/php7-mysql$ php --version
PHP 7.0.0beta3 (cli) (built: Aug 17 2015 17:19:56)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
deepdiver@alien:~/Development/ownCloud/php7-mysql$ php test.php
array(1) {
[0]=>
array(3) {
["A"]=>
string(1) "3"
["B"]=>
string(1) "3"
["C"]=>
string(1) "3"
}
}