3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "um dois três quatro cinco seis"; echo $str, "<br>\n"; echo trim($str), "<br>\n"; echo trim($str, ' '), "<br>\n"; echo preg_replace('/[ ]*/', '', $str), "\n\n"; class Teste { public function __construct() { /* */ } public static function __callStatic($function, $arguments){ if(method_exists(__CLASS__, $function)){ echo "teste fake __ constructor \n"; call_user_func_array( array(__CLASS__, $function), $arguments ); } else { echo "método não existe \n\n"; } } public function teste(){ echo "teste __ method\n"; } } Teste::teste();
Output for git.master, git.master_jit, rfc.property-hooks
um dois três quatro cinco seis<br> um dois três quatro cinco seis<br> um dois três quatro cinco seis<br> umdoistrêsquatrocincoseis Fatal error: Uncaught Error: Non-static method Teste::teste() cannot be called statically in /in/7qor2:33 Stack trace: #0 {main} thrown in /in/7qor2 on line 33
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:
40.61 ms | 401 KiB | 8 Q