3v4l.org

run code in 300+ PHP versions simultaneously
<?php Class abc{ // create a class public static $a; static function getsize() { return ++self::$a; //increment a static variable } static function setsize($n) { self::$a = $n; // set size of static variable } } abc::setsize(100); // set value of static variable echo abc::getsize(); //call getsize function output is 100 but it must be 101
Output for git.master_jit, git.master, rfc.property-hooks
101

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
166.62 ms | 405 KiB | 5 Q