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-- socket_export_stream: Basic test --EXTENSIONS-- sockets --FILE-- <?php $domain =..

Decoded Output download

--TEST--
socket_export_stream: Basic test
--EXTENSIONS--
sockets
--FILE--
<?php

$domain = (strtoupper(substr(PHP_OS, 0, 3) == 'WIN') ? AF_INET : AF_UNIX);
socket_create_pair($domain, SOCK_STREAM, 0, $s);

$s0 = reset($s);
$s1 = next($s);

$stream = socket_export_stream($s0);
var_dump($stream);

socket_write($s1, "test message");
socket_close($s1);

var_dump(stream_get_contents($stream));
?>
--EXPECTF--
resource(%d) of type (stream)
string(12) "test message"

Did this file decode correctly?

Original Code

--TEST--
socket_export_stream: Basic test
--EXTENSIONS--
sockets
--FILE--
<?php

$domain = (strtoupper(substr(PHP_OS, 0, 3) == 'WIN') ? AF_INET : AF_UNIX);
socket_create_pair($domain, SOCK_STREAM, 0, $s);

$s0 = reset($s);
$s1 = next($s);

$stream = socket_export_stream($s0);
var_dump($stream);

socket_write($s1, "test message");
socket_close($s1);

var_dump(stream_get_contents($stream));
?>
--EXPECTF--
resource(%d) of type (stream)
string(12) "test message"

Function Calls

None

Variables

None

Stats

MD5 43ceeb8eb6afe69a4e225a9750b08f2e
Eval Count 0
Decode Time 87 ms