xref: /PHP-8.0/Zend/tests/bug70898.phpt (revision d30cd7d7)
1--TEST--
2Bug #70895 null ptr deref and segfault with crafted callable
3--FILE--
4<?php
5function m($f,$a){
6    return array_map($f,0);
7}
8
9try {
10    echo implode(m("",m("",m("",m("",m("0000000000000000000000000000000000",("")))))));
11} catch (TypeError $e) {
12    echo $e->getMessage(), "\n";
13}
14?>
15--EXPECT--
16array_map(): Argument #1 ($callback) must be a valid callback, function "0000000000000000000000000000000000" not found or invalid function name
17