3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php public function spin ($lambda) { while (true) { try { if ($lambda($this)) { return true; } } catch (Exception $e) { // do nothing } sleep(1); } } $this->spin(function($context) { $context->getSession()->getPage()->findById('example')->click(); return true; });
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected 'public' (T_PUBLIC) in /in/kFo5n on line 2
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_PUBLIC in /in/kFo5n on line 2
Process exited with code 255.