File: clone.phpt

package info (click to toggle)
php-memcached 3.2.0%2B2.2.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,568 kB
  • sloc: ansic: 9,752; xml: 1,350; php: 478; pascal: 123; sh: 12; makefile: 5
file content (18 lines) | stat: -rw-r--r-- 324 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
Test cloning
--SKIPIF--
<?php include "skipif.inc";?>
--FILE--
<?php
$s = new stdClass();
$m = new Memcached();

$s = clone $s;
$m = clone $m;

echo "GOT HERE";
--EXPECTF--
Fatal error: Uncaught Error: Trying to clone an uncloneable object of class Memcached in %s:6
Stack trace:
#0 {main}
  thrown in %s on line 6