xref: /PHP-8.1/Zend/tests/bug60569.phpt (revision ea256a21)
1--TEST--
2Bug #60569 (Nullbyte truncates Exception $message.)
3--FILE--
4<?php
5try {
6    $msg = "Some error \x00 message";
7    throw new Exception($msg);
8} catch(Exception $e) {
9    var_dump($e->getMessage(), $msg);
10}
11?>
12--EXPECTF--
13string(20) "Some error %0 message"
14string(20) "Some error %0 message"
15