3v4l.org

run code in 300+ PHP versions simultaneously
<?php class weasel { } function show1(int $value) { var_dump($value); } function show2(weasel $value) { var_dump($value); } try { show1(new class {}); } catch (throwable $e) { echo $e->getMessage(), "\n"; } try { show2(new class {}); } catch (throwable $e) { echo $e->getMessage(), "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
show1(): Argument #1 ($value) must be of type int, class@anonymous given, called in /in/kE3hC on line 15 show2(): Argument #1 ($value) must be of type weasel, class@anonymous given, called in /in/kE3hC on line 20

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:
52.74 ms | 401 KiB | 8 Q