3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php assert_options(ASSERT_ACTIVE, 1); 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 E6MIp
Output for 7.2.0
Deprecated: assert(): Calling assert() with a string argument is deprecated in /in/IDV0S on line 8
Output for 5.3.18 - 7.1.10