php-src/ext/pcntl/tests/pcntl_get_last_error.phpt
Arnaud Le Blanc cd63986283 MFH Fix bug #52173 (ext/pcntl doesn't store/report errors)
(patch by nick dot telford at gmail dot com)
2010-11-01 20:22:23 +00:00

18 lines
289 B
PHP

--TEST--
Test pcntl_get_last_error()
--SKIPIF--
<?php
if (!extension_loaded("pcntl")) print "skip";
?>
--FILE--
<?php
var_dump(pcntl_get_last_error());
$pid = pcntl_wait($status);
var_dump($pid);
var_dump(pcntl_get_last_error() == PCNTL_ECHILD);
?>
--EXPECT--
int(0)
int(-1)
bool(true)