3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = "annoying monkey"; $hex = ''; for ($i=0; $i<strlen($var); $i++){ $ord = ord($var[$i]); $hexCode = dechex($ord); $hex .= substr('0'.$hexCode, -2); } $parts = str_split($hex,8); foreach($parts as $key=>$value){ $parts[$key] = str_pad($value, 8, "0", STR_PAD_RIGHT); $innerParts = str_split($parts[$key],2); $innerParts = array_reverse($innerParts); $parts[$key] = "0x".implode('',$innerParts); } print_r($parts); // 616e6e6f79696e67206d6f6e6b6579
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => 0x6f6e6e61 [1] => 0x676e6979 [2] => 0x6e6f6d20 [3] => 0x0079656b )

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