2008-06-18 10:05:15 +00:00
|
|
|
--TEST--
|
|
|
|
SPL: SplFileObject::fgetss (bug 45216)
|
|
|
|
--CREDITS--
|
|
|
|
Perrick Penet <perrick@noparking.net>
|
|
|
|
#testfest phpcampparis 2008-06-07
|
|
|
|
--FILE--
|
2018-09-16 17:16:42 +00:00
|
|
|
<?php
|
2019-03-15 21:55:30 +00:00
|
|
|
$file = __DIR__ . '/foo.html';
|
2008-06-18 10:05:15 +00:00
|
|
|
file_put_contents($file, 'text 0<div class="tested">text 1</div>');
|
|
|
|
$handle = fopen($file, 'r');
|
|
|
|
|
|
|
|
$object = new SplFileObject($file);
|
|
|
|
var_dump($object->fgetss());
|
|
|
|
var_dump(fgetss($handle));
|
|
|
|
?>
|
|
|
|
--CLEAN--
|
|
|
|
<?php
|
2019-03-15 21:55:30 +00:00
|
|
|
unlink(__DIR__ . '/foo.html');
|
2008-06-18 10:05:15 +00:00
|
|
|
?>
|
2018-07-05 16:43:42 +00:00
|
|
|
--EXPECTF--
|
|
|
|
Deprecated: Function fgetss() is deprecated in %s on line %d
|
2008-06-18 10:05:15 +00:00
|
|
|
string(12) "text 0text 1"
|
2018-07-05 16:43:42 +00:00
|
|
|
|
|
|
|
Deprecated: Function fgetss() is deprecated in %s on line %d
|
2008-06-18 10:05:15 +00:00
|
|
|
string(12) "text 0text 1"
|