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


preferences:
24.78 ms | 404 KiB | 5 Q