3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = "omceD evoL 1"; function reverseMe( String $string ) { if ( strlen($string > 1) ) { $reversedString = ReverseMe( substr($string, 1) ) . substr($string, 0, 1); } else { $reversedString = $string; } return $reversedString; } reverseMe($str);
based on CoinM
Output for hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0rc3
Output for 5.6.0 - 5.6.30
Catchable fatal error: Argument 1 passed to reverseMe() must be an instance of String, string given, called in /in/DPD0s on line 19 and defined in /in/DPD0s on line 5
Process exited with code 255.