3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ function __construct(){ $this->page="Test<br/>Test hého"; } function text(){ echo "\n START\n"; var_dump(mb_detect_encoding($this->page)); echo "\n 1: "; var_dump(mb_detect_encoding($this->page)); echo "\n 2: "; var_dump(mb_detect_encoding(htmlentities($this->page, ENT_IGNORE, 'UTF-8'))); $this->page = html_entity_decode($this->page); echo "\n 3: "; var_dump(mb_detect_encoding($this->page)); } } $a=new Test(); $a->text(); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Creation of dynamic property Test::$page is deprecated in /in/AmkgI on line 4 START string(5) "UTF-8" 1: string(5) "UTF-8" 2: string(5) "ASCII" 3: string(5) "UTF-8"

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