Skip to content

Commit de1c64b

Browse files
committed
Fix test for PHP < 8.0
1 parent 7bf9c08 commit de1c64b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/EndToEndPhpt/Util/Tokens/polyfillTokenizerConstants-number.phpt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ if (version_compare(PHP_VERSION, '8.4', '>=') === true) {
99
<?php
1010
define('T_PUBLIC_SET', 135000);
1111
require 'src/Util/Tokens.php';
12-
echo T_PRIVATE_SET, PHP_EOL; // ..0 is used, so this becomes ..1
12+
// ..00 is used, so this becomes ..01 (PHP 8.x) or ..14 (PHP 7.x)
13+
if (T_PRIVATE_SET > 135000) {
14+
echo 'Success.', PHP_EOL;
15+
} else {
16+
echo 'Failure - ', T_PRIVATE_SET, PHP_EOL;
17+
}
1318
--EXPECT--
14-
135001
19+
Success.

0 commit comments

Comments
 (0)