File: clone.phpt

package info (click to toggle)
php-memcached 3.3.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 924 kB
  • sloc: ansic: 5,161; xml: 869; php: 343; pascal: 81; 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