- json_encode: documentation ( source)
<?php
class C implements JsonSerializable {
public function jsonSerialize() {
$a = clone($this);
echo 1;
return $a;
}
}
echo json_encode(new C());
This script was stopped while abusing our resources