1--TEST--
2exec, system, passthru  — Basic command execution functions
3--SKIPIF--
4<?php
5// If this does not work for Windows, please uncomment or fix test
6// if(substr(PHP_OS, 0, 3) == "WIN") die("skip not for Windows");
7?>
8--FILE--
9<?php
10$cmd = "echo abc\n\0command";
11var_dump(exec($cmd, $output));
12var_dump($output);
13var_dump(system($cmd));
14var_dump(passthru($cmd));
15?>
16--EXPECTF--
17Warning: exec(): NULL byte detected. Possible attack in %s on line %d
18bool(false)
19NULL
20
21Warning: system(): NULL byte detected. Possible attack in %s on line %d
22bool(false)
23
24Warning: passthru(): NULL byte detected. Possible attack in %s on line %d
25bool(false)
26