1--TEST--
2Bug #54623: Segfault when when writing to a persistent socket after closing a copy of the socket
3--FILE--
4<?php
5$sock = pfsockopen('udp://127.0.0.1', '63844');
6var_dump((int)$sock);
7@fwrite($sock, "1");
8$sock2 = pfsockopen('udp://127.0.0.1', '63844');
9var_dump((int)$sock2);
10@fwrite($sock2, "2");
11fclose($sock2);
12fwrite($sock, "3");
13--EXPECTF--
14int(%d)
15int(%d)
16
17Warning: fwrite(): supplied resource is not a valid stream resource in %s on line %d
18