3v4l.org

run code in 300+ PHP versions simultaneously
<?php $boms = array("\xef\xbf\xbe" => '', "\xef\xbf\xbf" => '',); $array = array( "BOMがマルチバイト文字に分断されたもの"=>"あ\xefい\xbf\xbeう\xef\xbfえ\xbfお", "制御文字でBOMが分断されたもの" => "あい\xef\xbf\x07\xbeう\xef\x1f\xbf\xbfえお", "U+FFFE" => "\xef\xbf\xbe", "U+FFFF" => "\xef\xbf\xbf", "1バイト" => "\xef", "2バイト" => "\xef\xbf", "おしい" => "\xef\xbf\x6a" ); foreach($array as $key => $str) { echo $key . " "; echo var_dump(mb_strpos($str, $boms)); }
Output for git.master, git.master_jit, rfc.property-hooks
BOMがマルチバイト文字に分断されたもの Fatal error: Uncaught TypeError: mb_strpos(): Argument #2 ($needle) must be of type string, array given in /in/EPHcN:16 Stack trace: #0 /in/EPHcN(16): mb_strpos('\xE3\x81\x82\xEF\xE3\x81\x84\xBF\xBE\xE3\x81\x86\xEF\xBF\xE3...', Array) #1 {main} thrown in /in/EPHcN on line 16
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:
82.46 ms | 401 KiB | 8 Q