Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- EAGAIN/EWOULDBLOCK on a non-blocking socket should not result in an error return ..

Decoded Output download

--TEST--
EAGAIN/EWOULDBLOCK on a non-blocking socket should not result in an error return value
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') die('skip not for Windows');
?>
--FILE--
<?php

$sockets = stream_socket_pair(STREAM_PF_UNIX, STREAM_SOCK_STREAM, STREAM_IPPROTO_IP);
stream_set_blocking($sockets[0], false);
var_dump(fread($sockets[0], 100));

?>
--EXPECT--
string(0) ""

Did this file decode correctly?

Original Code

--TEST--
EAGAIN/EWOULDBLOCK on a non-blocking socket should not result in an error return value
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') die('skip not for Windows');
?>
--FILE--
<?php

$sockets = stream_socket_pair(STREAM_PF_UNIX, STREAM_SOCK_STREAM, STREAM_IPPROTO_IP);
stream_set_blocking($sockets[0], false);
var_dump(fread($sockets[0], 100));

?>
--EXPECT--
string(0) ""

Function Calls

None

Variables

None

Stats

MD5 6f48bd2b400878ffa1dc8b2989ea3ba7
Eval Count 0
Decode Time 103 ms