3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function test1($unset = false) { // PHP establishes an internal static var and binds // the local name 'bar' to it static $bar = 5; $bar++; echo $bar . " "; // unlink the name 'bar' from the internal static var unset($bar); /* $bar = " | "; echo $bar; static $bar = 10; $bar++; echo $bar . " "; //*/ } test1(); test1(); test1(); test1();
Output for 4.3.0 - 5.6.26, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
6 7 8 9