3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class foo { public $foo = 1; function as_string() { assert('$this->foo == 1'); } function as_expr() { assert($this->foo == 1); } } $foo = new foo(); $foo->as_expr(); $foo->as_string();
based on BSVaH
Output for 7.2.0
Deprecated: assert(): Calling assert() with a string argument is deprecated in /in/2LYVJ on line 7
Output for 5.3.18 - 7.1.10