3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Sylius\Bundle\ResourceBundle\DependencyInjection; class SyliusResourceExtension { function test() { echo call_user_func(array(get_class($this), 'bar')); } function bar() { echo 'foo'; } } namespace Sylius\Bundle\ProductBundle\DependencyInjection; use Sylius\Bundle\ResourceBundle\DependencyInjection\SyliusResourceExtension; { class SyliusProductExtension extends SyliusResourceExtension {} } $a = new SyliusProductExtension(); $a->test();
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, non-static method Sylius\Bundle\ProductBundle\DependencyInjection\SyliusProductExtension::bar() cannot be called statically in /in/rJ7WD:6 Stack trace: #0 /in/rJ7WD(6): call_user_func(Array) #1 /in/rJ7WD(21): Sylius\Bundle\ResourceBundle\DependencyInjection\SyliusResourceExtension->test() #2 {main} thrown in /in/rJ7WD on line 6
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:
39.05 ms | 402 KiB | 8 Q