📁 File Manager Pro
v10.0.3 | PHP: 7.4.33
Server: LiteSpeed
2026-07-12 07:43:29
📂
/ (Root)
/
opt
/
alt
/
tests
/
alt-php84-pecl-mongodb_1.20.0-2.el8
/
tests
📍 /opt/alt/tests/alt-php84-pecl-mongodb_1.20.0-2.el8/tests
🔄 Refresh
✏️
Editing: bson-int64-compare-002.phpt
Read Only
--TEST-- MongoDB\BSON\Int64 comparisons with scalars --FILE-- <?php $int64 = new MongoDB\BSON\Int64('123'); $tests = [ 'matching int' => 123, 'matching numeric string' => '123', 'matching float' => 123.0, 'matching float string' => '123.0', 'wrong int' => 456, 'wrong numeric string' => '456', 'wrong float' => 456.0, 'wrong float string' => '456.0', 'float with decimals' => 123.456, 'string float with decimals' => '123.456', 'non-numeric string' => 'foo', ]; foreach ($tests as $name => $value) { printf('Testing %s: %s' . PHP_EOL, $name, var_export($int64 == $value, true)); } ?> ===DONE=== <?php exit(0); ?> --EXPECT-- Testing matching int: true Testing matching numeric string: true Testing matching float: true Testing matching float string: true Testing wrong int: false Testing wrong numeric string: false Testing wrong float: false Testing wrong float string: false Testing float with decimals: false Testing string float with decimals: false Testing non-numeric string: false ===DONE===
💾 Save Changes
❌ Cancel