3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?hh $classes = get_declared_classes(); foreach($classes as $class) { $methods = get_class_methods($class); foreach($methods as $method) { if (in_array($method, array('__construct', '__destruct', '__call', '__callStatic', '__get', '__set', '__isset', '__unset', '__sleep', '__wakeup', '__toString', '__invoke', '__set_state', '__clone'))) { printf("%s::%s\n", $class, $method); } $functions = get_defined_functions(); $functions_list = array(); foreach($functions['user'] as $func) { $f = new ReflectionFunction($func); $args = array(); foreach($f->getParameters() as $param) { $tmparg = ''; if ($param->isPassedByReference()) $tmparg = '&'; if ($param->isOptional()) { $tmparg = '[' . $tmparg . '$' . $param->getName() . ' = ' . $param->getDefaultValue() . ']'; } else { $tmparg.= '&' . $param->getName(); } $args[] = $tmparg; unset($tmparg); } printf("function %s ( %s ){[###].........[###]}\n", $func, implode(', ', $args)); } } }
Output for hhvm-3.12.0
HH\Set::__construct HH\Set::__toString HH\Set::__get HH\Set::__set HH\Set::__isset HH\Set::__unset HH\Vector::__construct HH\Vector::__toString HH\Vector::__get HH\Vector::__set HH\Vector::__isset HH\Vector::__unset HH\ImmVector::__construct HH\ImmVector::__toString HH\ImmVector::__get HH\ImmVector::__set HH\ImmVector::__isset HH\ImmVector::__unset HH\ImmSet::__construct HH\ImmSet::__toString HH\ImmSet::__get HH\ImmSet::__set HH\ImmSet::__isset HH\ImmSet::__unset HH\ImmMap::__construct HH\ImmMap::__toString HH\ImmMap::__get HH\ImmMap::__set HH\ImmMap::__isset HH\ImmMap::__unset HH\Map::__construct HH\Map::__toString HH\Map::__get HH\Map::__set HH\Map::__isset HH\Map::__unset HH\Asio\WrappedException::__construct LazyFilterIterable::__construct DOMNodeIterator::__construct LazySkipKeyedIterable::__construct RecursiveFilterIterator::__construct RecursiveFilterIterator::__call LazyValuesIterator::__construct LazyValuesIterator::__clone __SystemLib\TarArchiveHandler::__construct LazyFilterKeyedIterator::__construct LazyFilterKeyedIterator::__clone NoRewindIterator::__construct NoRewindIterator::__call XMLReader::__construct XMLReader::__get LazyFilterIterator::__construct LazyFilterIterator::__clone IntlGregorianCalendar::__construct IntlGregorianCalendar::__call LazyZipIterator::__construct LazyZipIterator::__clone __SystemLib\DivisionByZeroError::__construct __SystemLib\DivisionByZeroError::__toString FilterIterator::__construct FilterIterator::__call ReflectionObject::__construct ReflectionObject::__toString ReflectionObject::__clone PDOStatement::__wakeup PDOStatement::__sleep LazySkipWhileKeyedIterable::__construct BadMethodCallException::__construct BadMethodCallException::__toString SoapClient::__construct SoapClient::__call IntlDateFormatter::__construct LazyMapKeyedIterable::__construct MessageFormatter::__construct LazyKeysIterable::__construct SoapFault::__construct SoapFault::__toString ReflectionExtension::__construct ReflectionExtension::__toString ReflectionExtension::__clone ReflectionProperty::__construct ReflectionProperty::__toString ReflectionProperty::__clone DateTimeImmutable::__construct DateTimeImmutable::__clone LazyTakeIterable::__construct finfo::__construct finfo::__destruct finfo::__sleep finfo::__wakeup LazySkipWhileKeyedIterator::__construct LazySkipWhileKeyedIterator::__clone __resource::__toString ReflectionTypeAlias::__construct ReflectionTypeAlias::__clone ReflectionTypeAlias::__toString RecursiveDirectoryIterator::__construct RecursiveDirectoryIterator::__toString LazySkipWhileIterator::__construct LazySkipWhileIterator::__clone LazyKVZipIterator::__construct LazyKVZipIterator::__clone SplMaxHeap::__construct HH\Asio\WrappedResult::__construct Phar::__construct Phar::__toString LazySliceIterator::__construct LazySliceIterator::__clone __SystemLib\ArithmeticError::__construct __SystemLib\ArithmeticError::__toString UConverter::__construct UConverter::__destruct LazyIterableView::__construct PharException::__construct PharException::__toString Memcached::__construct DOMProcessingInstruction::__construct __SystemLib\ConvertIconvFilter::__construct LazyFilterWithKeyIterable::__construct AsyncMysqlConnectionPool::__construct SplMinHeap::__construct LazyMapWithKeyIterable::__construct LazySliceIterable::__construct __SystemLib\DeflateStreamFilter::__construct InvalidOperationException::__construct InvalidOperationException::__toString SQLite3::__construct __SystemLib\ParseError::__construct __SystemLib\ParseError::__toString SpoofChecker::__construct mysqli::__construct mysqli::__clone DatePeriod::__construct ErrorException::__construct ErrorException::__toString LazyValuesIterable::__construct InvalidArgumentException::__construct InvalidArgumentException::__toString ReflectionFunction::__construct ReflectionFunction::__toString ReflectionFunction::__clone HH\Client\TypecheckResult::__construct Memcache::__construct Memcache::__destruct __SystemLib\StringRot13StreamFilter::__construct LazyConcatIterator::__construct LazyConcatIterator::__clone SplFixedArray::__construct DOMNodeList::__construct LazyTakeWhileIterator::__construct LazyTakeWhileIterator::__clone RuntimeException::__construct RuntimeException::__toString FilesystemIterator::__construct FilesystemIterator::__toString ReflectionParameter::__construct ReflectionParameter::__toString ReflectionParameter::__clone __SystemLib\StreamFilterBucket::__construct __SystemLib\StreamFilterBucket::__toString DateTime::__construct DateTime::__sleep DateTime::__wakeup Redis::__call Redis::__destruct LazyTakeWhileKeyedIterable::__construct RedisException::__construct RedisException::__toString LazyTakeWhileIterable::__construct DateInterval::__construct DateInterval::__get DateInterval::__set HH\Pair::__construct HH\Pair::__toString HH\Pair::__get HH\Pair::__set HH\Pair::__isset HH\Pair::__unset DOMNode::__construct AsyncMysqlException::__construct AsyncMysqlException::__toString LazyTakeKeyedIterator::__construct LazyTakeKeyedIterator::__clone SplFileInfo::__construct SplFileInfo::__toString DOMXPath::__construct AsyncMysqlQueryException::__construct AsyncMysqlQueryException::__toString LazyZipKeyedIterable::__construct LazySkipIterable::__construct SQLite3Stmt::__construct SQLite3Result::__construct ReflectionFunctionAbstract::__clone ReflectionFunctionAbstract::__toString DOMElement::__construct ZipArchive::__get ZipArchive::__isset mysqli_stmt::__construct mysqli_stmt::__clone mysqli_result::__construct mysqli_result::__clone DomainException::__construct DomainException::__toString __SystemLib\Error::__construct __SystemLib\Error::__toString mysqli_driver::__construct mysqli_driver::__clone ArrayIterator::__construct RecursiveCallbackFilterIterator::__construct RecursiveCallbackFilterIterator::__call LazyMapKeyedIterator::__construct LazyMapKeyedIterator::__clone AppendIterator::__construct AppendIterator::__call LazySliceKeyedIterator::__construct LazySliceKeyedIterator::__clone DOMImplementation::__construct DOMException::__construct DOMException::__toString RegexIterator::__construct RegexIterator::__call PDOException::__construct PDOException::__toString SoapParam::__construct EncodingDetector::__construct SplHeap::__construct DOMNotation::__construct SplFileObject::__construct SplFileObject::__toString LazyMapIterator::__construct LazyMapIterator::__clone RangeException::__construct RangeException::__toString LogicException::__construct LogicException::__toString __SystemLib\StringToUpperStreamFilter::__construct DOMCdataSection::__construct HH\InvariantException::__construct HH\InvariantException::__toString LazyKeyedIterableView::__construct IntervalTimer::__construct RecursiveArrayIterator::__construct DOMAttr::__construct Imagick::__get Imagick::__isset Imagick::__clone Imagick::__construct DOMNameSpaceNode::__construct OverflowException::__construct OverflowException::__toString LazyMapIterable::__construct MapIterator::__construct LazyZipIterable::__construct ParentIterator::__construct ParentIterator::__call XMLWriter::__construct DirectoryIterator::__construct DirectoryIterator::__toString ImagickDrawException::__construct ImagickDrawException::__toString LazySkipIterator::__construct LazySkipIterator::__clone ReflectionTypeConstant::__construct ReflectionTypeConstant::__toString ReflectionTypeConstant::__clone LazyFilterWithKeyIterator::__construct LazyFilterWithKeyIterator::__clone DOMEntityReference::__construct LazyKeysIterator::__construct LazyKeysIterator::__clone SoapServer::__construct SimpleXMLElement::__construct SimpleXMLElement::__toString SimpleXMLElement::__get SimpleXMLElement::__set SimpleXMLElement::__isset SimpleXMLElement::__unset ImagickDraw::__clone ImagickDraw::__construct __SystemLib\MethCallerHelper::__construct __SystemLib\MethCallerHelper::__invoke php_user_filter::__construct GlobIterator::__construct GlobIterator::__toString AsyncMysqlConnectException::__construct AsyncMysqlConnectException::__toString DOMEntity::__construct DOMNamedNodeMap::__construct LazySkipKeyedIterator::__construct LazySkipKeyedIterator::__clone SoapVar::__construct LengthException::__construct LengthException::__toString LazySkipWhileIterable::__construct Directory::__construct RecursiveCachingIterator::__construct RecursiveCachingIterator::__toString RecursiveCachingIterator::__call RecursiveTreeIterator::__construct RecursiveTreeIterator::__call SoapHeader::__construct OutOfRangeException::__construct OutOfRangeException::__toString MCRouterException::__construct MCRouterException::__toString CallbackFilterIterator::__construct CallbackFilterIterator::__call ImagickPixelException::__construct ImagickPixelException::__toString LazyMapWithKeyIterator::__construct LazyMapWithKeyIterator::__clone SplPriorityQueue::__clone UnexpectedValueException::__construct UnexpectedValueException::__toString OutOfBoundsException::__construct OutOfBoundsException::__toString Exception::__construct Exception::__toString LazyConcatIterable::__construct UnderflowException::__construct UnderflowException::__toString BadFunctionCallException::__construct BadFunctionCallException::__toString MCRouterOptionException::__construct MCRouterOptionException::__toString mysqli_warning::__construct SimpleXMLIterator::__construct SimpleXMLIterator::__toString SimpleXMLIterator::__get SimpleXMLIterator::__set SimpleXMLIterator::__isset SimpleXMLIterator::__unset DOMText::__construct __SystemLib\AssertionError::__construct __SystemLib\AssertionError::__toString ImagickPixel::__construct __SystemLib\InflateStreamFilter::__construct LazyTakeWhileKeyedIterator::__construct LazyTakeWhileKeyedIterator::__clone SplTempFileObject::__construct SplTempFileObject::__toString LazyTakeKeyedIterable::__construct ImagickException::__construct ImagickException::__toString MultipleIterator::__construct APCIterator::__construct LazyZipKeyedIterator::__construct LazyZipKeyedIterator::__clone DOMDocumentFragment::__construct __SystemLib\ArchiveEntryStat::__construct XhprofFrame::__construct XhprofFrame::__destruct SetIterator::__construct RecursiveRegexIterator::__construct RecursiveRegexIterator::__call IntlTimeZone::__construct VectorIterator::__construct DOMCharacterData::__construct CachingIterator::__construct CachingIterator::__toString CachingIterator::__call DateTimeZone::__construct DOMComment::__construct SplStack::__construct DOMDocument::__construct LazySliceKeyedIterable::__construct Collator::__construct ImagickPixelIterator::__construct ReflectionClass::__construct ReflectionClass::__toString ReflectionClass::__clone ReflectionType::__construct ReflectionType::__toString ReflectionType::__clone PharData::__construct PharData::__toString IntlCalendar::__call LazyTakeIterator::__construct LazyTakeIterator::__clone _SplPriorityQueueHeap::__construct IntlRuleBasedBreakIterator::__construct DOMDocumentType::__construct NumberFormatter::__construct __SystemLib\StringToLowerStreamFilter::__construct ResourceBundle::__construct SimpleXMLElementIterator::__construct PDO::__construct PDO::__wakeup PDO::__sleep IteratorIterator::__construct IteratorIterator::__call RecursiveIteratorIterator::__construct RecursiveIteratorIterator::__call LazyKVZipIterable::__construct InfiniteIterator::__construct InfiniteIterator::__call MCRouter::__construct PharFileInfo::__construct PharFileInfo::__destruct PharFileInfo::__toString XSLTProcessor::__construct CURLFile::__construct PairIterator::__construct ImagickPixelIteratorException::__construct ImagickPixelIteratorException::__toString __SystemLib\TypeError::__construct __SystemLib\TypeError::__toString ReflectionException::__construct ReflectionException::__toString LazyFilterKeyedIterable::__construct __SystemLib\SessionForwardingHandler::__construct LimitIterator::__construct LimitIterator::__call ReflectionMethod::__construct ReflectionMethod::__toString ReflectionMethod::__clone ArrayObject::__construct ArrayObject::__set ArrayObject::__get ArrayObject::__isset ArrayObject::__unset __SystemLib\ZipArchiveHandler::__construct Closure::__construct Closure::__get Closure::__set Closure::__isset Closure::__unset
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.4.34 - 5.6.8
Parse error: syntax error, unexpected '$classes' (T_VARIABLE) in /in/c8XcG on line 2
Process exited with code 255.
Output for 5.3.7 - 5.4.32
<?hh $classes = get_declared_classes(); foreach($classes as $class) { $methods = get_class_methods($class); foreach($methods as $method) { if (in_array($method, array('__construct', '__destruct', '__call', '__callStatic', '__get', '__set', '__isset', '__unset', '__sleep', '__wakeup', '__toString', '__invoke', '__set_state', '__clone'))) { printf("%s::%s\n", $class, $method); } $functions = get_defined_functions(); $functions_list = array(); foreach($functions['user'] as $func) { $f = new ReflectionFunction($func); $args = array(); foreach($f->getParameters() as $param) { $tmparg = ''; if ($param->isPassedByReference()) $tmparg = '&'; if ($param->isOptional()) { $tmparg = '[' . $tmparg . '$' . $param->getName() . ' = ' . $param->getDefaultValue() . ']'; } else { $tmparg.= '&' . $param->getName(); } $args[] = $tmparg; unset($tmparg); } printf("function %s ( %s ){[###].........[###]}\n", $func, implode(', ', $args)); } } }