3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait A { function calc1($v) { echo 'ttttttttttttt'; return $v+1; } } class MyClass { use A; function calc($v) { echo '123'; $this->calc1(); //parent::calc($v); } } $x=new MyClass(); $x->calc(123);
Output for git.master, git.master_jit, rfc.property-hooks
123 Fatal error: Uncaught ArgumentCountError: Too few arguments to function MyClass::calc1(), 0 passed in /in/TVqe4 on line 14 and exactly 1 expected in /in/TVqe4:3 Stack trace: #0 /in/TVqe4(14): MyClass->calc1() #1 /in/TVqe4(20): MyClass->calc(123) #2 {main} thrown in /in/TVqe4 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:
59.04 ms | 401 KiB | 8 Q