marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
--FILE--
<?php
-var_dump(memory_get_peak_usage());
+var_dump($a = memory_get_peak_usage());
var_dump(memory_get_peak_usage(true));
var_dump(memory_get_peak_usage(false));
+$array = range(1,1024*1024);
+var_dump(memory_get_peak_usage() > $a);
?>
--EXPECTF--
int(%d)
int(%d)
int(%d)
+bool(true)
marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
--FILE--
<?php
-print((is_array(PDO::getAvailableDrivers())) ? ("yes") : ("Test 'array stream_get_wrappers ( void );' has failed"));
+print((is_array(PDO::getAvailableDrivers())) ? ("yes") : ("Test failed"));
?>
--EXPECT--
yes
if (!extension_loaded('sockets')) {
die('SKIP sockets extension not available.');
}
-if (!defined("SO_BINDTODEVICE")) {
- die('SKIP SO_BINDTODEVICE not supported on this platform.');
-}
-if (!function_exists("posix_getuid") || posix_getuid() != 0) {
- die('SKIP SO_BINDTODEVICE requires root permissions.');
-}
?>
--FILE--
<?php
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
-$socketConn = socket_connect($socket, "127.0.0.1", 21);
+$socketConn = socket_connect($socket, "127.0.0.1", 21248);
var_dump(socket_last_error($socket));
socket_clear_error($socket);
var_dump(socket_last_error($socket));
--CREDITS--
marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
--SKIPIF--
+<?php
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
}
-if (socket_set_option($s, $level, IP_MULTICAST_IF, 1) === false) {
- die("skip interface 1 either doesn't exist or has no ipv4 address");
-}
+?>
--FILE--
<?php
$domain = AF_INET;
var_dump(connection_aborted());
?>
--EXPECTF--
-int(%i)
+int(0)
marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
--FILE--
<?php
-var_dump(connection_status());
+var_dump(connection_status() == CONNECTION_NORMAL);
?>
--EXPECTF--
-int(%i)
+bool(true)
--FILE--
<?php
print((is_array(stream_get_wrappers())) ? ("yes") : ("Test 'array stream_get_wrappers ( void );' has failed"));
+echo "\n";
+class Foo { }
+stream_wrapper_register("foo", "Foo");
+var_dump(in_array("foo", stream_get_wrappers()));
?>
--EXPECT--
yes
+bool(true)
--SKIPIF--
<?php
if (phpversion() < "5.3.0") { die('SKIP php version so lower.'); }
+if (!extension_loaded('openssl')) { die('ext/openssl required'); }
?>
--FILE--
<?php
Warning: stream_socket_enable_crypto(): When enabling encryption you must specify the crypto type in %s on line %d
bool(false)
-Warning: stream_socket_enable_crypto(): SSLv2 unavailable in the OpenSSL library against which PHP is linked in %s on line %d
+Warning: stream_socket_enable_crypto(): SSLv2 %s in %s on line %d
bool(false)
Warning: stream_socket_enable_crypto(): SSL: Broken pipe in %s on line %d