1--TEST--
2Test serialize() & unserialize() functions: resources
3--FILE--
4<?php
5/* Prototype  : proto string serialize(mixed variable)
6 * Description: Returns a string representation of variable (which can later be unserialized)
7 * Source code: ext/standard/var.c
8 * Alias to functions:
9 */
10/* Prototype  : proto mixed unserialize(string variable_representation)
11 * Description: Takes a string representation of variable and recreates it
12 * Source code: ext/standard/var.c
13 * Alias to functions:
14 */
15
16echo "\n--- Testing Resource ---\n";
17$file_handle = fopen( __FILE__, "r" );
18$serialized_data = serialize( $file_handle );
19fclose($file_handle);
20var_dump($serialized_data);
21var_dump(unserialize($serialized_data));
22
23echo "\nDone";
24?>
25--EXPECTF--
26--- Testing Resource ---
27string(4) "i:%d;"
28int(%d)
29
30Done
31