3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function __construct( public string $secret, public string $normal ) { //throw new Exception('Error!'); } } class Bar { function __construct( #[\SensitiveParameter] public string $secret, public string $normal ) { //throw new Exception('Error!'); } } try { $foo = new Foo('password', 'normal'); var_dump(serialize($foo)); } catch (Exception $e) { echo $e, PHP_EOL, PHP_EOL; } try { $bar = new Bar('password', 'normal'); var_dump(serialize($bar)); } catch (Exception $e) { echo $e, PHP_EOL, PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
string(68) "O:3:"Foo":2:{s:6:"secret";s:8:"password";s:6:"normal";s:6:"normal";}" string(68) "O:3:"Bar":2:{s:6:"secret";s:8:"password";s:6:"normal";s:6:"normal";}"

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:
31.1 ms | 405 KiB | 5 Q