1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 23:18:13 +02:00
Files
archived-php-src/ext/gmp/tests/cast.phpt
T
2018-10-14 12:07:20 -03:00

23 lines
391 B
PHP

--TEST--
GMP casting using casting operators
--SKIPIF--
<?php if (!extension_loaded("gmp")) print "skip"; ?>
--FILE--
<?php
$n = gmp_init(42);
echo $n, "\n";
var_dump((string) $n);
var_dump((int) $n);
var_dump((float) $n);
var_dump((bool) $n);
?>
--EXPECTF--
42
string(2) "42"
int(42)
float(42)
Recoverable fatal error: Object of class GMP could not be converted to bool in %s on line %d