3v4l.org

run code in 300+ PHP versions simultaneously
<?php $class_names = get_declared_classes(); foreach ($class_names as $class_name) { $rc = new ReflectionClass($class_name); $constructor = $rc->getConstructor(); if ($constructor != NULL) { $params = $constructor->getParameters(); echo "new $class_name("; foreach ($params as $param) { $name = $param->getName(); $opt = $param->isOptional(); if ($opt) { echo "[$name], "; } else { echo "$name, "; } } if (empty($params)) { echo "[none or dynamic]"; } echo ")\n"; } }

Abusive script

This script was stopped while abusing our resources

Output for git.master, git.master_jit
new InternalIterator([none or dynamic]) new Exception([message], [code], [previous], ) new ErrorException([message], [code], [severity], [filename], [line], [previous], ) new Error([message], [code], [previous], ) new CompileError([message], [code], [previous], ) new ParseError([message], [code], [previous], ) new TypeError([message], [code], [previous], ) new ArgumentCountError([message], [code], [previous], ) new ValueError([message], [code], [previous], ) new ArithmeticError([message], [code], [previous], ) new DivisionByZeroError([message], [code], [previous], ) new UnhandledMatchError([message], [code], [previous], ) new RequestParseBodyException([message], [code], [previous], ) new Closure([none or dynamic]) new ClosedGeneratorException([message], [code], [previous], ) new WeakReference([none or dynamic]) new Attribute([flags], ) new ReturnTypeWillChange([none or dynamic]) new AllowDynamicProperties([none or dynamic]) new SensitiveParameter([none or dynamic]) new SensitiveParameterValue(value, ) new Override([none or dynamic]) new Fiber(callback, ) new FiberError([none or dynamic]) new DateTime([datetime], [timezone], ) new DateTimeImmutable([datetime], [timezone], ) new DateTimeZone(timezone, ) new DateInterval(duration, ) new DatePeriod(start, [interval], [end], [options], ) new DateError([message], [code], [previous], ) new DateObjectError([message], [code], [previous], ) new DateRangeError([message], [code], [previous], ) new DateException([message], [code], [previous], ) new DateInvalidTimeZoneException([message], [code], [previous], ) new DateInvalidOperationException([message], [code], [previous], ) new DateMalformedStringException([message], [code], [previous], ) new DateMalformedIntervalStringException([message], [code], [previous], ) new DateMalformedPeriodStringException([message], [code], [previous], ) new SQLite3Exception([message], [code], [previous], ) new SQLite3(filename, [flags], [encryptionKey], ) new SQLite3Stmt(sqlite3, query, ) new SQLite3Result([none or dynamic]) new DOMException([message], [code], [previous], ) new dom\domexception([message], [code], [previous], ) new Dom\Node([none or dynamic]) new DOMDocumentFragment([none or dynamic]) new Dom\DocumentFragment([none or dynamic]) new Dom\Document([none or dynamic]) new DOMDocument([version], [encoding], ) new Dom\HTMLDocument([none or dynamic]) new Dom\XMLDocument([none or dynamic]) new Dom\CharacterData([none or dynamic]) new DOMAttr(name, [value], ) new Dom\Attr([none or dynamic]) new DOMElement(qualifiedName, [value], [namespace], ) new Dom\Element([none or dynamic]) new DOMText([data], ) new Dom\Text([none or dynamic]) new DOMComment([data], ) new Dom\Comment([none or dynamic]) new DOMCdataSection(data, ) new Dom\CDATASection([none or dynamic]) new Dom\DocumentType([none or dynamic]) new Dom\Notation([none or dynamic]) new Dom\Entity([none or dynamic]) new DOMEntityReference(name, ) new Dom\EntityReference([none or dynamic]) new DOMProcessingInstruction(name, [value], ) new Dom\ProcessingInstruction([none or dynamic]) new DOMXPath(document, [registerNodeNS], ) new Dom\XPath(document, [registerNodeNS], ) new finfo([flags], [magic_database], ) new HashContext([none or dynamic]) new JsonException([message], [code], [previous], ) new LogicException([message], [code], [previous], ) new BadFunctionCallException([message], [code], [previous], ) new BadMethodCallException([message], [code], [previous], ) new DomainException([message], [code], [previous], ) new InvalidArgumentException([message], [code], [previous], ) new LengthException([message], [code], [previous], ) new OutOfRangeException([message], [code], [previous], ) new RuntimeException([message], [code], [previous], ) new OutOfBoundsException([message], [code], [previous], ) new OverflowException([message], [code], [previous], ) new RangeException([message], [code], [previous], ) new UnderflowException([message], [code], [previous], ) new UnexpectedValueException([message], [code], [previous], ) new RecursiveIteratorIterator(iterator, [mode], [flags], ) new IteratorIterator(iterator, [class], ) new FilterIterator(iterator, ) new RecursiveFilterIterator(iterator, ) new CallbackFilterIterator(iterator, callback, ) new RecursiveCallbackFilterIterator(iterator, callback, ) new ParentIterator(iterator, ) new LimitIterator(iterator, [offset], [limit], ) new CachingIterator(iterator, [flags], ) new RecursiveCachingIterator(iterator, [flags], ) new NoRewindIterator(iterator, ) new AppendIterator([none or dynamic]) new InfiniteIterator(iterator, ) new RegexIterator(iterator, pattern, [mode], [flags], [pregFlags], ) new RecursiveRegexIterator(iterator, pattern, [mode], [flags], [pregFlags], ) new RecursiveTreeIterator(iterator, [flags], [cachingIteratorFlags], [mode], ) new ArrayObject([array], [flags], [iteratorClass], ) new ArrayIterator([array], [flags], ) new RecursiveArrayIterator([array], [flags], ) new SplFileInfo(filename, ) new DirectoryIterator(directory, ) new FilesystemIterator(directory, [flags], ) new RecursiveDirectoryIterator(directory, [flags], ) new GlobIterator(pattern, [flags], ) new SplFileObject(filename, [mode], [useIncludePath], [context], ) new SplTempFileObject([maxMemory], ) new SplFixedArray([size], ) new MultipleIterator([flags], ) new PDOException([message], [code], [previous], ) new PDO(dsn, [username], [password], [options], ) new Random\RandomError([message], [code], [previous], ) new Random\BrokenRandomEngineError([message], [code], [previous], ) new Random\RandomException([message], [code], [previous], ) new Random\Engine\Mt19937([seed], [mode], ) new Random\Engine\PcgOneseq128XslRr64([seed], ) new Random\Engine\Xoshiro256StarStar([seed], ) new Random\Randomizer([engine], ) new ReflectionException([message], [code], [previous], ) new ReflectionFunction(function, ) new ReflectionGenerator(generator, ) new ReflectionParameter(function, param, ) new ReflectionMethod(objectOrMethod, [method], ) new ReflectionClass(objectOrClass, ) new ReflectionObject(object, ) new ReflectionProperty(class, property, ) new ReflectionClassConstant(class, constant, ) new ReflectionExtension(name, ) new ReflectionZendExtension(name, ) new ReflectionReference([none or dynamic]) new ReflectionAttribute([none or dynamic]) new ReflectionEnum(objectOrClass, ) new ReflectionEnumUnitCase(class, constant, ) new ReflectionEnumBackedCase(class, constant, ) new ReflectionFiber(fiber, ) new ReflectionConstant(name, ) new AssertionError([message], [code], [previous], ) new SimpleXMLElement(data, [options], [dataIsURL], [namespaceOrPrefix], [isPrefix], ) new SimpleXMLIterator(data, [options], [dataIsURL], [namespaceOrPrefix], [isPrefix], ) new PdoSqlite(dsn, [username], [password], [options], ) new PharException([message], [code], [previous], ) new Phar(filename, [flags], [alias], ) new PharData(filename, [flags], [alias], [format], ) new PharFileInfo(filename, ) new PhpToken(id, text, [line], [pos], ) new GMP([num], [base], ) new Collator(locale, ) new NumberFormatter(locale, style, [pattern], ) new MessageFormatter(locale, pattern, ) new IntlDateFormatter(locale, [dateType], [timeType], [timezone], [calendar], [pattern], ) new IntlDatePatternGenerator([locale], ) new ResourceBundle(locale, bundle, [fallback], ) new Transliterator([none or dynamic]) new IntlTimeZone([none or dynamic]) new IntlCalendar([none or dynamic]) new IntlGregorianCalendar([timezoneOrYear], [localeOrMonth], [day], [hour], [minute], [second], ) new Spoofchecker([none or dynamic]) new IntlException([message], [code], [previous], ) new IntlBreakIterator([none or dynamic]) new IntlRuleBasedBreakIterator(rules, [compiled], ) new IntlCodePointBreakIterator([none or dynamic]) new UConverter([destination_encoding], [source_encoding], )
Output for rfc.property-hooks
new InternalIterator([none or dynamic]) new Exception([message], [code], [previous], ) new ErrorException([message], [code], [severity], [filename], [line], [previous], ) new Error([message], [code], [previous], ) new CompileError([message], [code], [previous], ) new ParseError([message], [code], [previous], ) new TypeError([message], [code], [previous], ) new ArgumentCountError([message], [code], [previous], ) new ValueError([message], [code], [previous], ) new ArithmeticError([message], [code], [previous], ) new DivisionByZeroError([message], [code], [previous], ) new UnhandledMatchError([message], [code], [previous], ) new RequestParseBodyException([message], [code], [previous], ) new Closure([none or dynamic]) new ClosedGeneratorException([message], [code], [previous], ) new WeakReference([none or dynamic]) new Attribute([flags], ) new ReturnTypeWillChange([none or dynamic]) new AllowDynamicProperties([none or dynamic]) new SensitiveParameter([none or dynamic]) new SensitiveParameterValue(value, ) new Override([none or dynamic]) new Fiber(callback, ) new FiberError([none or dynamic]) new DateTime([datetime], [timezone], ) new DateTimeImmutable([datetime], [timezone], ) new DateTimeZone(timezone, ) new DateInterval(duration, ) new DatePeriod(start, [interval], [end], [options], ) new DateError([message], [code], [previous], ) new DateObjectError([message], [code], [previous], ) new DateRangeError([message], [code], [previous], ) new DateException([message], [code], [previous], ) new DateInvalidTimeZoneException([message], [code], [previous], ) new DateInvalidOperationException([message], [code], [previous], ) new DateMalformedStringException([message], [code], [previous], ) new DateMalformedIntervalStringException([message], [code], [previous], ) new DateMalformedPeriodStringException([message], [code], [previous], ) new SQLite3Exception([message], [code], [previous], ) new SQLite3(filename, [flags], [encryptionKey], ) new SQLite3Stmt(sqlite3, query, ) new SQLite3Result([none or dynamic]) new DOMException([message], [code], [previous], ) new dom\domexception([message], [code], [previous], ) new DOMDocumentFragment([none or dynamic]) new dom\documentfragment([none or dynamic]) new DOMDocument([version], [encoding], ) new DOM\HTMLDocument([none or dynamic]) new DOM\XMLDocument([none or dynamic]) new DOMAttr(name, [value], ) new dom\attr(name, [value], ) new DOMElement(qualifiedName, [value], [namespace], ) new dom\element(qualifiedName, [value], [namespace], ) new DOMText([data], ) new dom\text([data], ) new DOMComment([data], ) new dom\comment([data], ) new DOMCdataSection(data, ) new dom\cdatasection(data, ) new DOMEntityReference(name, ) new dom\entityreference(name, ) new DOMProcessingInstruction(name, [value], ) new dom\processinginstruction(name, [value], ) new DOMXPath(document, [registerNodeNS], ) new dom\xpath(document, [registerNodeNS], ) new finfo([flags], [magic_database], ) new HashContext([none or dynamic]) new JsonException([message], [code], [previous], ) new LogicException([message], [code], [previous], ) new BadFunctionCallException([message], [code], [previous], ) new BadMethodCallException([message], [code], [previous], ) new DomainException([message], [code], [previous], ) new InvalidArgumentException([message], [code], [previous], ) new LengthException([message], [code], [previous], ) new OutOfRangeException([message], [code], [previous], ) new RuntimeException([message], [code], [previous], ) new OutOfBoundsException([message], [code], [previous], ) new OverflowException([message], [code], [previous], ) new RangeException([message], [code], [previous], ) new UnderflowException([message], [code], [previous], ) new UnexpectedValueException([message], [code], [previous], ) new RecursiveIteratorIterator(iterator, [mode], [flags], ) new IteratorIterator(iterator, [class], ) new FilterIterator(iterator, ) new RecursiveFilterIterator(iterator, ) new CallbackFilterIterator(iterator, callback, ) new RecursiveCallbackFilterIterator(iterator, callback, ) new ParentIterator(iterator, ) new LimitIterator(iterator, [offset], [limit], ) new CachingIterator(iterator, [flags], ) new RecursiveCachingIterator(iterator, [flags], ) new NoRewindIterator(iterator, ) new AppendIterator([none or dynamic]) new InfiniteIterator(iterator, ) new RegexIterator(iterator, pattern, [mode], [flags], [pregFlags], ) new RecursiveRegexIterator(iterator, pattern, [mode], [flags], [pregFlags], ) new RecursiveTreeIterator(iterator, [flags], [cachingIteratorFlags], [mode], ) new ArrayObject([array], [flags], [iteratorClass], ) new ArrayIterator([array], [flags], ) new RecursiveArrayIterator([array], [flags], ) new SplFileInfo(filename, ) new DirectoryIterator(directory, ) new FilesystemIterator(directory, [flags], ) new RecursiveDirectoryIterator(directory, [flags], ) new GlobIterator(pattern, [flags], ) new SplFileObject(filename, [mode], [useIncludePath], [context], ) new SplTempFileObject([maxMemory], ) new SplFixedArray([size], ) new MultipleIterator([flags], ) new PDOException([message], [code], [previous], ) new PDO(dsn, [username], [password], [options], ) new Random\RandomError([message], [code], [previous], ) new Random\BrokenRandomEngineError([message], [code], [previous], ) new Random\RandomException([message], [code], [previous], ) new Random\Engine\Mt19937([seed], [mode], ) new Random\Engine\PcgOneseq128XslRr64([seed], ) new Random\Engine\Xoshiro256StarStar([seed], ) new Random\Randomizer([engine], ) new ReflectionException([message], [code], [previous], ) new ReflectionFunction(function, ) new ReflectionGenerator(generator, ) new ReflectionParameter(function, param, ) new ReflectionMethod(objectOrMethod, [method], ) new ReflectionClass(objectOrClass, ) new ReflectionObject(object, ) new ReflectionProperty(class, property, ) new ReflectionClassConstant(class, constant, ) new ReflectionExtension(name, ) new ReflectionZendExtension(name, ) new ReflectionReference([none or dynamic]) new ReflectionAttribute([none or dynamic]) new ReflectionEnum(objectOrClass, ) new ReflectionEnumUnitCase(class, constant, ) new ReflectionEnumBackedCase(class, constant, ) new ReflectionFiber(fiber, ) new AssertionError([message], [code], [previous], ) new SimpleXMLElement(data, [options], [dataIsURL], [namespaceOrPrefix], [isPrefix], ) new SimpleXMLIterator(data, [options], [dataIsURL], [namespaceOrPrefix], [isPrefix], ) new PdoSqlite(dsn, [username], [password], [options], ) new PharException([message], [code], [previous], ) new Phar(filename, [flags], [alias], ) new PharData(filename, [flags], [alias], [format], ) new PharFileInfo(filename, ) new PhpToken(id, text, [line], [pos], ) new GMP([num], [base], ) new Collator(locale, ) new NumberFormatter(locale, style, [pattern], ) new MessageFormatter(locale, pattern, ) new IntlDateFormatter(locale, [dateType], [timeType], [timezone], [calendar], [pattern], ) new IntlDatePatternGenerator([locale], ) new ResourceBundle(locale, bundle, [fallback], ) new Transliterator([none or dynamic]) new IntlTimeZone([none or dynamic]) new IntlCalendar([none or dynamic]) new IntlGregorianCalendar([timezoneOrYear], [localeOrMonth], [day], [hour], [minute], [second], ) new Spoofchecker([none or dynamic]) new IntlException([message], [code], [previous], ) new IntlBreakIterator([none or dynamic]) new IntlRuleBasedBreakIterator(rules, [compiled], ) new IntlCodePointBreakIterator([none or dynamic]) new UConverter([destination_encoding], [source_encoding], )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
29.62 ms | 438 KiB | 5 Q