3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected function __sleep ( ) {} protected function __wakeup() {} protected function __serialize ( ) { } protected function __unserialize ( array $data ) {} protected function __invoke() {} protected static function __set_state ( array $properties ) {} protected function __debugInfo ( ) {} protected function __call(string $name , array $arguments){} protected static function __callStatic(string $name , array $arguments) {} protected function __get( string $name ) {} protected function __set( string $name, $value) {} protected function __isset( string $name ) {} protected function __unset( string $name ) {} /*protected*/ function __construct() {} protected function __destruct() {} protected function __clone() {} //protected function __toString() {} } $foo = new Foo; // clone $foo; unset($foo);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: The magic method Foo::__sleep() must have public visibility in /in/6NqUv on line 4 Warning: The magic method Foo::__wakeup() must have public visibility in /in/6NqUv on line 5 Warning: The magic method Foo::__serialize() must have public visibility in /in/6NqUv on line 6 Warning: The magic method Foo::__unserialize() must have public visibility in /in/6NqUv on line 7 Warning: The magic method Foo::__invoke() must have public visibility in /in/6NqUv on line 8 Warning: The magic method Foo::__set_state() must have public visibility in /in/6NqUv on line 9 Warning: The magic method Foo::__debugInfo() must have public visibility in /in/6NqUv on line 10 Warning: The magic method Foo::__call() must have public visibility in /in/6NqUv on line 11 Warning: The magic method Foo::__callStatic() must have public visibility in /in/6NqUv on line 12 Warning: The magic method Foo::__get() must have public visibility in /in/6NqUv on line 13 Warning: The magic method Foo::__set() must have public visibility in /in/6NqUv on line 14 Warning: The magic method Foo::__isset() must have public visibility in /in/6NqUv on line 15 Warning: The magic method Foo::__unset() must have public visibility in /in/6NqUv on line 16 Fatal error: Uncaught Error: Call to protected Foo::__destruct() from global scope in /in/6NqUv:26 Stack trace: #0 {main} thrown in /in/6NqUv on line 26
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:
58.63 ms | 402 KiB | 8 Q