3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Insurance{ function clsNAme(){ echo get_class($this); } } $cl = new Insurance(); $cl->clsName(); Insurance::clsName(); var_dump (3*4); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.example.com/"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); $var = "testing module"; $statement = 'This is a $var'; echo ($statement); $var = "testing module"; $statement = "This is a $var"; echo ($statement); $arr = array("foo","bar","baz"); for ( $i = 0; $i < count($arr); $i++){ $item = $arr[$i]; } echo "<pre>"; print_r($item); echo "</pre><br/>\r\n"; $a = 3; print '$a'."\r\n"; echo '$a'."\r\n"; print "$a\r\n"; echo "$a\r\n"; $array = array(array(141,151,161), 2, 3, array(101, 202, 303)); function DisplayArray($array) { foreach ($array as $value) { if (is_array($value)) { DisplayArray($value); } else { echo $value . " "; } } } DisplayArray($array); echo 0x10; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Insurance Fatal error: Uncaught Error: Non-static method Insurance::clsNAme() cannot be called statically in /in/pHDN7:11 Stack trace: #0 {main} thrown in /in/pHDN7 on line 11
Process exited with code 255.

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:
41.8 ms | 401 KiB | 8 Q