php-src/ext/gmp/tests/cast.phpt
Max Semenik e9f783fcdd Migrate skip checks to --EXTENSIONS--, p3
For rationale, see #6787

Extensions migrated in part 3:
* ftp
* gmp
* iconv
* opcache
* shmop
2021-04-03 15:23:25 +02:00

23 lines
346 B
PHP

--TEST--
GMP casting using casting operators
--EXTENSIONS--
gmp
--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