3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface ConfigurationProvider { public function getConfig() : array; } final class ConfigurationProviderImplementing implements ConfigurationProvider { public function getConfig() : array { return []; } } $provider = new ConfigurationProviderNonImplementing(); var_dump(! $provider instanceof ConfigProviderInterface && ! is_callable([$provider, 'getConfig']));
based on 4ic0H
Output for 7.0.0 - 7.3.0rc3
Fatal error: Uncaught Error: Class 'ConfigurationProviderNonImplementing' not found in /in/X4c7v:17 Stack trace: #0 {main} thrown in /in/X4c7v on line 17
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Class undefined: ConfigurationProviderNonImplementing in /in/X4c7v:17 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/X4c7v on line 5
Process exited with code 255.