1--TEST-- 2GH-14930: Custom stream wrapper dir_readdir output truncated to 255 characters in PHP 8.3 3--SKIPIF-- 4<?php 5if (PHP_OS_FAMILY !== "Windows") die("xfail Fix is an ABI break so reverted from 8.3"); 6?> 7--FILE-- 8<?php 9 10class DummyWrapper 11{ 12 public $context; 13 14 public function dir_opendir($url, $options) 15 { 16 return true; 17 } 18 19 public function dir_readdir() 20 { 21 return 'very-long-filename-ieNoquiaC6ijeiy9beejaiphoriejo2cheehooGou8uhoh7eh0gefahyuQuohd7eec9auso9eeFah2Maedohsemi1eetoo5fo5biePh5eephai7SiuguipouLeemequ2oope9aigoQu5efak2aLeri9ithaiJ9eew3dianaiHoo1aexaighiitee6geghiequ5nohhiikahwee8ohk2Soip2Aikeithohdeitiedeiku7DiTh2eep3deitiedeiku7DiTh2ee.txt'; 22 } 23} 24 25stream_wrapper_register('dummy', DummyWrapper::class); 26 27$dh = opendir('dummy://', stream_context_create()); 28var_dump(readdir($dh)); 29?> 30--EXPECT-- 31string(288) "very-long-filename-ieNoquiaC6ijeiy9beejaiphoriejo2cheehooGou8uhoh7eh0gefahyuQuohd7eec9auso9eeFah2Maedohsemi1eetoo5fo5biePh5eephai7SiuguipouLeemequ2oope9aigoQu5efak2aLeri9ithaiJ9eew3dianaiHoo1aexaighiitee6geghiequ5nohhiikahwee8ohk2Soip2Aikeithohdeitiedeiku7DiTh2eep3deitiedeiku7DiTh2ee.txt" 32