3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_exception_handler(function($e) { echo "Error encountered: {$e->getMessage()}"; }); class ErrorMessageTest { public function isOk() { echo "This works okay. "; } public function isNotOkay() { echo "This will not work. "; throw new RuntimeException("Violets are red, roses are blue!! Wha!?!?"); } } $test = new ErrorMessageTest(); $test->isOk(); $test->isNotOkay();
Output for git.master, git.master_jit, rfc.property-hooks
This works okay. This will not work. Error encountered: Violets are red, roses are blue!! Wha!?!?

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
161.29 ms | 405 KiB | 5 Q