3v4l.org

run code in 300+ PHP versions simultaneously
<?php # Globale Funktion function foo( $bar ) { return true; } class Foo { static function instance() { return new Foo(); } # Statische Methode static function bar( $buz ) { return true; } # Instanz Methode function buz( $bee ) { return true; } } # Error Handler setzen um Warnungen zu verkürzen set_error_handler( "err" ); function err( $errno, $errstr ) { echo "{WARNING} "; return true; } # Funktion zum Testen der Aufrufe function test( $method ) { try { eval ( $method ); echo "$method\n"; } catch ( Throwable $e ) { $class = get_class( $e ); echo "[$class] $method\n"; } } # Tests durchführen test('foo();'); test('Foo::bar();'); test('Foo::instance()->buz();'); test('ksort();');
Output for git.master, git.master_jit, rfc.property-hooks
[ArgumentCountError] foo(); [ArgumentCountError] Foo::bar(); [ArgumentCountError] Foo::instance()->buz(); [ArgumentCountError] ksort();

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