3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $name; public function __construct($name) { $this->name = $name; } public function isTest() { return $this->name === 'test'; } } $things = array(); $things[] = new A('aaa'); $things[] = new A('bbb'); $things[] = new A('test'); $things[] = new A('ddd'); var_dump(array_filter($things, array('isTest', '$this')));
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: array_filter(): Argument #2 ($callback) must be a valid callback or null, class "isTest" not found in /in/gmai7:24 Stack trace: #0 /in/gmai7(24): array_filter(Array, Array) #1 {main} thrown in /in/gmai7 on line 24
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:
76.98 ms | 401 KiB | 8 Q