3v4l.org

run code in 300+ PHP versions simultaneously
<?php function connect($login, $password) { throw new exception ("Connect error!"); } echo "Credentials exposed\n"; try { try { connect("login", "password"); } catch (Throwable $e){ throw $e; } } catch (Throwable $e){ echo $e; // only for demonsration! do no use echo in the catch block } echo "\n\nCredentials hidden:\n"; try { try { connect("login", "password"); } catch (Throwable $e) { throw new exception($e->getMessage()); } } catch (Throwable $e) { echo $e; // only for demonsration! do no use echo in the catch block }
Output for git.master, git.master_jit, rfc.property-hooks
Credentials exposed Exception: Connect error! in /in/3Ygq8:4 Stack trace: #0 /in/3Ygq8(10): connect('login', 'password') #1 {main} Credentials hidden: Exception: Connect error! in /in/3Ygq8:22 Stack trace: #0 {main}

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:
175.8 ms | 406 KiB | 5 Q