File: clone.phpt

package info (click to toggle)
php-memcached 3.1.3%2B2.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,432 kB
  • sloc: ansic: 9,903; xml: 1,262; php: 321; pascal: 87; 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