3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myclass{ public function add($nam,$y){ return $nam+$y; } public function mult($nam,$y){ return $nam*$y; } } $surname= new myclass(12,6); echo $surname->add(); echo $surname->mult();
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught ArgumentCountError: Too few arguments to function myclass::add(), 0 passed in /in/FjYRk on line 13 and exactly 2 expected in /in/FjYRk:3 Stack trace: #0 /in/FjYRk(13): myclass->add() #1 {main} thrown in /in/FjYRk on line 3
Process exited with code 255.

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