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->blub = $arg + $this->bla; } } Class Foo2 extends Foo { } $blubb = new Foo(); $blubb("bl0a"); var_dump($blubb);
based on H7Ylm
Output for 7.1.0 - 7.2.0
Warning: A non-numeric value encountered in /in/r6cMs on line 11 Warning: A non-numeric value encountered in /in/r6cMs on line 11 object(Foo)#1 (2) { ["bla"]=> string(6) "fooooo" ["blub"]=> int(0) }
Output for 5.3.21 - 7.0.20
object(Foo)#1 (2) { ["bla"]=> string(6) "fooooo" ["blub"]=> int(0) }