3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { public function __construct(){ $this->bla = "fooooo"; } public function __invoke($arg){ $this->bla = $arg + $this->bla; } } Class Foo2 extends Foo { } $blubb = new Foo(); $blubb("bl0a"); var_dump($blubb);
based on Zhf8h
Output for 7.1.0 - 7.2.0
Warning: A non-numeric value encountered in /in/H7Ylm on line 11 Warning: A non-numeric value encountered in /in/H7Ylm on line 11 object(Foo)#1 (1) { ["bla"]=> int(0) }
Output for 5.3.21 - 7.0.20
object(Foo)#1 (1) { ["bla"]=> int(0) }