3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function my_strtolower(string $arg) { } $rf = new \ReflectionFunction('my_strtolower'); $params = $rf->getParameters(); echo "Userspace: ", $params[0]->getType(), "\n"; $rf = new \ReflectionFunction('strtolower'); $params = $rf->getParameters(); echo "Builtin: ", $params[0]->getType(), "\n";
Output for 7.0.0 - 7.3.0rc3
Userspace: string Builtin:
Output for hhvm-3.15.4 - 3.17.3
Userspace: string Builtin: HH\string
Output for hhvm-3.12.14
Userspace: HH\string Builtin: HH\string
Output for 5.6.0 - 5.6.30
Userspace: Fatal error: Call to undefined method ReflectionParameter::getType() in /in/2BtPW on line 8
Process exited with code 255.