3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Rick { public static function say(string $words) { echo count($words); } } Rick::say('wubba','lubba','dub','dub');
based on N3MkV
Output for 7.2.0
Warning: count(): Parameter must be an array or an object that implements Countable in /in/T95sG on line 4 1
Output for 7.0.0 - 7.1.10
1
Output for 5.3.21 - 5.6.28
Catchable fatal error: Argument 1 passed to Rick::say() must be an instance of string, string given, called in /in/T95sG on line 8 and defined in /in/T95sG on line 3
Process exited with code 255.