Skip to content

Instantly share code, notes, and snippets.

<?php
class MongoSession implements SessionHandlerInterface {
protected $collection;
protected $obj = array();
public function close() {
// syslog(LOG_WARNING, 'close');
return true;
Variant HHVM_FUNCTION(rand, ActRec* ar) {
int64_t min, max;
if (ar->numArgs() == 0) {
min = 0;
max = HHVM_FN(getrandmax)();
} else {
min = ar->getExtraArg(0)->m_data.num;
max = ar->getExtraArg(1)->m_data.num;
}
if (!s_rand_is_seeded) {
# 0 HPHP::bt_handler(int) at crash-reporter.cpp:0
# 1 killpg at /lib/x86_64-linux-gnu/libc.so.6:0
# 2 HPHP::JIT::HhbcTranslator::emitFCallBuiltin(unsigned int, unsigned int, int, bool) at ./hphp/hhvm/hhvm:0
# 3 HPHP::JIT::IRTranslator::translateInstr(HPHP::JIT::NormalizedInstruction const&) at ./hphp/hhvm/hhvm:0
# 4 HPHP::JIT::TranslatorX64::translateTracelet(HPHP::JIT::Tracelet&) at ./hphp/hhvm/hhvm:0
# 5 HPHP::JIT::TranslatorX64::translateWork(HPHP::JIT::TranslArgs const&) at ./hphp/hhvm/hhvm:0
# 6 HPHP::JIT::TranslatorX64::translate(HPHP::JIT::TranslArgs const&) at ./hphp/hhvm/hhvm:0
# 7 HPHP::JIT::TranslatorX64::retranslate(HPHP::JIT::TranslArgs const&) at ./hphp/hhvm/hhvm:0
# 8 HPHP::JIT::TranslatorX64::createTranslation(HPHP::JIT::TranslArgs const&) at ./hphp/hhvm/hhvm:0
# 9 HPHP::JIT::TranslatorX64::bindJmp(unsigned char*, HPHP::SrcKey, HPHP::JIT::ServiceRequest, bool&) at ./hphp/hhvm/hhvm:0
class standard_mathExtension : public Extension {
public:
standard_mathExtension() : Extension("standard_math") {}
virtual void moduleInit() {
HHVM_FE(is_finite);
HHVM_FE(is_infinite);
HHVM_FE(is_nan);
HHVM_FE(ceil);
HHVM_FE(floor);
HHVM_FE(round);
Host: local-hhvm
ProcessID: 1884
ThreadID: 18837700
ThreadPID: 2346
Name: /usr/bin/hhvm
Type: Segmentation fault
Runtime: hhvm
Version: heads/bcmath_hni-0-g86db8b953c0f5211a7e9a4a56b747717d7317d66
DebuggerCount: 0
StaticFile {
Extensions {
123 = application/vnd.lotus-1-2-3
3dml = text/vnd.in3d.3dml
3ds = image/x-3ds
3g2 = video/3gpp2
3gp = video/3gpp
7z = application/x-7z-compressed
aab = application/x-authorware-bin
aac = audio/x-aac
Yogurt:~ simon$ ab -c 50 -n 1000 http://hhvm.pocketrent.com:8000/index.php/contact-us/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking hhvm.pocketrent.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
diff --git a/hphp/test/frameworks/run.php b/hphp/test/frameworks/run.php
index 4c1f736..0a5f0d2 100755
--- a/hphp/test/frameworks/run.php
+++ b/hphp/test/frameworks/run.php
@@ -1563,6 +1563,74 @@ class PHPUnit extends Framework {
}
}
+class SilverStripe extends Framework {
+ public function __construct(string $name) { parent::__construct($name); }
diff --git a/hphp/runtime/vm/member-operations.h b/hphp/runtime/vm/member-operations.h
index 806c6c6..fea0229 100644
--- a/hphp/runtime/vm/member-operations.h
+++ b/hphp/runtime/vm/member-operations.h
@@ -192,32 +192,35 @@
template <bool warn, KeyType keyType>
inline TypedValue* ElemArray(ArrayData* base, TypedValue* key) {
TypedValue* result;
if (keyType == KeyType::Any) {
DataType rtt = key->m_type;
<?php
class A {
protected $i = 0;
public function __toString() {
$this->i++;
return "$this->i";
}
}