xref: /PHP-7.3/ext/sodium/tests/bug78114.phpt (revision 22a3fa0b)
1--TEST--
2Bug #78114 (segfault when calling sodium_* functions from eval)
3--SKIPIF--
4<?php
5if (!extension_loaded('sodium')) die('skip sodium extension not available');
6?>
7--FILE--
8<?php
9try {
10    eval('sodium_bin2hex();');
11} catch (Throwable $ex) {
12    echo $ex->getMessage(), PHP_EOL;
13}
14?>
15--EXPECT--
16sodium_bin2hex() expects exactly 1 parameter, 0 given
17