3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data = array( 'ua' => array( 'family', 'major' ), 'os' => array( 'family', 'major' ) ); $result = new StdClass(); $result->ua->family = "Safari"; $result->ua->major = "6"; $result->ua->minor = "0"; $result->ua->patch = "2"; $result->ua->toString() = "Safari 6.0.2"; $result->ua->toVersion() = "6.0.2"; $result->os->family = "Mac OS X"; $result->os->major = "10"; $result->os->minor = "7"; $result->os->patch = "5"; $result->os->patchMinor = "[null]"; $result->os->toString() = "Mac OS X 10.7.5"; $result->os->toVersion() = "10.7.5"; return array_intersect_key( (array) $result, $data );
Output for 5.3.0 - 5.4.34
Fatal error: Can't use method return value in write context in /in/MKoDL on line 11
Process exited with code 255.