3v4l.org

run code in 500+ PHP versions simultaneously
<?php class LastNames1 { public static function foo(){ // do stuff } } class LastNames2 { private static $instance = null; private function __construct(){ // do stuff } public function foo(){ // do stuff } public static function getInstance(){ if ( !self::$instance ){ self::$instance = new LastNames2(); } return self::$instance; } } $LastNames2 = LastNames2::getInstance(); for ($i = 0; $i <= 100000; $i++) { // LastNames1::foo(); $LastNames2->foo(); }
Output for git.master, git.master_jit, rfc.property-hooks

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:
106.48 ms | 1682 KiB | 4 Q