diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 6baf80d5f84b0..8fca7c76a25a6 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -41,7 +41,7 @@ env: CXX: ccache g++ jobs: LINUX_X64: - if: github.repository == 'php/php-src' || github.event_name == 'pull_request' + if: false services: mysql: image: mysql:8.3 @@ -137,7 +137,7 @@ jobs: if: ${{ !matrix.asan }} uses: ./.github/actions/verify-generated-files LINUX_X32: - if: github.repository == 'php/php-src' || github.event_name == 'pull_request' + if: false name: LINUX_X32_DEBUG_ZTS runs-on: ubuntu-latest timeout-minutes: 50 @@ -183,7 +183,7 @@ jobs: -d zend_extension=opcache.so -d opcache.enable_cli=1 MACOS_DEBUG_NTS: - if: github.repository == 'php/php-src' || github.event_name == 'pull_request' + if: false strategy: fail-fast: false matrix: @@ -226,7 +226,7 @@ jobs: - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files WINDOWS: - if: github.repository == 'php/php-src' || github.event_name == 'pull_request' + if: false name: WINDOWS_X64_ZTS runs-on: windows-2022 timeout-minutes: 50 @@ -254,7 +254,7 @@ jobs: run: .github/scripts/windows/test.bat BENCHMARKING: name: BENCHMARKING - if: github.repository == 'php/php-src' || github.event_name == 'pull_request' + if: false runs-on: ubuntu-24.04 timeout-minutes: 50 steps: @@ -359,3 +359,105 @@ jobs: name: profiles path: ${{ github.workspace }}/benchmark/profiles retention-days: 30 + FREEBSD: + name: FREEBSD + runs-on: ubuntu-latest + steps: + - name: git checkout + uses: actions/checkout@v4 + - name: QEMU + uses: vmactions/freebsd-vm@v1 + with: + release: '13.3' + usesh: true + prepare: | + cd $GITHUB_WORKSPACE + + kldload accf_http + pkg install -y \ + autoconf \ + bison \ + gmake \ + re2c \ + icu \ + libiconv \ + png \ + freetype2 \ + enchant2 \ + bzip2 \ + t1lib \ + gmp \ + tidyp \ + libsodium \ + libzip \ + libxml2 \ + libxslt \ + openssl \ + oniguruma \ + pkgconf \ + webp \ + libavif \ + sqlite3 \ + curl + + ./buildconf -f + ./configure \ + --prefix=/usr/local \ + --enable-debug \ + --enable-option-checking=fatal \ + --enable-fpm \ + --with-pdo-sqlite \ + --without-pear \ + --with-bz2 \ + --with-avif \ + --with-jpeg \ + --with-webp \ + --with-freetype \ + --enable-gd \ + --enable-exif \ + --with-zip \ + --with-zlib \ + --enable-soap \ + --enable-xmlreader \ + --with-xsl \ + --with-libxml \ + --enable-shmop \ + --enable-pcntl \ + --enable-mbstring \ + --with-curl \ + --enable-sockets \ + --with-openssl \ + --with-iconv=/usr/local \ + --enable-bcmath \ + --enable-calendar \ + --enable-ftp \ + --with-ffi \ + --enable-zend-test \ + --enable-dl-test=shared \ + --enable-intl \ + --with-mhash \ + --with-sodium \ + --enable-werror \ + --with-config-file-path=/etc \ + --with-config-file-scan-dir=/etc/php.d + gmake -j2 + mkdir /etc/php.d + gmake install + echo opcache.enable_cli=1 > /etc/php.d/opcache.ini + echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini + echo opcache.preload_user=root >> /etc/php.d/opcache.ini + run: | + cd $GITHUB_WORKSPACE + + export SKIP_IO_CAPTURE_TESTS=1 + export CI_NO_IPV6=1 + export STACK_LIMIT_DEFAULTS_CHECK=1 + sapi/cli/php run-tests.php \ + -P -q -j2 \ + -g FAIL,BORK,LEAK,XLEAK \ + --no-progress \ + --offline \ + --show-diff \ + --show-slow 1000 \ + --set-timeout 120 \ + -d zend_extension=opcache.so diff --git a/ext/pdo_sqlite/tests/bug38334.phpt b/ext/pdo_sqlite/tests/bug38334.phpt index b4e9a378d7174..802aa7e1de384 100644 --- a/ext/pdo_sqlite/tests/bug38334.phpt +++ b/ext/pdo_sqlite/tests/bug38334.phpt @@ -7,11 +7,11 @@ pdo_sqlite $db = new PDO('sqlite::memory:'); $db->exec('CREATE TABLE test_38334 (i INTEGER , f DOUBLE, s VARCHAR(255))'); -$db->exec('INSERT INTO test_38334 VALUES (42, 46.7, "test")'); +$db->exec('INSERT INTO test_38334 VALUES (42, 46.7, \'test\')'); var_dump($db->query('SELECT * FROM test_38334')->fetch(PDO::FETCH_ASSOC)); // Check handling of integers larger than 32-bit. -$db->exec('INSERT INTO test_38334 VALUES (10000000000, 0.0, "")'); +$db->exec('INSERT INTO test_38334 VALUES (10000000000, 0.0, \'\')'); $i = $db->query('SELECT i FROM test_38334 WHERE f = 0.0')->fetchColumn(0); if (PHP_INT_SIZE >= 8) { var_dump($i === 10000000000); @@ -20,8 +20,8 @@ if (PHP_INT_SIZE >= 8) { } // Check storing of strings into integer/float columns. -$db->exec('INSERT INTO test_38334 VALUES ("test", "test", "x")'); -var_dump($db->query('SELECT * FROM test_38334 WHERE s = "x"')->fetch(PDO::FETCH_ASSOC)); +$db->exec('INSERT INTO test_38334 VALUES (\'test\', \'test\', \'x\')'); +var_dump($db->query('SELECT * FROM test_38334 WHERE s = \'x\'')->fetch(PDO::FETCH_ASSOC)); ?> --EXPECT-- diff --git a/ext/pdo_sqlite/tests/bug_42589.phpt b/ext/pdo_sqlite/tests/bug_42589.phpt index 46ded8d027a61..d3b8b0865d8a1 100644 --- a/ext/pdo_sqlite/tests/bug_42589.phpt +++ b/ext/pdo_sqlite/tests/bug_42589.phpt @@ -15,7 +15,7 @@ if(!in_array('ENABLE_COLUMN_METADATA', $options, true)) $db = new PDO("sqlite::memory:"); $db->exec('CREATE TABLE test_42589 (field1 VARCHAR(10))'); -$db->exec('INSERT INTO test_42589 VALUES("test")'); +$db->exec('INSERT INTO test_42589 VALUES(\'test\')'); $result = $db->query('SELECT * FROM test_42589 t1 LEFT JOIN test_42589 t2 ON t1.field1 = t2.field1'); $meta1 = $result->getColumnMeta(0); diff --git a/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt b/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt index e9c2c7e5d5e4b..46c88aee635f6 100644 --- a/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt +++ b/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt @@ -9,7 +9,7 @@ $db = new PDO('sqlite::memory:'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); $db->exec('CREATE TABLE test_fetch_func_001 (id INTEGER , name VARCHAR)'); -$db->exec('INSERT INTO test_fetch_func_001 VALUES(1, "php"), (2, "")'); +$db->exec('INSERT INTO test_fetch_func_001 VALUES(1, \'php\'), (2, \'\')'); $st = $db->query('SELECT * FROM test_fetch_func_001'); $st->fetchAll( diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt index 3ecc0ccddc991..48ea989404d53 100644 --- a/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt +++ b/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt @@ -9,7 +9,7 @@ $db = new PDO('sqlite::memory:'); $db->query('CREATE TABLE test_pdo_sqlite_createaggregate (id INT AUTO INCREMENT, name TEXT)'); -$db->query('INSERT INTO test_pdo_sqlite_createaggregate VALUES (NULL, "PHP"), (NULL, "PHP6")'); +$db->query('INSERT INTO test_pdo_sqlite_createaggregate VALUES (NULL, \'PHP\'), (NULL, \'PHP6\')'); $db->sqliteCreateAggregate('testing', function(&$a, $b) { $a .= $b; return $a; }, function(&$v) { return $v; }); diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_createcollation.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_createcollation.phpt index 9e4751e33aa01..a9e4e7e589c16 100644 --- a/ext/pdo_sqlite/tests/pdo_sqlite_createcollation.phpt +++ b/ext/pdo_sqlite/tests/pdo_sqlite_createcollation.phpt @@ -10,7 +10,7 @@ $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->query('CREATE TABLE test_pdo_sqlite_createcollation (id INT AUTO INCREMENT, name TEXT)'); -$db->query('INSERT INTO test_pdo_sqlite_createcollation VALUES (NULL, "1"), (NULL, "2"), (NULL, "10")'); +$db->query('INSERT INTO test_pdo_sqlite_createcollation VALUES (NULL, \'1\'), (NULL, \'2\'), (NULL, \'10\')'); $db->sqliteCreateCollation('MYCOLLATE', function($a, $b) { return strnatcmp($a, $b); }); diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt index bda7ab0b41555..500dbc2cb6b07 100644 --- a/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt +++ b/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt @@ -9,7 +9,7 @@ $db = new PDO('sqlite::memory:'); $db->query('CREATE TABLE test_pdo_sqlite_createfunction (id INT AUTO INCREMENT, name TEXT)'); -$db->query('INSERT INTO test_pdo_sqlite_createfunction VALUES (NULL, "PHP"), (NULL, "PHP6")'); +$db->query('INSERT INTO test_pdo_sqlite_createfunction VALUES (NULL, \'PHP\'), (NULL, \'PHP6\')'); $db->sqliteCreateFunction('testing', function($v) { return strtolower($v); }); diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_createfunction_with_flags.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_createfunction_with_flags.phpt index f9312bcee69e9..caf538bf65d86 100644 --- a/ext/pdo_sqlite/tests/pdo_sqlite_createfunction_with_flags.phpt +++ b/ext/pdo_sqlite/tests/pdo_sqlite_createfunction_with_flags.phpt @@ -13,7 +13,7 @@ $db = new PDO('sqlite::memory:'); $db->query('CREATE TABLE test_pdo_sqlite_createfunction_with_flags (id INT AUTO INCREMENT, name TEXT)'); -$db->query('INSERT INTO test_pdo_sqlite_createfunction_with_flags VALUES (NULL, "PHP"), (NULL, "PHP6")'); +$db->query('INSERT INTO test_pdo_sqlite_createfunction_with_flags VALUES (NULL, \'PHP\'), (NULL, \'PHP6\')'); $db->sqliteCreateFunction('testing', function($v) { return strtolower($v); }, 1, PDO::SQLITE_DETERMINISTIC); diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt index 7e55ed60d5f1d..f7d231a52edd2 100644 --- a/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt +++ b/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt @@ -7,7 +7,7 @@ pdo_sqlite $db = new PDO('sqlite::memory:'); $db->query('CREATE TABLE test_pdo_sqlite_lastinsertid (id INT AUTO INCREMENT, name TEXT)'); -$db->query('INSERT INTO test_pdo_sqlite_lastinsertid VALUES (NULL, "PHP"), (NULL, "PHP6")'); +$db->query('INSERT INTO test_pdo_sqlite_lastinsertid VALUES (NULL, \'PHP\'), (NULL, \'PHP6\')'); var_dump($db->query('SELECT * FROM test_pdo_sqlite_lastinsertid')); var_dump($db->errorInfo()); var_dump($db->lastInsertId()); diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_parser.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_parser.phpt index d5eda8d9b8274..63b248ae3d7ce 100644 --- a/ext/pdo_sqlite/tests/pdo_sqlite_parser.phpt +++ b/ext/pdo_sqlite/tests/pdo_sqlite_parser.phpt @@ -31,9 +31,7 @@ foreach ($queries as $k => $query) { // One parameter $queries = [ "SELECT * FROM {$table} WHERE '1' = ?", - "SELECT * FROM {$table} WHERE \"?\" IN (?, \"?\")", "SELECT * FROM {$table} WHERE `a``?` = ?", - "SELECT * FROM {$table} WHERE \"a`?\" = ?", "SELECT * FROM {$table} WHERE [a`?] = ?", ]; @@ -58,5 +56,3 @@ bool(true) bool(true) bool(true) bool(true) -bool(true) -bool(true) diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_transaction.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_transaction.phpt index dc1e4c13a3307..2ef2d73337c73 100644 --- a/ext/pdo_sqlite/tests/pdo_sqlite_transaction.phpt +++ b/ext/pdo_sqlite/tests/pdo_sqlite_transaction.phpt @@ -14,7 +14,7 @@ $db->query('CREATE TABLE test_pdo_sqlite_transaction (id INT AUTO INCREMENT, nam $db->commit(); $db->beginTransaction(); -$db->query('INSERT INTO test_pdo_sqlite_transaction VALUES (NULL, "PHP"), (NULL, "PHP6")'); +$db->query('INSERT INTO test_pdo_sqlite_transaction VALUES (NULL, \'PHP\'), (NULL, \'PHP6\')'); $db->rollback(); $r = $db->query('SELECT COUNT(*) FROM test_pdo_sqlite_transaction'); diff --git a/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createafunction_trampoline.phpt b/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createafunction_trampoline.phpt index adcb130e0b9c1..0503959fb2b82 100644 --- a/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createafunction_trampoline.phpt +++ b/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createafunction_trampoline.phpt @@ -20,11 +20,11 @@ class TrampolineTest { var_dump($db->createFunction('strtoupper', [new TrampolineTest(), 'strtoupper'])); -foreach ($db->query('SELECT strtoupper("test")') as $row) { +foreach ($db->query('SELECT strtoupper(\'test\')') as $row) { var_dump($row); } -foreach ($db->query('SELECT strtoupper("test")') as $row) { +foreach ($db->query('SELECT strtoupper(\'test\')') as $row) { var_dump($row); } @@ -33,14 +33,14 @@ foreach ($db->query('SELECT strtoupper("test")') as $row) { bool(true) Trampoline for strtoupper array(2) { - ["strtoupper("test")"]=> + ["strtoupper('test')"]=> string(4) "TEST" [0]=> string(4) "TEST" } Trampoline for strtoupper array(2) { - ["strtoupper("test")"]=> + ["strtoupper('test')"]=> string(4) "TEST" [0]=> string(4) "TEST" diff --git a/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createaggregate.phpt b/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createaggregate.phpt index 1f96da8e1fa32..1ad72a63d4b3e 100644 --- a/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createaggregate.phpt +++ b/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createaggregate.phpt @@ -10,7 +10,7 @@ $db = new Pdo\Sqlite('sqlite::memory:'); $db->query('CREATE TABLE test_pdo_sqlite_createaggregate (id INT AUTO INCREMENT, name TEXT)'); -$db->query('INSERT INTO test_pdo_sqlite_createaggregate VALUES (NULL, "PHP"), (NULL, "PHP6")'); +$db->query('INSERT INTO test_pdo_sqlite_createaggregate VALUES (NULL, \'PHP\'), (NULL, \'PHP6\')'); $db->createAggregate('testing', function(&$a, $b) { $a .= $b; return $a; }, function(&$v) { return $v; }); diff --git a/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createcollation.phpt b/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createcollation.phpt index d043dda7a526e..c6c8bbf829c40 100644 --- a/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createcollation.phpt +++ b/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createcollation.phpt @@ -11,7 +11,7 @@ $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->query('CREATE TABLE test_pdo_sqlite_createcollation (id INT AUTO INCREMENT, name TEXT)'); -$db->query('INSERT INTO test_pdo_sqlite_createcollation VALUES (NULL, "1"), (NULL, "2"), (NULL, "10")'); +$db->query('INSERT INTO test_pdo_sqlite_createcollation VALUES (NULL, \'1\'), (NULL, \'2\'), (NULL, \'10\')'); $db->createCollation('MYCOLLATE', function($a, $b) { return strnatcmp($a, $b); }); diff --git a/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createcollation_trampoline.phpt b/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createcollation_trampoline.phpt index 1635fd7007711..569d535639e50 100644 --- a/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createcollation_trampoline.phpt +++ b/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createcollation_trampoline.phpt @@ -9,7 +9,7 @@ $db = new Pdo\Sqlite('sqlite::memory:'); $db->query('CREATE TABLE test_pdo_sqlite_createcollation_trampoline (s VARCHAR(4))'); -$stmt = $db->query('INSERT INTO test_pdo_sqlite_createcollation_trampoline VALUES ("a1"), ("a10"), ("a2")'); +$stmt = $db->query('INSERT INTO test_pdo_sqlite_createcollation_trampoline VALUES (\'a1\'), (\'a10\'), (\'a2\')'); class TrampolineTest { public function __call(string $name, array $arguments) { diff --git a/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createfunction_with_flags.phpt b/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createfunction_with_flags.phpt index 838e2b9bd49b0..9462ac7ab0fac 100644 --- a/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createfunction_with_flags.phpt +++ b/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createfunction_with_flags.phpt @@ -11,7 +11,7 @@ if (!defined('PDO::SQLITE_DETERMINISTIC')) die('skip system sqlite is too old'); // This test was copied from the pdo_sqlite test for sqliteCreateCollation $db = new Pdo\Sqlite('sqlite::memory:'); $db->query('CREATE TABLE test_pdo_sqlite_createfunction_with_flags (id INT AUTO INCREMENT, name TEXT)'); -$db->query('INSERT INTO test_pdo_sqlite_createfunction_with_flags VALUES (NULL, "PHP"), (NULL, "PHP6")'); +$db->query('INSERT INTO test_pdo_sqlite_createfunction_with_flags VALUES (NULL, \'PHP\'), (NULL, \'PHP6\')'); $db->createFunction('testing', function($v) { return strtolower($v); }, 1, Pdo\Sqlite::DETERMINISTIC); diff --git a/ext/pdo_sqlite/tests/subclasses/pdosqlite_001.phpt b/ext/pdo_sqlite/tests/subclasses/pdosqlite_001.phpt index ea88a6316b645..1bcc3943770bf 100644 --- a/ext/pdo_sqlite/tests/subclasses/pdosqlite_001.phpt +++ b/ext/pdo_sqlite/tests/subclasses/pdosqlite_001.phpt @@ -9,8 +9,8 @@ $db = new Pdo\Sqlite('sqlite::memory:'); $db->query('CREATE TABLE pdosqlite_001 (id INT AUTO INCREMENT, name TEXT)'); -$db->query('INSERT INTO pdosqlite_001 VALUES (NULL, "PHP")'); -$db->query('INSERT INTO pdosqlite_001 VALUES (NULL, "PHP6")'); +$db->query('INSERT INTO pdosqlite_001 VALUES (NULL, \'PHP\')'); +$db->query('INSERT INTO pdosqlite_001 VALUES (NULL, \'PHP6\')'); $db->createFunction('testing', function($v) { return strtolower($v); }, 1, Pdo\Sqlite::DETERMINISTIC); diff --git a/ext/pdo_sqlite/tests/subclasses/pdosqlite_002.phpt b/ext/pdo_sqlite/tests/subclasses/pdosqlite_002.phpt index 28534f4a2365c..21fdcc95ed9f9 100644 --- a/ext/pdo_sqlite/tests/subclasses/pdosqlite_002.phpt +++ b/ext/pdo_sqlite/tests/subclasses/pdosqlite_002.phpt @@ -11,8 +11,8 @@ if (!$db instanceof Pdo\Sqlite) { } $db->query('CREATE TABLE pdosqlite_002 (id INT AUTO INCREMENT, name TEXT)'); -$db->query('INSERT INTO pdosqlite_002 VALUES (NULL, "PHP")'); -$db->query('INSERT INTO pdosqlite_002 VALUES (NULL, "PHP6")'); +$db->query('INSERT INTO pdosqlite_002 VALUES (NULL, \'PHP\')'); +$db->query('INSERT INTO pdosqlite_002 VALUES (NULL, \'PHP6\')'); $db->createFunction('testing', function($v) { return strtolower($v); }, 1, Pdo\Sqlite::DETERMINISTIC); diff --git a/ext/sqlite3/tests/bug72668.phpt b/ext/sqlite3/tests/bug72668.phpt index 40ede8883cc23..91d8be8a78149 100644 --- a/ext/sqlite3/tests/bug72668.phpt +++ b/ext/sqlite3/tests/bug72668.phpt @@ -12,20 +12,20 @@ $db = new SQLite3(':memory:'); $db->createFunction('my_udf_md5', 'my_udf_md5'); try { - $result = $db->query('SELECT my_udf_md5("test")'); + $result = $db->query('SELECT my_udf_md5(\'test\')'); var_dump($result); } catch(\Exception $e) { echo "Exception: ".$e->getMessage(); } try { - $result = $db->querySingle('SELECT my_udf_md5("test")'); + $result = $db->querySingle('SELECT my_udf_md5(\'test\')'); var_dump($result); } catch(\Exception $e) { echo "Exception: ".$e->getMessage(); } -$statement = $db->prepare('SELECT my_udf_md5("test")'); +$statement = $db->prepare('SELECT my_udf_md5(\'test\')'); try { $result = $statement->execute(); var_dump($result); diff --git a/ext/sqlite3/tests/sqlite3_29_createfunction.phpt b/ext/sqlite3/tests/sqlite3_29_createfunction.phpt index ef28b3b62deff..bd1b9733bb288 100644 --- a/ext/sqlite3/tests/sqlite3_29_createfunction.phpt +++ b/ext/sqlite3/tests/sqlite3_29_createfunction.phpt @@ -9,14 +9,14 @@ require_once(__DIR__ . '/new_db.inc'); $func = 'strtoupper'; var_dump($db->createfunction($func, $func)); -var_dump($db->querySingle('SELECT strtoupper("test")')); +var_dump($db->querySingle('SELECT strtoupper(\'test\')')); $func2 = 'strtolower'; var_dump($db->createfunction($func2, $func2)); -var_dump($db->querySingle('SELECT strtolower("TEST")')); +var_dump($db->querySingle('SELECT strtolower(\'TEST\')')); var_dump($db->createfunction($func, $func2)); -var_dump($db->querySingle('SELECT strtoupper("tEst")')); +var_dump($db->querySingle('SELECT strtoupper(\'tEst\')')); ?> diff --git a/ext/sqlite3/tests/sqlite3_37_createfunction_flags.phpt b/ext/sqlite3/tests/sqlite3_37_createfunction_flags.phpt index 4297d622e939a..a963372d2f182 100644 --- a/ext/sqlite3/tests/sqlite3_37_createfunction_flags.phpt +++ b/ext/sqlite3/tests/sqlite3_37_createfunction_flags.phpt @@ -13,14 +13,14 @@ require_once(__DIR__ . '/new_db.inc'); $func = 'strtoupper'; var_dump($db->createfunction($func, $func, 1, SQLITE3_DETERMINISTIC)); -var_dump($db->querySingle('SELECT strtoupper("test")')); +var_dump($db->querySingle('SELECT strtoupper(\'test\')')); $func2 = 'strtolower'; var_dump($db->createfunction($func2, $func2, 1, SQLITE3_DETERMINISTIC)); -var_dump($db->querySingle('SELECT strtolower("TEST")')); +var_dump($db->querySingle('SELECT strtolower(\'TEST\')')); var_dump($db->createfunction($func, $func2, 1, SQLITE3_DETERMINISTIC)); -var_dump($db->querySingle('SELECT strtoupper("tEst")')); +var_dump($db->querySingle('SELECT strtoupper(\'tEst\')')); ?> diff --git a/ext/sqlite3/tests/sqlite3_rename_column.phpt b/ext/sqlite3/tests/sqlite3_rename_column.phpt index 6b4e23bc7186b..b44928abcb693 100644 --- a/ext/sqlite3/tests/sqlite3_rename_column.phpt +++ b/ext/sqlite3/tests/sqlite3_rename_column.phpt @@ -14,7 +14,7 @@ if (SQLite3::version()['versionNumber'] < 3025000) { $db = new SQLite3(':memory:'); $db->exec('CREATE TABLE tbl (orig text)'); -$db->exec('insert into tbl values ("one"), ("two")'); +$db->exec('insert into tbl values (\'one\'), (\'two\')'); $res1 = $db->prepare('select * from tbl')->execute(); $res2 = $db->prepare('select * from tbl')->execute(); diff --git a/ext/sqlite3/tests/sqlite3_trampoline_createfunction.phpt b/ext/sqlite3/tests/sqlite3_trampoline_createfunction.phpt index 81245f5b4beff..b0b0b04600e93 100644 --- a/ext/sqlite3/tests/sqlite3_trampoline_createfunction.phpt +++ b/ext/sqlite3/tests/sqlite3_trampoline_createfunction.phpt @@ -16,8 +16,8 @@ class TrampolineTest { $o = new TrampolineTest(); $callback = [$o, 'strtoupper']; var_dump($db->createfunction('strtoupper', $callback)); -var_dump($db->querySingle('SELECT strtoupper("test")')); -var_dump($db->querySingle('SELECT strtoupper("test")')); +var_dump($db->querySingle('SELECT strtoupper(\'test\')')); +var_dump($db->querySingle('SELECT strtoupper(\'test\')')); ?> --EXPECT--